drop some unused globals
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 8 Jun 2007 19:42:55 +0000 (19:42 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 8 Jun 2007 19:42:55 +0000 (19:42 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12447 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/addrbook_search.php
src/addrbook_search_html.php
src/compose.php
src/printer_friendly_main.php
src/read_body.php
src/redirect.php

index cfbe3ba8b6c296026aad418691ccefd89ca84794..b2e337743df8d1e35f3abfeb2bdb9cd41be42c5a 100644 (file)
@@ -63,7 +63,6 @@ displayHtmlHeader();
 echo "<body>\n";
 
 /** set correct value of $default_charset */
 echo "<body>\n";
 
 /** set correct value of $default_charset */
-global $default_charset;
 set_my_charset();
 
 /* Empty search */
 set_my_charset();
 
 /* Empty search */
@@ -140,4 +139,3 @@ if ($show == 'form' && ! isset($listall)) {
 }
 
 $oTemplate->display('footer.tpl');
 }
 
 $oTemplate->display('footer.tpl');
-?>
\ No newline at end of file
index b877ca22c4dc2e8047ffff2272b277a215bd18a8..a534da0a149e8a8264edfb19f8a578d2ebb493c6 100644 (file)
@@ -68,9 +68,7 @@ function addr_insert_hidden() {
  * @param bool $includesource If true, adds backend column to address listing
  */
 function addr_display_result($res, $includesource = true) {
  * @param bool $includesource If true, adds backend column to address listing
  */
 function addr_display_result($res, $includesource = true) {
-    global $color, $PHP_SELF, $squirrelmail_language;
-
-    global $oTemplate, $oErrorHandler;
+    global $PHP_SELF, $oTemplate, $oErrorHandler;
     
 
     echo addForm($PHP_SELF, 'post', 'addressbook').
     
 
     echo addForm($PHP_SELF, 'post', 'addressbook').
@@ -96,7 +94,6 @@ else {
 }
 
 /** set correct value of $default_charset */
 }
 
 /** set correct value of $default_charset */
-global $default_charset;
 set_my_charset();
 
 /* Initialize addressbook */
 set_my_charset();
 
 /* Initialize addressbook */
@@ -176,4 +173,3 @@ if ($addrquery == '' || sizeof($res) == 0) {
 echo '<hr />';
 
 $oTemplate->display('footer.tpl');
 echo '<hr />';
 
 $oTemplate->display('footer.tpl');
-?>
index 30b2fcdad2df594de7750b455e8fc64d1c0d365d..1a44f25bb9c2ff52a9e43a191ee428bc83724a13 100644 (file)
@@ -722,8 +722,8 @@ function newMail ($mailbox='', $passed_id='', $passed_ent_id='', $action='', $se
         $use_signature, $data_dir, $username,
         $key, $imapServerAddress, $imapPort, $compose_messages,
         $composeMessage, $body_quote, $request_mdn, $request_dr,
         $use_signature, $data_dir, $username,
         $key, $imapServerAddress, $imapPort, $compose_messages,
         $composeMessage, $body_quote, $request_mdn, $request_dr,
-        $default_use_mdn, $mdn_user_support;
-    global $languages, $squirrelmail_language, $default_charset;
+        $mdn_user_support, $languages, $squirrelmail_language,
+        $default_charset;
 
     /*
      * Set $default_charset to correspond with the user's selection
 
     /*
      * Set $default_charset to correspond with the user's selection
@@ -1055,10 +1055,11 @@ function getMessage_RFC822_Attachment($message, $composeMessage, $passed_id,
 }
 
 function showInputForm ($session, $values=false) {
 }
 
 function showInputForm ($session, $values=false) {
-    global $send_to, $send_to_cc, $body, $startMessage, $action,
-        $color, $use_signature, $signature, $prefix_sig,
+    global $send_to, $send_to_cc, $send_to_bcc,
+        $body, $startMessage, $action,
+        $use_signature, $signature, $prefix_sig,
         $editor_size, $editor_height, $subject, $newmail,
         $editor_size, $editor_height, $subject, $newmail,
-        $use_javascript_addr_book, $send_to_bcc, $passed_id, $mailbox,
+        $use_javascript_addr_book, $passed_id, $mailbox,
         $from_htmladdr_search, $location_of_buttons, $attachment_dir,
         $username, $data_dir, $identity, $idents, $delete_draft,
         $mailprio, $compose_new_win, $saved_draft, $mail_sent, $sig_first,
         $from_htmladdr_search, $location_of_buttons, $attachment_dir,
         $username, $data_dir, $identity, $idents, $delete_draft,
         $mailprio, $compose_new_win, $saved_draft, $mail_sent, $sig_first,
@@ -1436,9 +1437,9 @@ function getByteSize($ini_size) {
 function deliverMessage($composeMessage, $draft=false) {
     global $send_to, $send_to_cc, $send_to_bcc, $mailprio, $subject, $body,
         $username, $identity, $idents, $data_dir,
 function deliverMessage($composeMessage, $draft=false) {
     global $send_to, $send_to_cc, $send_to_bcc, $mailprio, $subject, $body,
         $username, $identity, $idents, $data_dir,
-        $request_mdn, $request_dr, $default_charset, $color, $useSendmail,
-        $domain, $action, $default_move_to_sent, $move_to_sent;
-    global $imapServerAddress, $imapPort, $sent_folder, $key;
+        $request_mdn, $request_dr, $default_charset, $useSendmail,
+        $domain, $action, $default_move_to_sent, $move_to_sent,
+        $imapServerAddress, $imapPort, $sent_folder, $key;
 
     $rfc822_header = $composeMessage->rfc822_header;
 
 
     $rfc822_header = $composeMessage->rfc822_header;
 
@@ -1607,8 +1608,8 @@ function deliverMessage($composeMessage, $draft=false) {
             $lcl_allow_sent = false;
         }
 
             $lcl_allow_sent = false;
         }
 
+        global $passed_id, $mailbox;
         if (($fld_sent && $svr_allow_sent && !$lcl_allow_sent) || ($fld_sent && $lcl_allow_sent)) {
         if (($fld_sent && $svr_allow_sent && !$lcl_allow_sent) || ($fld_sent && $lcl_allow_sent)) {
-            global $passed_id, $mailbox, $action;
             if ($action == 'reply' || $action == 'reply_all') {
                 $save_reply_with_orig=getPref($data_dir,$username,'save_reply_with_orig');
                 if ($save_reply_with_orig) {
             if ($action == 'reply' || $action == 'reply_all') {
                 $save_reply_with_orig=getPref($data_dir,$username,'save_reply_with_orig');
                 if ($save_reply_with_orig) {
@@ -1623,7 +1624,7 @@ function deliverMessage($composeMessage, $draft=false) {
             unset ($imap_deliver);
         }
 
             unset ($imap_deliver);
         }
 
-        global $passed_id, $mailbox, $action, $what, $iAccount,$startMessage;
+        global $what, $iAccount, $startMessage;
 
         $composeMessage->purgeAttachments();
         if ($action=='reply' || $action=='reply_all' || $action=='forward' || $action=='forward_as_attachment') {
 
         $composeMessage->purgeAttachments();
         if ($action=='reply' || $action=='reply_all' || $action=='forward' || $action=='forward_as_attachment') {
index 8632c630a1680ac67df08ae7b0cbcdd3e954a9dc..7979ea550c5c360c830248de797162fb6e46160e 100644 (file)
@@ -15,7 +15,6 @@
 include('../include/init.php');
 
 /* get those globals into gear */
 include('../include/init.php');
 
 /* get those globals into gear */
-global $color;
 if ( ! sqgetGlobalVar('passed_ent_id',$passed_ent_id,SQ_GET))
     $passed_ent_id = 0;
 if ( ! sqgetGlobalVar('mailbox',$mailbox,SQ_GET) ||
 if ( ! sqgetGlobalVar('passed_ent_id',$passed_ent_id,SQ_GET))
     $passed_ent_id = 0;
 if ( ! sqgetGlobalVar('mailbox',$mailbox,SQ_GET) ||
index 4197319073ce8585797b5bf9f4c2a6da5cf8dda8..1fb0ab64a4032d967c676f1921214f3c2270a293 100644 (file)
@@ -125,8 +125,7 @@ function ServerMDNSupport($aFlags) {
 }
 
 function SendMDN ( $mailbox, $passed_id, $message, $imapConnection) {
 }
 
 function SendMDN ( $mailbox, $passed_id, $message, $imapConnection) {
-    global $username, $attachment_dir, $color,
-           $squirrelmail_language, $default_charset,
+    global $squirrelmail_language, $default_charset,
            $languages, $useSendmail, $domain, $sent_folder;
 
     sqgetGlobalVar('SERVER_NAME', $SERVER_NAME, SQ_SERVER);
            $languages, $useSendmail, $domain, $sent_folder;
 
     sqgetGlobalVar('SERVER_NAME', $SERVER_NAME, SQ_SERVER);
@@ -271,7 +270,7 @@ function SendMDN ( $mailbox, $passed_id, $message, $imapConnection) {
                 _("Server replied:") . ' ' . $deliver->dlv_ret_nr . ' ' .
                 nl2br(htmlspecialchars($deliver->dlv_server_msg));
         }
                 _("Server replied:") . ' ' . $deliver->dlv_ret_nr . ' ' .
                 nl2br(htmlspecialchars($deliver->dlv_server_msg));
         }
-        plain_error_message($msg, $color);
+        plain_error_message($msg);
     } else {
         unset ($deliver);
         if (sqimap_mailbox_exists ($imapConnection, $sent_folder)) {
     } else {
         unset ($deliver);
         if (sqimap_mailbox_exists ($imapConnection, $sent_folder)) {
@@ -294,7 +293,7 @@ function ToggleMDNflag ($set ,$imapConnection, $mailbox, $passed_id) {
 }
 
 function formatRecipientString($recipients, $item ) {
 }
 
 function formatRecipientString($recipients, $item ) {
-    global $show_more_cc, $show_more, $show_more_bcc,
+    global $show_more, $show_more_cc, $show_more_bcc,
            $PHP_SELF, $oTemplate;
 
     $string = '';
            $PHP_SELF, $oTemplate;
 
     $string = '';
@@ -447,8 +446,6 @@ function formatMenubar($aMailbox, $passed_id, $passed_ent_id, $message, $removed
 
     $urlMailbox = urlencode($mailbox);
 
 
     $urlMailbox = urlencode($mailbox);
 
-    $msgs_url = $base_uri . 'src/';
-
     // Create Prev & Next links
     // Handle nested entities first (i.e. Mime Attach parts)
     $prev_href = $next_href = $up_href = $del_href = $del_prev_href = $del_next_href = '';
     // Create Prev & Next links
     // Handle nested entities first (i.e. Mime Attach parts)
     $prev_href = $next_href = $up_href = $del_href = $del_prev_href = $del_next_href = '';
@@ -787,7 +784,6 @@ if(sqgetGlobalVar('view_unsafe_images', $temp)) {
 sqgetGlobalVar('mailbox_cache',$mailbox_cache,SQ_SESSION);
 
 /* end of get globals */
 sqgetGlobalVar('mailbox_cache',$mailbox_cache,SQ_SESSION);
 
 /* end of get globals */
-global $sqimap_capabilities, $lastTargetMailbox;
 
 $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0);
 $aMailbox = sqm_api_mailbox_select($imapConnection, $iAccount, $mailbox,array('setindex' => $what, 'offset' => $startMessage),array());
 
 $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0);
 $aMailbox = sqm_api_mailbox_select($imapConnection, $iAccount, $mailbox,array('setindex' => $what, 'offset' => $startMessage),array());
index cce56c618407f84077859f2762239e3792a32037..d30580198c9dc6e84cf64afa5d3419f64232bbe5 100644 (file)
@@ -172,8 +172,6 @@ exit;
 function attachment_common_parse($str, $debug) {
     global $attachment_common_types, $attachment_common_types_parsed;
 
 function attachment_common_parse($str, $debug) {
     global $attachment_common_types, $attachment_common_types_parsed;
 
-    $attachment_common_types_parsed[$str] = true;
-
     /*
      * Replace ", " with "," and explode on that as Mozilla 1.x seems to
      * use "," to seperate whilst IE, and earlier versions of Mozilla use
     /*
      * Replace ", " with "," and explode on that as Mozilla 1.x seems to
      * use "," to seperate whilst IE, and earlier versions of Mozilla use
@@ -193,4 +191,7 @@ function attachment_common_parse($str, $debug) {
         }
     }
     sqsession_register($attachment_common_types, 'attachment_common_types');
         }
     }
     sqsession_register($attachment_common_types, 'attachment_common_types');
+
+    /* mark as parsed */
+    $attachment_common_types_parsed[$str] = true;
 }
 }