Remove unused globals
authorcigamit <cigamit@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 31 Oct 2004 23:24:09 +0000 (23:24 +0000)
committercigamit <cigamit@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 31 Oct 2004 23:24:09 +0000 (23:24 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@8293 7612ce4b-ef26-0410-bec9-ea0150e637f0

30 files changed:
class/mime.class.php
class/mime/MessageHeader.class.php
class/mime/Rfc822Header.class.php
class/mime/SMimeMessage.class.php
functions/attachment_common.php
functions/imap_general.php
functions/imap_mailbox.php
functions/imap_messages.php
functions/imap_search.php
functions/mime.php
functions/options.php
functions/page_header.php
functions/prefs.php
include/options/display.php
plugins/administrator/setup.php
plugins/bug_report/setup.php
plugins/calendar/calendar.php
plugins/change_password/backend/merak.php
plugins/filters/filters.php
plugins/info/functions.php
plugins/message_details/setup.php
plugins/newmail/setup.php
plugins/sent_subfolders/setup.php
plugins/spamcop/setup.php
plugins/spamcop/spamcop.php
plugins/squirrelspell/sqspell_options.php
plugins/translate/functions.php
src/compose.php
src/left_main.php
src/read_body.php

index 62c2ebaed54b384e75ddf03f8d52812828d4ebdf..40e6ffb0029edf9cdafabdfd53ea929cc1c719de 100644 (file)
@@ -22,4 +22,4 @@ require_once(SM_PATH . 'class/mime/Disposition.class.php');
 require_once(SM_PATH . 'class/mime/Language.class.php');
 require_once(SM_PATH . 'class/mime/ContentType.class.php');
 
-?>
+?>
\ No newline at end of file
index a06cb387c351dd9c1272ace5423c1cc287965d80..d8cc46c03c35bcd308fd4b137685c8cfb50ed9a4 100644 (file)
@@ -51,4 +51,4 @@ class MessageHeader {
     }
 }
 
-?>
+?>
\ No newline at end of file
index 40b93913f0b15c9e6dedd7f68208de305539f2ed..921b22ccdf9fc4ba2bceef4d7942e02263347574 100644 (file)
@@ -753,4 +753,4 @@ class Rfc822Header {
     }
 }
 
-?>
+?>
\ No newline at end of file
index 459471cf2e49fa8721bd15b8d980ab4f4019ac67..819905ed43ba4b79fca2e6a4ffcc3105b36eed35 100644 (file)
@@ -20,4 +20,4 @@ class SMimeMessage {
 
 }
 
