From f8a1ed5aa365d515e4e2ac3602f900bfb9447fce Mon Sep 17 00:00:00 2001 From: jervfors Date: Sat, 23 Apr 2005 12:08:00 +0000 Subject: [PATCH] Trimming whitespace and replacing tabs git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@9378 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- class/deliver/Deliver.class.php | 2 +- class/template/template.class.php | 2 +- config/config_default.php | 2 +- functions/abook_ldap_server.php | 4 +- functions/addressbook.php | 6 +-- functions/attachment_common.php | 6 +-- functions/auth.php | 2 +- functions/display_messages.php | 2 +- functions/file_prefs.php | 6 +-- functions/folder_manip.php | 30 +++++++------- functions/forms.php | 4 +- functions/global.php | 2 +- functions/i18n.php | 16 ++++---- functions/imap.php | 2 +- functions/imap_asearch.php | 2 +- functions/imap_mailbox.php | 32 +++++++-------- functions/imap_messages.php | 2 +- functions/mailbox_display.php | 2 +- functions/mime.php | 40 +++++++++---------- functions/page_header.php | 2 +- functions/strings.php | 2 +- functions/url_parser.php | 2 +- include/options/display.php | 2 +- plugins/administrator/defines.php | 2 +- plugins/administrator/options.php | 2 +- plugins/bug_report/setup.php | 2 +- plugins/bug_report/system_specs.php | 2 +- plugins/filters/filters.php | 14 +++---- plugins/mail_fetch/fetch.php | 2 +- plugins/mail_fetch/functions.php | 2 +- plugins/mail_fetch/setup.php | 4 +- .../message_details_bottom.php | 10 ++--- .../message_details/message_details_main.php | 2 +- .../message_details/message_details_top.php | 2 +- plugins/newmail/functions.php | 22 +++++----- plugins/newmail/loadfile.php | 4 +- plugins/newmail/newmail_opt.php | 4 +- plugins/squirrelspell/setup.php | 2 +- src/about.php | 4 +- src/addrbook_popup.php | 2 +- src/addrbook_search_html.php | 6 +-- src/addressbook.php | 4 +- src/configtest.php | 11 ++--- src/empty_trash.php | 2 +- src/folders.php | 14 +++---- src/help.php | 2 +- src/left_main.php | 12 +++--- src/login.php | 4 +- src/options.php | 4 +- src/printer_friendly_bottom.php | 2 +- src/printer_friendly_top.php | 2 +- src/redirect.php | 2 +- src/signout.php | 2 +- src/view_header.php | 2 +- src/view_html.php | 10 ++--- src/webmail.php | 4 +- templates/util_message_list.php | 2 +- 57 files changed, 168 insertions(+), 171 deletions(-) diff --git a/class/deliver/Deliver.class.php b/class/deliver/Deliver.class.php index 9a9bce05..81ba38b6 100644 --- a/class/deliver/Deliver.class.php +++ b/class/deliver/Deliver.class.php @@ -694,4 +694,4 @@ class Deliver { return $refer; } } -?> +?> \ No newline at end of file diff --git a/class/template/template.class.php b/class/template/template.class.php index f1787f85..e7e5175b 100755 --- a/class/template/template.class.php +++ b/class/template/template.class.php @@ -184,4 +184,4 @@ class Template } -?> +?> \ No newline at end of file diff --git a/config/config_default.php b/config/config_default.php index 47d71ab4..8d24c2e7 100644 --- a/config/config_default.php +++ b/config/config_default.php @@ -1007,4 +1007,4 @@ $config_use_color = 2; * sent and regular output to begin, which will majorly screw * things up when we try to send more headers later. */ -?> +?> \ No newline at end of file diff --git a/functions/abook_ldap_server.php b/functions/abook_ldap_server.php index be7aa4e8..de150de2 100644 --- a/functions/abook_ldap_server.php +++ b/functions/abook_ldap_server.php @@ -9,7 +9,7 @@ * * LDAP filtering code by Tim Bell * (#539534) - * ADS limit_scope code by Michael Brown + * ADS limit_scope code by Michael Brown * (#1035454) * * @version $Id$ @@ -307,7 +307,7 @@ class abook_ldap_server extends addressbook_backend { $expr = $this->charset_encode($expr); /* - * allow use of one asterisk in search. + * allow use of one asterisk in search. * Don't allow any ldap special chars if search is different */ if($expr!='*') { diff --git a/functions/addressbook.php b/functions/addressbook.php index 90de7dab..f92a951d 100644 --- a/functions/addressbook.php +++ b/functions/addressbook.php @@ -27,7 +27,7 @@ global $addrbook_dsn, $addrbook_global_dsn; /** * Create and initialize an addressbook object. - * @param boolean $showerr display any address book init errors. html page header + * @param boolean $showerr display any address book init errors. html page header * must be created before calling addressbook_init() with $showerr enabled. * @param boolean $onlylocal enable only local address book backends * @return object address book object. @@ -73,7 +73,7 @@ function addressbook_init($showerr = true, $onlylocal = false) { } /* Global file based addressbook */ - if (isset($abook_global_file) && + if (isset($abook_global_file) && isset($abook_global_file_writeable) && isset($abook_global_file_listing) && trim($abook_global_file)!=''){ @@ -81,7 +81,7 @@ function addressbook_init($showerr = true, $onlylocal = false) { // Detect place of address book if (! preg_match("/[\/\\\]/",$abook_global_file)) { /* no path chars, address book stored in data directory - * make sure that there is a slash between data directory + * make sure that there is a slash between data directory * and address book file name */ $abook_global_filename=$data_dir diff --git a/functions/attachment_common.php b/functions/attachment_common.php index 69a722c8..871a1344 100644 --- a/functions/attachment_common.php +++ b/functions/attachment_common.php @@ -169,7 +169,7 @@ function attachment_common_link_html(&$Args) { } /** - * Adds href and text keys to attachment_common array for image attachments + * Adds href and text keys to attachment_common array for image attachments * @param array $Args attachment $type hook arguments * @since 1.2.0 */ @@ -195,7 +195,7 @@ function attachment_common_link_image(&$Args) { } /** - * Adds href and text keys to attachment_common array for vcard attachments + * Adds href and text keys to attachment_common array for vcard attachments * @param array $Args attachment $type hook arguments * @since 1.2.0 */ @@ -214,7 +214,7 @@ function attachment_common_link_vcard(&$Args) { /** * Processes octet-stream attachments. - * Calls attachment_common-load_mime_types and attachment $type hooks. + * Calls attachment_common-load_mime_types and attachment $type hooks. * @param array $Args attachment $type hook arguments * @since 1.2.0 */ diff --git a/functions/auth.php b/functions/auth.php index 0a7ca543..ac30c4b4 100644 --- a/functions/auth.php +++ b/functions/auth.php @@ -249,4 +249,4 @@ function get_smtp_user(&$user, &$pass) { } } -?> +?> \ No newline at end of file diff --git a/functions/display_messages.php b/functions/display_messages.php index b6ccd15c..73aab2af 100644 --- a/functions/display_messages.php +++ b/functions/display_messages.php @@ -177,4 +177,4 @@ function error_option_save($message) { $optpage_save_error=array_merge($optpage_save_error,array($message)); } // vim: et ts=4 -?> +?> \ No newline at end of file diff --git a/functions/file_prefs.php b/functions/file_prefs.php index e852387e..93b47143 100644 --- a/functions/file_prefs.php +++ b/functions/file_prefs.php @@ -186,7 +186,7 @@ function checkForPrefs($data_dir, $username, $filename = '') { if (!@file_exists($filename) ) { /* If it does not exist, check for default_prefs */ - + /* First, check legacy locations: data dir */ if(substr($data_dir,-1) != '/') { $data_dir .= '/'; @@ -203,7 +203,7 @@ function checkForPrefs($data_dir, $username, $filename = '') { if (!@file_exists($default_pref)) { $default_pref = SM_PATH . 'config/default_pref'; } - + /* If a default_pref file found, try to copy it, if none found, * try to create an empty one. If that fails, report an error. */ @@ -277,4 +277,4 @@ function getSig($data_dir, $username, $number) { } // vim: et ts=4 -?> +?> \ No newline at end of file diff --git a/functions/folder_manip.php b/functions/folder_manip.php index 4b4708fd..186e32f3 100644 --- a/functions/folder_manip.php +++ b/functions/folder_manip.php @@ -25,14 +25,14 @@ function folders_checkname($imapConnection, $folder_name, $delimiter) { if (substr_count($folder_name, '"') || substr_count($folder_name, "\\") || substr_count($folder_name, $delimiter) || ($folder_name == '')) { - + global $color; error_box(_("Illegal folder name.") . "
\n" . - sprintf(_("The name may not contain any of the following: %s"), '" \\ '.$delimiter.'') - . "
\n" . - _("Please select a different name."). - '
'. - _("Click here to go back") . '.', $color); + sprintf(_("The name may not contain any of the following: %s"), '" \\ '.$delimiter.'') + . "
\n" . + _("Please select a different name."). + '
'. + _("Click here to go back") . '.', $color); sqimap_logout($imapConnection); exit; @@ -49,7 +49,7 @@ function folders_create ($imapConnection, $delimiter, $folder_name, $subfolder, global $folder_prefix; $folder_name = imap_utf7_encode_local($folder_name); - + if ( ! empty($contain_subs) ) { $folder_name = $folder_name . $delimiter; } @@ -83,7 +83,7 @@ function folders_rename_getname ($imapConnection, $delimiter, $old) { if ( $old == '' ) { plain_error_message(_("You have not selected a folder to rename. Please do so."). '
'._("Click here to go back").'.', $color); - sqimap_logout($imapConnection); + sqimap_logout($imapConnection); exit; } @@ -133,8 +133,8 @@ function folders_rename_getname ($imapConnection, $delimiter, $old) { '\n". '
'; echo "\n\n\n\n"; - - sqimap_logout($imapConnection); + + sqimap_logout($imapConnection); exit; } @@ -148,7 +148,7 @@ function folders_rename_do($imapConnection, $delimiter, $orig, $old_name, $new_n $orig = imap_utf7_encode_local($orig); $old_name = imap_utf7_encode_local($old_name); $new_name = imap_utf7_encode_local($new_name); - + if ($old_name != $new_name) { if (strpos($orig, $delimiter)) { @@ -214,7 +214,7 @@ function folders_delete_ask ($imapConnection, $folder_name) echo "\n\n\n\n"; - sqimap_logout($imapConnection); + sqimap_logout($imapConnection); exit; } @@ -224,7 +224,7 @@ function folders_delete_ask ($imapConnection, $folder_name) function folders_delete_do ($imapConnection, $delimiter, $folder_name) { require_once(SM_PATH . 'functions/tree.php'); - + $boxes = sqimap_mailbox_list ($imapConnection); global $delete_folder, $imap_server_type, $trash_folder, $move_to_trash; @@ -310,7 +310,7 @@ function folders_subscribe($imapConnection, $folder_names) '
'._("Click here to go back").'.', $color); sqimap_logout($imapConnection); exit; - + } } foreach ( $folder_names as $folder_name ) { @@ -342,4 +342,4 @@ function folders_unsubscribe($imapConnection, $folder_names) } -?> +?> \ No newline at end of file diff --git a/functions/forms.php b/functions/forms.php index 95fa1ced..24e00e91 100644 --- a/functions/forms.php +++ b/functions/forms.php @@ -20,7 +20,7 @@ function addInputField($type, $name = null, $value = null, $attributes = '', $id = null) { return '\n"; @@ -146,4 +146,4 @@ function addForm($action, $method = 'post', $name = '', $enctype = '', $charset $enctype . $name . $charset . ">\n"; } -?> +?> \ No newline at end of file diff --git a/functions/global.php b/functions/global.php index 35b9fcc0..21ff2a80 100644 --- a/functions/global.php +++ b/functions/global.php @@ -288,4 +288,4 @@ function sqsession_is_active() { } // vim: et ts=4 -?> +?> \ No newline at end of file diff --git a/functions/i18n.php b/functions/i18n.php index 32f6328d..1140b9f8 100644 --- a/functions/i18n.php +++ b/functions/i18n.php @@ -104,7 +104,7 @@ function sq_setlocale($category,$locale) { * * @param string $charset * @param string $string Text to be decoded - * @param boolean $force_decode converts string to html without $charset!=$default_charset check. + * @param boolean $force_decode converts string to html without $charset!=$default_charset check. * Argument is available since 1.5.1 and 1.4.5. * @return string decoded string */ @@ -294,15 +294,15 @@ function set_up_language($sm_language, $do_search = false, $default = false) { * If function is asked to detect preferred language * OR squirrelmail default language is set to empty string * AND - * squirrelmail language ($sm_language) is empty string + * squirrelmail language ($sm_language) is empty string * (not set in user's prefs and no cookie with language info) * AND * browser provides list of preferred languages * THEN * get preferred language from HTTP_ACCEPT_LANGUAGE header */ - if (($do_search || empty($squirrelmail_default_language)) && - ! $sm_language && + if (($do_search || empty($squirrelmail_default_language)) && + ! $sm_language && isset($accept_lang)) { // TODO: use more than one language, if first language is not available // FIXME: function assumes that string contains two or more characters. @@ -317,7 +317,7 @@ function set_up_language($sm_language, $do_search = false, $default = false) { * THEN * use default squirrelmail language value from configuration. */ - if ((!$sm_language||$default) && + if ((!$sm_language||$default) && ! empty($squirrelmail_default_language)) { $squirrelmail_language = $squirrelmail_default_language; $sm_language = $squirrelmail_default_language; @@ -441,18 +441,18 @@ function set_up_language($sm_language, $do_search = false, $default = false) { /** * mbstring.func_overload fix (#929644). * - * php mbstring extension can replace standard string functions with their multibyte + * php mbstring extension can replace standard string functions with their multibyte * equivalents. See http://www.php.net/ref.mbstring#mbstring.overload. * * Some SquirrelMail functions work with 8bit strings in bytes. If interface is forced * to use mbstring functions and mbstring internal encoding is set to multibyte charset, - * interface can't trust regular string functions. Due to mbstring overloading design + * interface can't trust regular string functions. Due to mbstring overloading design * limits php scripts can't control this setting. * * This hack should fix some issues related to 8bit strings in passwords. Correct fix is * to disable mbstring overloading. Japanese translation uses different internal encoding. */ - if ($squirrelmail_language != 'ja_JP' && + if ($squirrelmail_language != 'ja_JP' && function_exists('mb_internal_encoding') && check_php_version(4,2,0) && (int)ini_get('mbstring.func_overload')!=0) { diff --git a/functions/imap.php b/functions/imap.php index 1943e43e..95411699 100644 --- a/functions/imap.php +++ b/functions/imap.php @@ -24,4 +24,4 @@ require_once(SM_PATH . 'functions/date.php'); require_once(SM_PATH . 'functions/mailbox_display.php'); require_once(SM_PATH . 'functions/mime.php'); -?> +?> \ No newline at end of file diff --git a/functions/imap_asearch.php b/functions/imap_asearch.php index f8653dde..e74f7505 100644 --- a/functions/imap_asearch.php +++ b/functions/imap_asearch.php @@ -176,7 +176,7 @@ function asearch_unhtmlentities($string) { * @global bool imap_asearch_debug_dump * @param string $var_name * @param string $var_var - * @deprecated contains workarounds for 1.4.0 and older code. + * @deprecated contains workarounds for 1.4.0 and older code. * code without workarounds uses regular sm 1.4.2+ functions. * it is not compatible with 1.4.1 * @todo remove debugging function diff --git a/functions/imap_mailbox.php b/functions/imap_mailbox.php index c2799a2a..2d5fe2fb 100755 --- a/functions/imap_mailbox.php +++ b/functions/imap_mailbox.php @@ -126,7 +126,7 @@ function compact_mailboxes_response($ary) { * (LIST|LSUB) () (NIL|"") \r\n * mailbox name in quoted string MUST be unquoted and stripslashed (sm API) * - * Originally stored in functions/strings.php. Since 1.2.6 stored in + * Originally stored in functions/strings.php. Since 1.2.6 stored in * functions/imap_mailbox.php * @param string $line imap LIST/LSUB response line * @return string mailbox name @@ -167,11 +167,11 @@ function check_is_noinferiors ($lsub_line) { * separator character, returns the second last part of the full * mailbox name (i.e. the mailbox's parent mailbox) * - * Originally stored in functions/strings.php. Since 1.2.6 stored in + * Originally stored in functions/strings.php. Since 1.2.6 stored in * functions/imap_mailbox.php * @param string $haystack full mailbox name * @param string $needle delimiter - * @return string parent mailbox + * @return string parent mailbox */ function readMailboxParent($haystack, $needle) { if ($needle == '') { @@ -214,7 +214,7 @@ function isBoxBelow( $subbox, $parentbox ) { /** * Defines special mailboxes: given a mailbox name, it checks if this is a * "special" one: INBOX, Trash, Sent or Draft. - * + * * Since 1.2.5 function includes special_mailbox hook.
* Since 1.4.3 hook supports more than one plugin. * @param string $box mailbox name @@ -269,11 +269,11 @@ function isDraftMailbox($box) { /** * Expunges a mailbox - * + * * WARNING: Select mailbox before calling this function. - * - * permanently removes all messages that have the \Deleted flag - * set from the selected mailbox. See EXPUNGE command chapter in + * + * permanently removes all messages that have the \Deleted flag + * set from the selected mailbox. See EXPUNGE command chapter in * IMAP RFC. * @param stream $imap_stream imap connection resource * @param string $mailbox mailbox name (unused since 1.1.3). @@ -327,7 +327,7 @@ function sqimap_mailbox_exists ($imap_stream, $mailbox) { * Before 1.3.0 used more arguments and returned data depended on those argumements. * @param stream $imap_stream imap connection resource * @param string $mailbox mailbox name - * @return array results of select command (on success - permanentflags, flags and rights) + * @return array results of select command (on success - permanentflags, flags and rights) * @since 1.0 or older */ function sqimap_mailbox_select ($imap_stream, $mailbox) { @@ -367,10 +367,10 @@ function sqimap_mailbox_select ($imap_stream, $mailbox) { * Creates a folder. * * Mailbox is automatically subscribed. - * - * Set $type to string that does not match 'noselect' (case insensitive), - * if you don't want to prepend delimiter to mailbox name. Please note - * that 'noinferiors' might be used someday as keyword for folders + * + * Set $type to string that does not match 'noselect' (case insensitive), + * if you don't want to prepend delimiter to mailbox name. Please note + * that 'noinferiors' might be used someday as keyword for folders * that store only messages. * @param stream $imap_steam imap connection resource * @param string $mailbox mailbox name @@ -793,13 +793,13 @@ function sqimap_mailbox_list($imap_stream, $force=false) { /* Find INBOX's children */ for($k = 0; $k < $cnt; ++$k) { - if (!$used[$k] && isBoxBelow(strtolower($boxesall[$k]['unformatted']), 'inbox') && + if (!$used[$k] && isBoxBelow(strtolower($boxesall[$k]['unformatted']), 'inbox') && strtolower($boxesall[$k]['unformatted']) != 'inbox') { $boxesnew[] = $boxesall[$k]; $used[$k] = true; - } + } } - + /* Rest of the folders */ for($k = 0; $k < $cnt; $k++) { if (!$used[$k]) { diff --git a/functions/imap_messages.php b/functions/imap_messages.php index 952f2598..32cef7ee 100755 --- a/functions/imap_messages.php +++ b/functions/imap_messages.php @@ -962,4 +962,4 @@ function sqimap_get_message($imap_stream, $id, $mailbox) { return $msg; } -?> +?> \ No newline at end of file diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index 62f122c0..9f7b277a 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -1378,4 +1378,4 @@ function attachSelectedMessages($imapConnection,$aMsgHeaders) { return $composesession; } -?> +?> \ No newline at end of file diff --git a/functions/mime.php b/functions/mime.php index 478f4558..19c89e31 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -315,7 +315,7 @@ function translateText(&$body, $wrap_at, $charset) { * be displayed as the actual message in the HTML. It contains * everything needed, including HTML Tags, Attachments at the * bottom, etc. - * + * * Since 1.2.0 function uses message_body hook. * Till 1.3.0 function included output of formatAttachments(). * @@ -387,12 +387,12 @@ function formatBody($imap_stream, $message, $color, $wrap_at, $ent_num, $id, $ma /** * If we don't add html message between iframe tags, * we must detect unsafe images and modify $has_unsafe_images. - */ + */ $html_body = magicHTML($body, $id, $message, $mailbox); // creating iframe url $iframeurl=sqm_baseuri().'src/view_html.php?' - . 'mailbox=' . $urlmailbox + . 'mailbox=' . $urlmailbox . '&passed_id=' . $id . '&ent_id=' . $ent_num . '&view_unsafe_images=' . (int) $view_unsafe_images; @@ -401,9 +401,9 @@ function formatBody($imap_stream, $message, $color, $wrap_at, $ent_num, $id, $ma $body = html_tag('div',_("Viewing HTML formatted email"),'center'); /** - * height can't be set to 100%, because it does not work as expected when - * iframe is inside the table. Browsers do not create full height objects - * even when iframe is not nested. Maybe there is some way to get full size + * height can't be set to 100%, because it does not work as expected when + * iframe is inside the table. Browsers do not create full height objects + * even when iframe is not nested. Maybe there is some way to get full size * with CSS. Tested in firefox 1.02 and opera 7.53 * * width="100%" does not work as expected, when table width is not set (automatic) @@ -415,9 +415,9 @@ function formatBody($imap_stream, $message, $color, $wrap_at, $ent_num, $id, $ma .' frameborder="1" marginwidth="0" marginheight="0" scrolling="auto">' . "\n"; // Message for browsers without iframe support - //$body.= _("Your browser does not support inline frames. + //$body.= _("Your browser does not support inline frames. // You can view HTML formated message by following below link."); - //$body.= "
"._("View HTML Message").""; + //$body.= "
"._("View HTML Message").""; // if browser can't render iframe, it renders html message. $body.= $html_body; @@ -426,7 +426,7 @@ function formatBody($imap_stream, $message, $color, $wrap_at, $ent_num, $id, $ma $body.="\n"; } else { // old way of html rendering - $body = magicHTML($body, $id, $message, $mailbox); + $body = magicHTML($body, $id, $message, $mailbox); } } else { translateText($body, $wrap_at, @@ -472,7 +472,7 @@ function formatBody($imap_stream, $message, $color, $wrap_at, $ent_num, $id, $ma * Since 1.0.2 uses attachment $type0/$type1 hook. * Since 1.2.5 uses attachment $type0/* hook. * Since 1.5.0 uses attachments_bottom hook. - * + * * @param object $message SquirrelMail message object * @param array $exclude_id message parts that are not attachments. * @param string $mailbox mailbox name @@ -568,9 +568,9 @@ function formatAttachments($message, $exclude_id, $mailbox, $id) { } else { $attachments .= '  |  '; } - $attachments .= '' - . (isset($val['text']) && !empty($val['text']) ? $val['text'] : '') - . (isset($val['extra']) && !empty($val['extra']) ? $val['extra'] : '') + $attachments .= '' + . (isset($val['text']) && !empty($val['text']) ? $val['text'] : '') + . (isset($val['extra']) && !empty($val['extra']) ? $val['extra'] : '') . ''; } unset($links); @@ -1654,7 +1654,7 @@ function sq_cid2http($message, $id, $cidurl, $mailbox){ } } } - + if (!empty($linkurl)) { $httpurl = $quotchar . SM_PATH . 'src/download.php?absolute_dl=true&' . "passed_id=$id&mailbox=" . urlencode($mailbox) . @@ -1666,7 +1666,7 @@ function sq_cid2http($message, $id, $cidurl, $mailbox){ */ $httpurl = $quotchar . SM_PATH . 'images/blank.png'; } - + return $httpurl; } @@ -2073,14 +2073,14 @@ function magicHTML($body, $id, $message, $mailbox = 'INBOX', $take_mailto_links if ((preg_match_all($MailTo_PReg_Match, $trusted, $regs)) && ($regs[0][0] != '')) { foreach ($regs[0] as $i => $mailto_before) { $mailto_params = $regs[10][$i]; - + // get rid of any tailing quote since we have to add send_to to the end // if (substr($mailto_before, strlen($mailto_before) - 1) == '"') $mailto_before = substr($mailto_before, 0, strlen($mailto_before) - 1); if (substr($mailto_params, strlen($mailto_params) - 1) == '"') $mailto_params = substr($mailto_params, 0, strlen($mailto_params) - 1); - + if ($regs[1][$i]) { //if there is an email addr before '?', we need to merge it with the params $to = 'to=' . $regs[1][$i]; if (strpos($mailto_params, 'to=') > -1) //already a 'to=' @@ -2092,9 +2092,9 @@ function magicHTML($body, $id, $message, $mailbox = 'INBOX', $take_mailto_links $mailto_params .= '?' . $to; } } - + $url_str = preg_replace(array('/to=/i', '/(?\n\n"; } -?> +?> \ No newline at end of file diff --git a/functions/strings.php b/functions/strings.php index 970ee5fb..de9ae871 100644 --- a/functions/strings.php +++ b/functions/strings.php @@ -1248,4 +1248,4 @@ function sq_strtoupper($string,$charset='auto') { return strtoupper($string); } $PHP_SELF = php_self(); -?> +?> \ No newline at end of file diff --git a/functions/url_parser.php b/functions/url_parser.php index 2a6da667..b0c6867e 100644 --- a/functions/url_parser.php +++ b/functions/url_parser.php @@ -223,4 +223,4 @@ function getEmail($string) { return (array_key_exists(0, $addresses) ? $addresses[0] : ''); } -?> +?> \ No newline at end of file diff --git a/include/options/display.php b/include/options/display.php index ba6cbdb7..31c5122f 100644 --- a/include/options/display.php +++ b/include/options/display.php @@ -430,4 +430,4 @@ function icon_theme_save($option) { } -?> +?> \ No newline at end of file diff --git a/plugins/administrator/defines.php b/plugins/administrator/defines.php index b8cc5d00..e3ccb4b3 100644 --- a/plugins/administrator/defines.php +++ b/plugins/administrator/defines.php @@ -370,4 +370,4 @@ $defcfg = array( '$config_version' => array( 'name' => _("Config File Version"), ); -?> +?> \ No newline at end of file diff --git a/plugins/administrator/options.php b/plugins/administrator/options.php index 3c0313cd..af2da682 100644 --- a/plugins/administrator/options.php +++ b/plugins/administrator/options.php @@ -462,7 +462,7 @@ foreach ( $newcfg as $k => $v ) { break; case SMOPT_TYPE_PATH: if ( sqgetGlobalVar($e, $new_v, SQ_POST) ) { - // FIXME: fix use of $data_dir in $attachment_dir + // FIXME: fix use of $data_dir in $attachment_dir $v = change_to_sm_path($new_v); $newcfg[$k] = $v; } diff --git a/plugins/bug_report/setup.php b/plugins/bug_report/setup.php index 05ef6e7f..f4797fdc 100644 --- a/plugins/bug_report/setup.php +++ b/plugins/bug_report/setup.php @@ -87,4 +87,4 @@ function bug_report_options() { echo ' /> ' . _("Show button in toolbar") . "\n"; } -?> +?> \ No newline at end of file diff --git a/plugins/bug_report/system_specs.php b/plugins/bug_report/system_specs.php index 5783e3e7..311dee76 100644 --- a/plugins/bug_report/system_specs.php +++ b/plugins/bug_report/system_specs.php @@ -60,7 +60,7 @@ function br_show_plugins() { } } // compatibility plugin can be used without need to enable it in sm config - if (file_exists(SM_PATH . 'plugins/compatibility/setup.php') + if (file_exists(SM_PATH . 'plugins/compatibility/setup.php') && ! in_array('compatibility',$plugins)) { $str.= ' * compatibility'; include_once(SM_PATH . 'plugins/compatibility/setup.php'); diff --git a/plugins/filters/filters.php b/plugins/filters/filters.php index be2c1a05..c326a1f5 100644 --- a/plugins/filters/filters.php +++ b/plugins/filters/filters.php @@ -43,7 +43,7 @@ function filters_init_hooks () { function filters_optpage_register_block() { global $optpage_blocks, $AllowSpamFilters; if (!file_exists(SM_PATH . 'plugins/filters/config.php')) return; - + $optpage_blocks[] = array( 'name' => _("Message Filters"), 'url' => SM_PATH . 'plugins/filters/options.php', @@ -164,9 +164,9 @@ function filters_bulkquery($filters, $IPs) { function start_filters() { global $imapServerAddress, $imapPort, $imap_stream, $imapConnection, $UseSeparateImapConnection, $AllowSpamFilters; - + if (!file_exists(SM_PATH . 'plugins/filters/config.php')) return; - + sqgetGlobalVar('username', $username, SQ_SESSION); sqgetGlobalVar('key', $key, SQ_COOKIE); @@ -231,7 +231,7 @@ function user_filters($imap_stream) { $filters[$i]['what'], $filters[$i]['folder'], $filters_user_scan, $expunge); } else if ($filters[$i]['where'] == 'Message Body') { $expunge = filter_search_and_delete($imap_stream, 'BODY', - $filters[$i]['what'], $filters[$i]['folder'], $filters_user_scan, $expunge); + $filters[$i]['what'], $filters[$i]['folder'], $filters_user_scan, $expunge); } else { /* * If it's a normal TO, CC, SUBJECT, or FROM, then handle it @@ -254,7 +254,7 @@ function user_filters($imap_stream) { * @param string $what String to search for * @param string $where_to Folder it will move to * @param string $user_scan Whether to search all or just unseen - * @param string $should_expunge + * @param string $should_expunge * @param boolean $where Which part of location to search * @access private */ @@ -800,7 +800,7 @@ function remove_filter ($id) { /** * Swaps two filters * @param int $id1 ID of first filter to swap - * @param int $id2 ID of second filter to swap + * @param int $id2 ID of second filter to swap * @access private */ function filter_swap($id1, $id2) { @@ -823,7 +823,7 @@ function filter_swap($id1, $id2) { function update_for_folder ($args) { if (!file_exists(SM_PATH . 'plugins/filters/config.php')) return; - + $old_folder = $args[0]; $new_folder = $args[2]; $action = $args[1]; diff --git a/plugins/mail_fetch/fetch.php b/plugins/mail_fetch/fetch.php index bb58e773..2bb9d2d4 100644 --- a/plugins/mail_fetch/fetch.php +++ b/plugins/mail_fetch/fetch.php @@ -178,7 +178,7 @@ sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION); $imap_stream = sqimap_login($username, $key, $imapServerAddress, $imapPort, 10); // check if destination folder is not set, is not subscribed and is not \noselect folder - if($mailfetch_subfolder == '' || + if($mailfetch_subfolder == '' || ! mail_fetch_check_folder($imap_stream,$mailfetch_subfolder)) { $mailfetch_subfolder = 'INBOX'; } diff --git a/plugins/mail_fetch/functions.php b/plugins/mail_fetch/functions.php index f352a112..e26eae68 100644 --- a/plugins/mail_fetch/functions.php +++ b/plugins/mail_fetch/functions.php @@ -118,7 +118,7 @@ function mail_fetch_check_folder($imap_stream,$imap_folder) { /** * Checks if folder is noselect (can't store messages) - * + * * Function does not check if folder subscribed. * @param stream $imap_stream imap connection resource * @param string $imap_folder imap folder name diff --git a/plugins/mail_fetch/setup.php b/plugins/mail_fetch/setup.php index 0380eb2f..e059787f 100644 --- a/plugins/mail_fetch/setup.php +++ b/plugins/mail_fetch/setup.php @@ -177,9 +177,9 @@ function mail_fetch_login() { while (list($lineNum, $line) = each ($MessArray)) { $Message .= $line; } - + // check if mail folder is not null and subscribed (There is possible issue with /noselect mail folders) - if ($mailfetch_subfolder=='' || + if ($mailfetch_subfolder=='' || ! mail_fetch_check_folder($imap_stream,$mailfetch_subfolder)) { fputs($imap_stream, "A3$i APPEND INBOX {" . strlen($Message) . "}\r\n"); } else { diff --git a/plugins/message_details/message_details_bottom.php b/plugins/message_details/message_details_bottom.php index e2e93551..1948c61b 100644 --- a/plugins/message_details/message_details_bottom.php +++ b/plugins/message_details/message_details_bottom.php @@ -46,7 +46,7 @@ if (!empty($md_action)) /** * Converts 8bit string to hex * - * Replaces 8bit symbols with their hex strings, + * Replaces 8bit symbols with their hex strings, * encloses them in curly brackets and uses different color. * @param string $string text * @return string @@ -115,8 +115,8 @@ function returnTime($start) { * Returns actual message details * @param string $mailbox * @param string $passed_id - * @param boolean $stripHTML If TRUE, only plain text is returned, - * default is FALSE, wherein output contains + * @param boolean $stripHTML If TRUE, only plain text is returned, + * default is FALSE, wherein output contains * pretty-HTMLification of message body * @return string The formatted message details * @access public @@ -402,11 +402,11 @@ if (!$stripHTML) { $returnValue .= $message_body; -if (!$stripHTML) +if (!$stripHTML) $returnValue .= ''; return $returnValue; } -?> +?> \ No newline at end of file diff --git a/plugins/message_details/message_details_main.php b/plugins/message_details/message_details_main.php index ca53778f..47257c2d 100644 --- a/plugins/message_details/message_details_main.php +++ b/plugins/message_details/message_details_main.php @@ -34,4 +34,4 @@ echo ''; echo ''."\n"."\n"; -?> +?> \ No newline at end of file diff --git a/plugins/message_details/message_details_top.php b/plugins/message_details/message_details_top.php index 0baae888..99b95a40 100644 --- a/plugins/message_details/message_details_top.php +++ b/plugins/message_details/message_details_top.php @@ -46,4 +46,4 @@ echo "'. ''. "\n"; -?> +?> \ No newline at end of file diff --git a/plugins/newmail/functions.php b/plugins/newmail/functions.php index ecb41ecd..c33b876b 100644 --- a/plugins/newmail/functions.php +++ b/plugins/newmail/functions.php @@ -421,7 +421,7 @@ function newmail_media_objects($object,$types,$path,$args=array(),$extra='',$add if (isset($newmail_mediacompat_mode) && $newmail_mediacompat_mode) $ret.= newmail_media_embed($object,$types[0],$path,$args,$addsuffix); - // add $extra code inside objects + // add $extra code inside objects if ($extra!='') $ret.=$extra . "\n"; @@ -552,7 +552,7 @@ function newmail_media_object_ie($object,$type,$path,$args=array(),$addsuffix) { /** * Creates embed tags of multimedia object - * + * * docs about embed * Apple: http://www.apple.com/quicktime/authoring/embed.html * @@ -597,7 +597,7 @@ function newmail_media_embed($object,$type,$path,$args=array(),$addsuffix=true) case SM_NEWMAIL_FILETYPE_MP3: case SM_NEWMAIL_FILETYPE_SVG: default: - $ret_embed=''; + $ret_embed=''; } return $ret_embed; } @@ -605,7 +605,7 @@ function newmail_media_embed($object,$type,$path,$args=array(),$addsuffix=true) /** * Adds closing tags for ie object * Warning: - * * This is internal function, use newmail_media_objects() instead + * * This is internal function, use newmail_media_objects() instead * @param integer $type media object type * @return string closing tag of media object */ @@ -620,7 +620,7 @@ function newmail_media_object_ie_close($type) { case SM_NEWMAIL_FILETYPE_OGG: case SM_NEWMAIL_FILETYPE_SVG: default: - $ret_end=''; + $ret_end=''; } return $ret_end; } @@ -628,7 +628,7 @@ function newmail_media_object_ie_close($type) { /** * Adds closing tags for object * Warning: - * * This is internal function, use newmail_media_objects() instead + * * This is internal function, use newmail_media_objects() instead * @param integer $type media object type * @return string closing tag of media object */ @@ -643,7 +643,7 @@ function newmail_media_object_close($type) { $ret_end="\n"; break; default: - $ret_end=''; + $ret_end=''; } return $ret_end; } @@ -651,7 +651,7 @@ function newmail_media_object_close($type) { /** * Adds closing tags for object * Warning: - * * This is internal function, use newmail_media_objects() instead + * * This is internal function, use newmail_media_objects() instead * @param integer $type media object type * @return string closing tag of media object */ @@ -666,7 +666,7 @@ function newmail_media_embed_close($type) { case SM_NEWMAIL_FILETYPE_MP3: case SM_NEWMAIL_FILETYPE_SVG: default: - $ret_end=''; + $ret_end=''; } return $ret_end; } @@ -675,14 +675,14 @@ function newmail_media_embed_close($type) { * Converts media attributes to string * Warning: * * attribute values are automatically sanitized by htmlspecialchars() - * * This is internal function, use newmail_media_objects() instead + * * This is internal function, use newmail_media_objects() instead * @param array $args array with object attributes * @return string string with object attributes */ function newmail_media_prepare_args($args) { $ret_args=''; foreach ($args as $arg => $value) { - $ret_args.= $arg . '="' . htmlspecialchars($value) . '" '; + $ret_args.= $arg . '="' . htmlspecialchars($value) . '" '; } return $ret_args; } diff --git a/plugins/newmail/loadfile.php b/plugins/newmail/loadfile.php index 8a32ab13..16538c26 100644 --- a/plugins/newmail/loadfile.php +++ b/plugins/newmail/loadfile.php @@ -9,7 +9,7 @@ */ /** - * define SM_PATH + * define SM_PATH * @ignore */ define('SM_PATH','../../'); @@ -25,7 +25,7 @@ global $data_dir; $media = getPref($data_dir,$username,'newmail_media', '(none)'); // get other prefs $newmail_userfile_type=getPref($data_dir,$username,'newmail_userfile_type',false); - + $newmail_userfile_location=getHashedFile($username, $data_dir, $username . '.sound'); if ($newmail_userfile_type!=false && file_exists($newmail_userfile_location)) { diff --git a/plugins/newmail/newmail_opt.php b/plugins/newmail/newmail_opt.php index f028ec60..d45a4a1e 100644 --- a/plugins/newmail/newmail_opt.php +++ b/plugins/newmail/newmail_opt.php @@ -105,14 +105,14 @@ echo 'name="media_popup" /> ('._("requires JavaScript to work").')' . ' (' . _("If set to 0, reverts to default value") . ')','left') . "\n"; echo html_tag( 'tr' ) . html_tag('td',_("Height of popup window:"),'right','', 'style="white-space: nowrap;"') - . html_tag('td','' . ' (' . _("If set to 0, reverts to default value") . ')','left') . "\n"; diff --git a/plugins/squirrelspell/setup.php b/plugins/squirrelspell/setup.php index 54a277e6..a30c5481 100644 --- a/plugins/squirrelspell/setup.php +++ b/plugins/squirrelspell/setup.php @@ -84,4 +84,4 @@ function squirrelspell_setup() { "\n"; } } -?> +?> \ No newline at end of file diff --git a/src/about.php b/src/about.php index 23ab8fdc..6602325b 100644 --- a/src/about.php +++ b/src/about.php @@ -56,7 +56,7 @@ echo "
\n
\n"; echo sprintf(_("SquirrelMail is a feature rich, standards compliant webmail application written in PHP. It was made by a group of volunteers united in the SquirrelMail Project Team and is released as open source, free software under the %sGNU General Public License%s."),'',''); // add space between two sentences. -// Don't want to join two sprintf strings. +// Don't want to join two sprintf strings. echo ' '; // i18n: %s tags are used in order to remove html URL attributes from translation @@ -89,4 +89,4 @@ if ( count ($plugins) > 0 ) { © 1999 - 2005 The SquirrelMail Project Team

- + \ No newline at end of file diff --git a/src/addrbook_popup.php b/src/addrbook_popup.php index 44ebfb1a..02452549 100644 --- a/src/addrbook_popup.php +++ b/src/addrbook_popup.php @@ -42,4 +42,4 @@ require_once(SM_PATH . 'functions/addressbook.php'); border="0" src="addrbook_search.php?show=blank" /> - + \ No newline at end of file diff --git a/src/addrbook_search_html.php b/src/addrbook_search_html.php index 98cc26f3..f8118364 100644 --- a/src/addrbook_search_html.php +++ b/src/addrbook_search_html.php @@ -158,8 +158,8 @@ if ($javascript_on) { html_tag( 'td', ' ' . - '', + '', 'center', '', 'colspan="'. $td_colspan .'"' ) ) . '' . @@ -307,4 +307,4 @@ if ($addrquery == '' || sizeof($res) == 0) { } ?> - + \ No newline at end of file diff --git a/src/addressbook.php b/src/addressbook.php index 9f4c08b8..753cd2ca 100644 --- a/src/addressbook.php +++ b/src/addressbook.php @@ -193,8 +193,8 @@ if(sqgetGlobalVar('REQUEST_METHOD', $req_method, SQ_SERVER) && $req_method == 'P } } else { /** - * $editaddr is set, but $sel (address selection in address listing) - * and $doedit (address edit form) are not set. + * $editaddr is set, but $sel (address selection in address listing) + * and $doedit (address edit form) are not set. * Assume that user clicked on "Edit address" without selecting any address. */ $formerror = _("Please select address that you want to edit"); diff --git a/src/configtest.php b/src/configtest.php index 2c7cfeab..8e727d3e 100644 --- a/src/configtest.php +++ b/src/configtest.php @@ -79,7 +79,7 @@ if(!in_array('strings.php', $included)) { if (! $allow_remote_configtest) { sqGetGlobalVar('REMOTE_ADDR',$client_ip,SQ_SERVER); if (! isset($client_ip) || $client_ip!='127.0.0.1') { - do_err('Enable "Allow remote configtest" option in squirrelmail configuration in order to use this script.'); + do_err('Enable "Allow remote configtest" option in squirrelmail configuration in order to use this script.'); } } /* checking PHP specs */ @@ -206,12 +206,12 @@ echo $IND . "Themes OK.
\n"; if ( $squirrelmail_default_language != 'en_US' ) { $loc_path = SM_PATH .'locale/'.$squirrelmail_default_language.'/LC_MESSAGES/squirrelmail.mo'; if( ! file_exists( $loc_path ) ) { - do_err('You have set ' . $squirrelmail_default_language . + do_err('You have set ' . $squirrelmail_default_language . ' as your default language, but I cannot find this translation (should be '. 'in ' . $loc_path . '). Please note that you have to download translations '. 'separately from the main SquirrelMail package.', FALSE); } elseif ( ! is_readable( $loc_path ) ) { - do_err('You have set ' . $squirrelmail_default_language . + do_err('You have set ' . $squirrelmail_default_language . ' as your default language, but I cannot read this translation (file '. 'in ' . $loc_path . ' unreadable).', FALSE); } else { @@ -486,7 +486,4 @@ if( empty($ldap_server) ) {

Login now

- - + \ No newline at end of file diff --git a/src/empty_trash.php b/src/empty_trash.php index 84a36ceb..0faf3109 100644 --- a/src/empty_trash.php +++ b/src/empty_trash.php @@ -76,4 +76,4 @@ session_write_close(); $location = get_location(); header ("Location: $location/left_main.php"); -?> +?> \ No newline at end of file diff --git a/src/folders.php b/src/folders.php index aad2cccf..930148af 100644 --- a/src/folders.php +++ b/src/folders.php @@ -99,7 +99,7 @@ if ( sqgetGlobalVar('smaction', $action, SQ_POST) ) { folders_unsubscribe($imapConnection, $folder_names); $td_str = _("Unsubscribed successfully."); break; - } + } // if there are any messages, output them. if ( !empty($td_str) ) { @@ -293,7 +293,7 @@ if ($show_only_subscribed_folders) { echo addForm('folders.php') . addHidden('smaction', 'unsubscribe') . "