better-than-nothing alternative.
- Fix Priority and Receipt compose options being reset after return from
HTML addressbook, and allow returning from an empty address book (#1673056).
+ - Do not special case the 'None' folder.
Version 1.5.1 (branched on 2006-02-12)
--------------------------------------
* @since 1.0 or older
*/
function sqimap_mailbox_select ($imap_stream, $mailbox) {
- // FIX ME: WHAAAA DO NOT USE "None" for something that does not exist. Use false or NULL instead
- if ($mailbox == 'None') {
+ if (empty($mailbox)) {
return;
}
* @return void
*/
-function displayPageHeader($color, $mailbox, $sHeaderJs='', $sBodyTagJs = '') {
+function displayPageHeader($color, $mailbox='', $sHeaderJs='', $sBodyTagJs = '') {
global $reply_focus, $hide_sm_attributions, $frame_top,
$provider_name, $provider_uri, $startMessage,
messages, the INBOX will become bold and a number will appear to the right of it
to say how many new messages are in it. If you set it to All Folders, this
behavior will happen on all folders. If you notice that loading the folder list
- is really slow, you can set this to INBOX or None and that should speed it up.
+ is really slow, you can set this to INBOX and that should speed it up.
<br /><br />
<b>Unseen message notification type</b><br />
require(SM_PATH . 'functions/forms.php');
require(SM_PATH . 'functions/addressbook.php');
-displayPageHeader($color, 'None');
+displayPageHeader($color);
/* input form data */
sqgetGlobalVar('email', $email, SQ_POST);
abook_create_form(SM_PATH . 'src/addressbook.php','addaddr',_("Add to address book"),_("Add address"),$formdata);
echo '</form>';
?>
-</body></html>
\ No newline at end of file
+</body></html>
exit;
}
-displayPageHeader($color, 'None');
+displayPageHeader($color);
$newcfg = array( );
}
?>
-</body></html>
\ No newline at end of file
+</body></html>
/** load plugin functions */
require_once(SM_PATH . 'plugins/bug_report/functions.php');
-displayPageHeader($color, 'None');
+displayPageHeader($color);
/** is bug_report plugin disabled or called by wrong user */
if (! is_plugin_enabled('bug_report') || ! bug_report_check_user()) {
</form>
<br />
</body>
-</html>
\ No newline at end of file
+</html>
$todayis = date( 'mdY' );
$calself=basename($PHP_SELF);
-displayPageHeader($color, 'None');
+displayPageHeader($color);
calendar_header();
readcalendardata();
startcalendar();
endcalendar();
?>
-</body></html>
\ No newline at end of file
+</body></html>
$daily_events = array();
-displayPageHeader($color, 'None');
+displayPageHeader($color);
calendar_header();
readcalendardata();
day_header();
display_events();
?>
</table></td></tr></table>
-</body></html>
\ No newline at end of file
+</body></html>
$calself=basename($PHP_SELF);
-displayPageHeader($color, 'None');
+displayPageHeader($color);
//load calendar menu
calendar_header();
?>
</table></td></tr></table>
-</body></html>
\ No newline at end of file
+</body></html>
$calself=basename($PHP_SELF);
-displayPageHeader($color, 'None');
+displayPageHeader($color);
//load calendar menu
calendar_header();
?>
</table></td></tr></table>
-</body></html>
\ No newline at end of file
+</body></html>
$calself=basename($PHP_SELF);
-displayPageHeader($color, 'None');
+displayPageHeader($color);
//load calendar menu
calendar_header();
?>
</table></td></tr></table>
-</body></html>
\ No newline at end of file
+</body></html>
}
}
-displayPageHeader($color, 'None');
+displayPageHeader($color);
do_hook('change_password_init', $null);
?>
include_once(SM_PATH . 'functions/forms.php');
include_once(SM_PATH . 'plugins/filters/filters.php');
-displayPageHeader($color, 'None');
+displayPageHeader($color);
/* get globals */
sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
sqgetGlobalVar('action', $action, SQ_GET);
/* end globals */
-displayPageHeader($color, 'None');
+displayPageHeader($color);
if (sqgetGlobalVar('spam_submit',$spam_submit,SQ_POST)) {
$spam_filters = load_spam_filters();
global $username, $color, $folder_prefix, $default_charset;
$default_charset = strtoupper($default_charset);
-displayPageHeader($color, 'None');
+displayPageHeader($color);
$mailbox = 'INBOX';
/**
-displayPageHeader($color, 'None');
+displayPageHeader($color);
$oTemplate->assign('lists', $lists);
$oTemplate->display('plugins/listcommands/non_rfc_lists.tpl');
}
$mailfetch = Mail_Fetch_Servers();
-displayPageHeader($color, 'None');
+displayPageHeader($color);
echo '<br />';
/* end globals */
-displayPageHeader( $color, 'None' );
+displayPageHeader( $color );
switch( $mf_action ) {
case 'add':
include_once(SM_PATH . 'functions/forms.php');
-displayPageHeader($color, 'None');
+displayPageHeader($color);
echo html_tag( 'table', '', 'center', $color[0], 'width="95%" cellpadding="1" cellspacing="0" border="0"' ) . "\n" .
html_tag( 'tr' ) . "\n" .
/* plugin functions */
include_once(SM_PATH . 'plugins/spamcop/functions.php');
-displayPageHeader($color, 'None');
+displayPageHeader($color);
/** is spamcop plugin disabled */
// option changes do nothing, if read_body_header_right hook is not active.
printf(_("For more information about SpamCop, it's services, spam in general, and many related topics, try reading through SpamCop's %sHelp and Feedback%s section."), '<a href="http://spamcop.net/help.shtml">', '</a>');
echo "</p>\n";
?>
-</body></html>
\ No newline at end of file
+</body></html>
$MOD = 'options_main';
}
- displayPageHeader($color, 'None');
+ displayPageHeader($color);
echo " <br />\n";
/**
* Check if we need to link in a script.
/** Plugin functions */
include_once(SM_PATH . 'plugins/translate/functions.php');
-displayPageHeader($color, 'None');
+displayPageHeader($color);
?>
<table width="95%" align="center" border="0" cellpadding="1" cellspacing="0"><tr><td bgcolor="<?php echo $color[0]; ?>">
</td></tr>
</table>
</form>
-</body></html>
\ No newline at end of file
+</body></html>
*/
require('../include/init.php');
-displayPageHeader($color, 'None' );
+displayPageHeader($color);
?>
<p align="center">
$abook_sort_order = get_abook_sort();
/* Create page header before addressbook_init in order to display error messages correctly. */
-displayPageHeader($color, 'None');
+displayPageHeader($color);
/* Open addressbook with error messages on.
remote backends (LDAP) are enabled because they can be used. (list_addr function)
$composeMessage=$compose_messages[$session];
}
-if (!isset($mailbox) || $mailbox == '' || ($mailbox == 'None')) {
+if (empty($mailbox)) {
$mailbox = 'INBOX';
}
require_once(SM_PATH . 'functions/folder_manip.php');
require_once(SM_PATH . 'functions/forms.php');
-displayPageHeader($color, 'None');
+displayPageHeader($color);
/* get globals we may need */
sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
*/
require('../include/init.php');
-displayPageHeader($color, 'None' );
+displayPageHeader($color);
$helpdir[0] = 'basic.hlp';
$helpdir[1] = 'main_folder.hlp';
*/
require('../include/init.php');
-displayPageHeader($color, 'None');
+displayPageHeader($color);
/* globals */
if ( sqgetGlobalVar('passed_id', $temp, SQ_GET) ) {
$autocreate = array($sent_folder, $trash_folder, $draft_folder);
$folders_created = false;
foreach( $autocreate as $folder ) {
- if (($folder != '') && ($folder != 'none')) {
+ if ($folder != '') {
/**
* If $show_only_subscribed_folders is true, don't use
* $mailboxes array for checking if mailbox exists.
/* Finally, display whatever page we are supposed to show now. */
/***************************************************************/
-displayPageHeader($color, 'None', (isset($optpage_data['xtra']) ? $optpage_data['xtra'] : ''));
+displayPageHeader($color, null, (isset($optpage_data['xtra']) ? $optpage_data['xtra'] : ''));
/*
* The main option page has a different layout then the rest of the option
setPref($data_dir, $username, 'hililist', serialize($message_highlight_list));
}
-displayPageHeader($color, 'None');
+displayPageHeader($color);
/**
* Display the current rule list
exit;
}
-displayPageHeader($color, 'None');
+displayPageHeader($color);
/* since 1.1.3 */
do_hook('options_identities_top', $null);
/* Finally, display whatever page we are supposed to show now. */
/***************************************************************/
-displayPageHeader($color, 'None', (isset($optpage_data['xtra']) ? $optpage_data['xtra'] : ''));
+displayPageHeader($color, null, (isset($optpage_data['xtra']) ? $optpage_data['xtra'] : ''));
/**
$boxes = sqimap_mailbox_list($imapConnection);
/* ensure we have a valid default mailbox name */
$mailbox = asearch_nz($mailbox_array[0]);
-if (($mailbox == '') || ($mailbox == 'None')) //Workaround for sm quirk IMHO (what if I really have a mailbox called None?)
+if ($mailbox == '')
$mailbox = $boxes[0]['unformatted']; //Usually INBOX ;)
$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0);
sqimap_mailbox_select($imapConnection, $mailbox);
-displayPageHeader($color, 'None');
+displayPageHeader($color);
$msg_url = 'read_body.php?mailbox='.urlencode($mailbox).
'&startMessage='.urlencode($startMessage).
$oTemplate->display('vcard.tpl');
$oTemplate->display('footer.tpl');
-?>
\ No newline at end of file
+?>
translateText($body, $wrap_at, $charset);
}
-displayPageHeader($color, 'None');
+displayPageHeader($color);
$oTemplate->assign('view_message_href', $msg_url);
$oTemplate->assign('download_href', $dwnld_url);
$current_folder_str = '';
-if ( $shortBoxName <> '' && strtolower( $shortBoxName ) <> 'none' ) {
+if ( $shortBoxName != '' ) {
$current_folder_str .= _("Current Folder") . ": <em>$shortBoxName </em>\n";
} else {
$current_folder_str .= ' ';