-?>
+?>
\ No newline at end of file
index a26553e9fa5c40e1550dc3447304eddf1a52774e..8b8a7ef2cf76088430fb2137c69f946ad67a6af8 100644 (file)
@@ -146,7 +146,7 @@ function attachment_common_link_html(&$Args) {
 }
 
 function attachment_common_link_image(&$Args) {
-    global $attachment_common_show_images, $attachment_common_show_images_list;
+    global $attachment_common_show_images_list;
 
     sqgetGlobalVar('QUERY_STRING', $QUERY_STRING, SQ_SERVER);
 
index f3c1ffaa28ac7610797b59f50acda6aca67a02e4..0a70f685f36fcc8bd0eb7581808494531c3dce90 100755 (executable)
@@ -548,7 +548,7 @@ function sqimap_read_data ($imap_stream, $tag_uid, $handle_errors,
  * @return imap-stream resource identifier
  */
 function sqimap_create_stream($server,$port,$tls=false) {
-    global $username, $use_imap_tls, $squirrelmail_language;
+    global $squirrelmail_language;
 
     if ($tls == true) {
         if ((check_php_version(4,3)) and (extension_loaded('openssl'))) {
index 5eb359e44e5d137ffe841deb3481a61889c9a864..ce3503e62117ce66f9193741b4400cf98cb3b6ca 100755 (executable)
@@ -749,7 +749,7 @@ function sqimap_mailbox_list_all($imap_stream) {
 }
 
 function sqimap_mailbox_tree($imap_stream) {
-    global $default_folder_prefix, $unseen_notify, $unseen_type;
+    global $default_folder_prefix;
     if (true) {
         global $data_dir, $username, $list_special_folders_first,
                $folder_prefix, $delimiter, $trash_folder, $move_to_trash,
index 2a0e4e537553e0fd32116304096cbb6e7e8cf0ef..6a6c076707976f4d91afda086ed6df1a56922a06 100755 (executable)
@@ -131,8 +131,7 @@ function sqimap_message_list_squisher($messages_array) {
  * @return array $id sorted uid list
  */
 function sqimap_get_sort_order($imap_stream, $sSortField, $reverse, $search='ALL') {
-    global  $default_charset,
-            $sent_folder;
+    global  $default_charset;
 
     $id = array();
     $sort_test = array();
@@ -936,7 +935,7 @@ function sqimap_messages_copy($imap_stream, $start, $end, $mailbox) {
  * Deprecated !!!!!!! DO NOT USE THIS, use sqimap_msgs_list_delete instead
  */
 function sqimap_messages_delete($imap_stream, $start, $end, $mailbox, $bypass_trash=false) {
-    global $move_to_trash, $trash_folder, $auto_expunge;
+    global $move_to_trash, $trash_folder;
 
     if (($move_to_trash == true) && ($bypass_trash != true) &&
         (sqimap_mailbox_exists($imap_stream, $trash_folder) && ($mailbox != $trash_folder))) {
index 7995b30a4e43bb0cfc517c3168eb9aa72796bd08..90f288a9a7c6ada896afad89d9967b641a3ce847 100644 (file)
@@ -24,9 +24,8 @@ require_once(SM_PATH . 'functions/mime.php');
 function sqimap_search($imapConnection, $search_where, $search_what, $mailbox,
                        $color, $search_position = '', $search_all, $count_all) {
 
-    global $message_highlight_list, $squirrelmail_language, $languages,
-           $index_order, $pos, $allow_charset_search,
-          $imap_server_type;
+    global $squirrelmail_language, $languages, $pos, $allow_charset_search,
+              $imap_server_type;
 
     $pos = $search_position;
 
index f411393b0a0008abb8c83b47cc337225ddb4e116..c43b9c7788f156a43b57ed924784dc59f5075e72 100644 (file)
@@ -341,9 +341,8 @@ function formatBody($imap_stream, $message, $color, $wrap_at, $ent_num, $id, $ma
      * primary message. To add more of them, just put them in the
      * order that is their priority.
      */
-    global $startMessage, $username, $key, $imapServerAddress, $imapPort,
+    global $startMessage, $languages, $squirrelmail_language,
            $show_html_default, $sort, $has_unsafe_images, $passed_ent_id;
-    global $languages, $squirrelmail_language;
 
     if( !sqgetGlobalVar('view_unsafe_images', $view_unsafe_images, SQ_GET) ) {
         $view_unsafe_images = false;
@@ -422,7 +421,6 @@ function formatBody($imap_stream, $message, $color, $wrap_at, $ent_num, $id, $ma
 
 function formatAttachments($message, $exclude_id, $mailbox, $id) {
     global $where, $what, $startMessage, $color, $passed_ent_id;
-    static $ShownHTML = 0;
 
     $att_ar = $message->getAttachments($exclude_id);
 
index 93783a6d727827f682872741fdf468c16c2d2020..8416b5f6e7e935c465c01faee70bfbb6855618d8 100644 (file)
@@ -154,7 +154,7 @@ class SquirrelOption {
     }
 
     function createHTMLWidget() {
-        global $javascript_on, $color;
+        global $color;
 
         // Use new value if available
         if (!empty($this->new_value)) {
index 5ed8469ea4f4cad6d6e1e5afab99c0e0fba38547..b193b73f9021123261e4d731d3f826bdb11ea92e 100644 (file)
@@ -124,9 +124,8 @@ function displayPageHeader($color, $mailbox, $xtra='', $session=false) {
 
     global $hide_sm_attributions, $PHP_SELF, $frame_top,
            $compose_new_win, $compose_width, $compose_height,
-           $attachemessages, $provider_name, $provider_uri,
-           $javascript_on, $default_use_mdn, $mdn_user_support,
-           $startMessage;
+           $provider_name, $provider_uri, $startMessage,
+           $javascript_on, $default_use_mdn, $mdn_user_support;
 
     sqgetGlobalVar('base_uri', $base_uri, SQ_SESSION );
     sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION );
@@ -371,7 +370,7 @@ function compose_Header($color, $mailbox) {
      * Locate the first displayable form element (only when JavaScript on)
      */
     if($javascript_on) {
-        global $delimiter, $base_uri, $PHP_SELF, $data_dir, $username;
+        global $base_uri, $PHP_SELF, $data_dir, $username;
 
         $module = substr( $PHP_SELF, ( strlen( $PHP_SELF ) - strlen( $base_uri ) ) * -1 );
 
index aaa12f0378b4ead34dcb38d4b72033c8c3d3c96f..7fe2af27f11fbb073373a76e54c744f4d3f50450 100644 (file)
@@ -47,7 +47,6 @@ if (isset($prefs_backend) && file_exists(SM_PATH . $prefs_backend)) {
  * @return string the hashed location of datafile
  */
 function getHashedFile($username, $dir, $datafile, $hash_search = true) {
-    global $dir_hash_level;
 
     /* Remove trailing slash from $dir if found */
     if (substr($dir, -1) == '/') {
index 23fef7573d31a0467c8aede245cf4a2f39642687..cf00a711c75f8748a87ad6e491268cfdce1b1afb 100644 (file)
@@ -47,9 +47,9 @@ if ($use_icons) {
  * @return array all option information
  */
 function load_optpage_data_display() {
-    global $theme, $language, $languages, $js_autodetect_results, $javascript_setting,
-    $compose_new_win, $default_use_mdn, $squirrelmail_language, $allow_thread_sort,
-    $optmode, $show_alternative_names, $available_languages, $use_icons;
+    global $theme, $language, $languages, 
+    $default_use_mdn, $squirrelmail_language, $allow_thread_sort,
+    $show_alternative_names, $available_languages, $use_icons;
 
     /* Build a simple array into which we will build options. */
     $optgrps = array();
@@ -491,8 +491,6 @@ function save_option_theme($option) {
  * This function saves the javascript detection option.
  */
 function save_option_javascript_autodetect($option) {
-    global $data_dir, $username;
-
     save_option($option);
     checkForJavascript(TRUE);
 }
@@ -519,7 +517,6 @@ function icon_theme_save($option) {
  * This function saves the reply prefix (body_quote) character(s)
  */
 function save_option_reply_prefix($option) {
-    global $data_dir, $username, $new_javascript_setting;
 
     // save as "NONE" if it was blanked out
     //
index 88f24d148e8a771c36012ba69b07b9fb0a657b6c..128cea5ae0ac5ce1f0038b85cbc9b03b81c5fd4a 100644 (file)
@@ -20,7 +20,7 @@ require_once(SM_PATH . 'plugins/administrator/auth.php');
  * @access private
  */
 function squirrelmail_plugin_init_administrator() {
-    global $squirrelmail_plugin_hooks, $username;
+    global $squirrelmail_plugin_hooks;
 
     if ( adm_check_user() ) {        
         $squirrelmail_plugin_hooks['optpage_register_block']['administrator'] =
index 1c66c675939e3d51abb47e62f08fbe6257383e54..5c8bb4590c81d2ea318a5fb9eb0bc9a058dcb5da 100644 (file)
@@ -37,7 +37,7 @@ function squirrelmail_plugin_init_bug_report() {
  * @access private
  */
 function bug_report_button() {
-    global $color, $bug_report_visible;
+    global $bug_report_visible;
 
     if (! $bug_report_visible) {
         return;
index 098ef0004caaf62474f7cfcc4ab75aeb6f56d8b2..9c78338cf95ce4e63f95187b00e658446ec52a16 100644 (file)
@@ -50,7 +50,7 @@ if (isset($_POST['month'])) {
 
 //display upper part of month calendar view
 function startcalendar() {
-    global $year, $month, $day, $color;
+    global $year, $month, $color;
 
     $prev_date = mktime(0, 0, 0, $month - 1, 1, $year);
     $act_date  = mktime(0, 0, 0, $month, 1, $year);
index 7329e318aaed132608a21792d4bea0aabfddaa40..5bcd69eb07eab89e4ae203964d1e1b2e3fe4a624 100644 (file)
@@ -49,7 +49,7 @@ function cpw_merak_dochange($data)
 
    $msgs = array();
 
-   global $merak_url, $merak_selfpage, $merak_action, $use_ssl_for_password_change, $debug;
+   global $merak_url, $merak_selfpage, $merak_action;
 
    if (!function_exists('curl_init')) {
 
index 1a04ce27520f641e641a8a0ec6b80c60cf4f02aa..135cfda33fa64d195739c8ff089922998995a2c9 100644 (file)
@@ -84,7 +84,7 @@ function filters_LoadCache () {
  * @access private
  */
 function filters_bulkquery($filters, $IPs) {
-    global $SpamFilters_YourHop, $attachment_dir, $username,
+    global $attachment_dir, $username,
            $SpamFilters_DNScache, $SpamFilters_BulkQuery,
            $SpamFilters_CacheTTL;
 
@@ -125,8 +125,7 @@ function filters_bulkquery($filters, $IPs) {
  * @access private
  */
 function start_filters() {
-    global $mailbox, $imapServerAddress, $imapPort, $imap,
-           $imap_general, $filters, $imap_stream, $imapConnection,
+    global $imapServerAddress, $imapPort, $imap_stream, $imapConnection,
            $UseSeparateImapConnection, $AllowSpamFilters;
 
     sqgetGlobalVar('username', $username, SQ_SESSION);
@@ -758,7 +757,7 @@ function update_for_folder ($args) {
     $old_folder = $args[0];
         $new_folder = $args[2];
         $action = $args[1];
-    global $plugins, $data_dir, $username;
+    global $data_dir, $username;
     $filters = array();
     $filters = load_filters();
     $filter_count = count($filters);
index 3a20afb8220bc5b31696dcf7f1b172e9fe9df2ef..8290f2ec03d29712263cffecbafeb1c92671f3a2 100644 (file)
@@ -36,7 +36,6 @@ function get_caps($imap_stream) {
  * @access private
  */
 function imap_test($imap_stream, $string) {
-    global $default_charset;
     print "<tr><td>".htmlspecialchars($string)."</td></tr>";
     $response = sqimap_run_command_list($imap_stream, trim($string),false, $responses, $message,false);
     array_push($response, $responses . ' ' .$message);
index 2346b5dcf16c0665734a675e12b17d0c6f1be074..a090bf9c8ec6daab447c0812f3a321948841792d 100644 (file)
@@ -29,7 +29,7 @@ function squirrelmail_plugin_init_message_details()
  * @access private
  */
 function show_message_details() {
-    global $passed_id, $mailbox, $ent_num, $color,
+    global $passed_id, $mailbox, $ent_num,
            $javascript_on;
 
     if (strlen(trim($mailbox)) < 1) {
index f430cc12b32f8c55853665b30c8d9ecf09421392..f587cc1c2df6952255f727ae043470589b53f661 100644 (file)
 
     function CheckNewMailboxSound($imapConnection, $mailbox, $real_box, $delimeter, $unseen, &$total_new) {
     
-        global $folder_prefix, $trash_folder, $sent_folder,
-               $color, $move_to_sent, $move_to_trash,
-               $unseen_notify, $unseen_type, $newmail_allbox, 
-               $newmail_recent, $newmail_changetitle;
+        global $trash_folder, $sent_folder,
+               $unseen_notify, $newmail_allbox, 
+               $newmail_recent;
 
         $mailboxURL = urlencode($real_box);
         $unseen = $recent = 0;
 
     function newmail_plugin() {
 
-        global $username, $key, $imapServerAddress, $imapPort,
-               $newmail_media, $newmail_enable, $newmail_popup,
+        global $username, $newmail_media, $newmail_enable, $newmail_popup,
                $newmail_recent, $newmail_changetitle, $imapConnection, $PHP_SELF;
 
         if ($newmail_enable == 'on' ||
index 93b7eb5a38b3982e580843054fa90d2e1fa0617b..6e8517ff31fbf99c221d7448f11485129b0a9b43 100644 (file)
@@ -183,10 +183,10 @@ function save_option_sent_subfolders_setting($option) {
  * creates required imap folders
  */
 function sent_subfolders_update_sentfolder() {
-    global $sent_folder, $auto_create_special, $auto_create_done;
+    global $sent_folder;
     global $sent_subfolders_base, $sent_subfolders_setting;
     global $data_dir, $imapServerAddress, $imapPort;
-    global $use_sent_subfolders, $move_to_sent, $imap_server_type;
+    global $use_sent_subfolders, $move_to_sent;
 
     sqgetGlobalVar('username', $username, SQ_SESSION);
     sqgetGlobalVar('key', $key, SQ_COOKIE);
index 89a57d9d6eb6cb3043eb2a0ea78b103784f58a49..b472f605bbc2feb294f47affe856643c602b2b7c 100755 (executable)
@@ -20,8 +20,7 @@ $spamcop_quick_report = false;
  * @access private
  */
 function squirrelmail_plugin_init_spamcop() {
-   global $squirrelmail_plugin_hooks, $data_dir, $username,
-      $spamcop_is_composing;
+   global $squirrelmail_plugin_hooks, $spamcop_is_composing;
 
    $squirrelmail_plugin_hooks['optpage_register_block']['spamcop'] =
       'spamcop_options';
index 1485be76187dc3f6334f1e7e2bc6a49707a4c362..b74c4127629a7b0f378ec218a40ebd015b8bbbf0 100644 (file)
@@ -22,7 +22,7 @@ require_once(SM_PATH . 'functions/imap.php');
  */
 function getMessage_RFC822_Attachment($message, $composeMessage, $passed_id, 
                                       $passed_ent_id='', $imapConnection) {
-    global $attachments, $attachment_dir, $username, $data_dir;
+    global $attachment_dir, $username;
 
     $hashed_attachment_dir = getHashedDir($username, $attachment_dir);
     if (!$passed_ent_id) {
index 623a9e56e8479ddee5cd3d48f66735b3d3e0999a..39de129347483e6b605585a410422a801ca3862f 100644 (file)
@@ -56,4 +56,4 @@ if(!isset($MOD) || !$MOD) {
 /* Load the stuff already. */
 require_once(SM_PATH . $SQSPELL_DIR . "modules/$MOD.mod");
 
-?>
+?>
\ No newline at end of file
index 3847af1cea9c92d93747d5710523607e9126387a..4ae847f409f448d8052b9c611eac938485c8bf7a 100644 (file)
@@ -71,12 +71,6 @@ function translate_read_form_function() {
     global $imapConnection, $wrap_at, $passed_id, $mailbox;
     global $translate_gpltrans_url;
 
-    global $translate_babelfish_enabled, $translate_go_enabled,
-        $translate_dictionary_enabled, $translate_google_enabled,
-        $translate_gpltrans_enabled, $translate_intertran_enabled,
-        $translate_promt_enabled, $translate_otenet_enabled;
-    global $translate_custom_enabled;
-
     if (!$translate_show_read) {
         return;
     }
@@ -232,7 +226,7 @@ function translate_showoption() {
         $translate_dictionary_enabled, $translate_google_enabled,
         $translate_gpltrans_enabled, $translate_intertran_enabled,
         $translate_promt_enabled, $translate_otenet_enabled;
-    global $translate_custom_enabled;
+    global $translate_custom_enabled, $translate_gpltrans_url;
 
     if ($translate_babelfish_enabled) translate_showoption_internal('server','babelfish', 'Babelfish');
     if ($translate_go_enabled) translate_showoption_internal('server','go', 'Go.com');
@@ -426,7 +420,7 @@ function translate_lang_opt($from, $to, $value, $text) {
  * @access private
  */
 function translate_new_form($action) {
-    global $translate_dir, $translate_new_window, $translate_location;
+    global $translate_dir, $translate_location;
     global $color, $translate_same_window;
 
     echo '<form action="';
index 509ca0471c4d9d787f47e707f8511fe3473566c0..c220d343596af44cd0640c3bef7b4c310dc4420a 100644 (file)
@@ -574,7 +574,7 @@ function getforwardSubject($subject)
 /* This function is used when not sending or adding attachments */
 function newMail ($mailbox='', $passed_id='', $passed_ent_id='', $action='', $session='') {
     global $editor_size, $default_use_priority, $body, $idents,
-        $use_signature, $composesession, $data_dir, $username,
+        $use_signature, $data_dir, $username,
         $username, $key, $imapServerAddress, $imapPort, $compose_messages,
         $composeMessage, $body_quote;
     global $languages, $squirrelmail_language, $default_charset;
@@ -881,7 +881,7 @@ function getAttachments($message, &$composeMessage, $passed_id, $entities, $imap
 
 function getMessage_RFC822_Attachment($message, $composeMessage, $passed_id,
         $passed_ent_id='', $imapConnection) {
-    global $attachments, $attachment_dir, $username, $data_dir;
+    global $attachment_dir, $username, $data_dir;
     $hashed_attachment_dir = getHashedDir($username, $attachment_dir);
     if (!$passed_ent_id) {
         $body_a = sqimap_run_command($imapConnection,
@@ -913,14 +913,13 @@ function getMessage_RFC822_Attachment($message, $composeMessage, $passed_id,
 }
 
 function showInputForm ($session, $values=false) {
-    global $send_to, $send_to_cc, $body, $startMessage,
-        $passed_body, $color, $use_signature, $signature, $prefix_sig,
+    global $send_to, $send_to_cc, $body, $startMessage, $action,
+        $color, $use_signature, $signature, $prefix_sig,
         $editor_size, $editor_height, $attachments, $subject, $newmail,
         $use_javascript_addr_book, $send_to_bcc, $passed_id, $mailbox,
         $from_htmladdr_search, $location_of_buttons, $attachment_dir,
-        $username, $data_dir, $identity, $idents, $draft_id, $delete_draft,
-        $mailprio, $default_use_mdn, $mdn_user_support, $compose_new_win,
-        $saved_draft, $mail_sent, $sig_first, $edit_as_new, $action,
+        $username, $data_dir, $identity, $idents, $delete_draft,
+        $mailprio, $compose_new_win, $saved_draft, $mail_sent, $sig_first,
         $username, $compose_messages, $composesession, $default_charset;
 
     $composeMessage = $compose_messages[$session];
@@ -1463,7 +1462,7 @@ function deliverMessage($composeMessage, $draft=false) {
     if (!$useSendmail && !$draft) {
         require_once(SM_PATH . 'class/deliver/Deliver_SMTP.class.php');
         $deliver = new Deliver_SMTP();
-        global $smtpServerAddress, $smtpPort, $pop_before_smtp, $smtp_auth_mech;
+        global $smtpServerAddress, $smtpPort, $pop_before_smtp;
 
         $authPop = (isset($pop_before_smtp) && $pop_before_smtp) ? true : false;
         get_smtp_user($user, $pass);
index 5690cec02be350b8197efa052b10598d86002601..dc7f4876aad7c31d60634d5fd233be643cea1b40 100644 (file)
@@ -35,11 +35,8 @@ define('SM_BOX_COLLAPSED',   1);
 
 function formatMailboxName($imapConnection, $box_array) {
 
-    global $folder_prefix, $trash_folder, $sent_folder,
-           $color, $move_to_sent, $move_to_trash,
-           $unseen_notify, $unseen_type, $collapse_folders,
-           $draft_folder, $save_as_draft,
-           $use_special_folder_color;
+    global $trash_folder, $color, $move_to_trash,
+           $unseen_notify, $unseen_type, $use_special_folder_color;
     $real_box = $box_array['unformatted'];
     $mailbox = str_replace('&nbsp;','',$box_array['formatted']);
     $mailboxURL = urlencode($real_box);
@@ -173,7 +170,7 @@ function compute_folder_children(&$parbox, $boxcount) {
  * currently appropriate.
  */
 function create_collapse_link($boxnum) {
-    global $boxes, $imapConnection, $unseen_notify, $color, $use_icons, $icon_theme;
+    global $boxes, $unseen_notify, $color, $use_icons, $icon_theme;
     $mailbox = urlencode($boxes[$boxnum]['unformatted']);
 
     /* Create the link for this collapse link. */
@@ -210,7 +207,7 @@ function create_collapse_link($boxnum) {
  * @return array unseen message string (for display), unseen message count
  */
 function create_unseen_string($boxName, $boxArray, $imapConnection, $unseen_type) {
-    global $boxes, $unseen_type, $color, $unseen_cum;
+    global $boxes, $color, $unseen_cum;
 
     /* Initialize the return value. */
     $result = array(0,0);
@@ -296,7 +293,7 @@ function is_parent_box($curbox_name, $parbox_name) {
 }
 
 function ListBoxes ($boxes, $j=0 ) {
-    global $data_dir, $username, $startmessage, $color, $unseen_notify, $unseen_type,
+    global $data_dir, $username, $color, $unseen_notify, $unseen_type,
            $move_to_trash, $trash_folder, $collapse_folders, $imapConnection,
            $use_icons, $icon_theme, $use_special_folder_color;
 
@@ -446,7 +443,7 @@ function ListBoxes ($boxes, $j=0 ) {
 }
 
 function ListAdvancedBoxes ($boxes, $mbx, $j='ID.0000' ) {
-    global $data_dir, $username, $startmessage, $color, $unseen_notify, $unseen_type,
+    global $data_dir, $username, $color, $unseen_notify, $unseen_type,
         $move_to_trash, $trash_folder, $collapse_folders, $use_special_folder_color;
 
     if (!isset($boxes) || empty($boxes))
index 57b1bd6f6309694592c69c6cd09ec4fdcffdf04a..d3dd8657a4238ee600b39f8dc0bac15f1d63ff1a 100644 (file)
@@ -91,7 +91,7 @@ function findPreviousMessage($uidset, $passed_id) {
  * @param int $passed_id
  */
 function printer_friendly_link($mailbox, $passed_id, $passed_ent_id) {
-    global $javascript_on, $color;
+    global $javascript_on;
 
     $params = '?passed_ent_id=' . urlencode($passed_ent_id) .
               '&mailbox=' . urlencode($mailbox) .
@@ -125,10 +125,9 @@ function ServerMDNSupport($aFlags) {
 }
 
 function SendMDN ( $mailbox, $passed_id, $sender, $message, $imapConnection) {
-    global $username, $attachment_dir,
-           $version, $attachments, $squirrelmail_language, $default_charset,
-           $languages, $useSendmail, $domain, $sent_folder,
-           $popuser, $data_dir, $username;
+    global $username, $attachment_dir, $popuser, $username,
+           $version, $squirrelmail_language, $default_charset,
+           $languages, $useSendmail, $domain, $sent_folder;
 
     sqgetGlobalVar('SERVER_NAME', $SERVER_NAME, SQ_SERVER);
 
@@ -256,7 +255,7 @@ function SendMDN ( $mailbox, $passed_id, $sender, $message, $imapConnection) {
     } else {
         require_once(SM_PATH . 'class/deliver/Deliver_SMTP.class.php');
         $deliver = new Deliver_SMTP();
-        global $smtpServerAddress, $smtpPort, $smtp_auth_mech, $pop_before_smtp;
+        global $smtpServerAddress, $smtpPort, $pop_before_smtp;
         $authPop = (isset($pop_before_smtp) && $pop_before_smtp) ? true : false;
         get_smtp_user($user, $pass);
         $stream = $deliver->initStream($composeMessage,$domain,0,
@@ -370,7 +369,7 @@ function formatRecipientString($recipients, $item ) {
 
 function formatEnvheader($aMailbox, $passed_id, $passed_ent_id, $message,
                          $color, $FirstTimeSee) {
-    global $msn_user_support, $default_use_mdn, $default_use_priority,
+    global $default_use_mdn, $default_use_priority,
            $show_xmailer_default, $mdn_user_support, $PHP_SELF, $javascript_on,
            $squirrelmail_language;
 
@@ -463,7 +462,7 @@ function formatMenubar($aMailbox, $passed_id, $passed_ent_id, $message, $removed
     global $base_uri, $draft_folder, $where, $what, $color, $sort,
            $startMessage, $PHP_SELF, $save_as_draft,
            $enable_forward_as_attachment, $imapConnection, $lastTargetMailbox,
-           $data_dir, $username, $delete_prev_next_display,
+           $username, $delete_prev_next_display,
            $compose_new_win, $javascript_on;
 
     //FIXME cleanup argument list, use $aMailbox where possible