瀏覽代碼

drop some unneeded globals / variables

Thijs Kinkhorst 18 年之前
父節點
當前提交
0ddf214952
共有 4 個文件被更改,包括 5 次插入6 次删除
  1. 2 2
      plugins/filters/filters.php
  2. 1 1
      plugins/info/functions.php
  3. 1 2
      plugins/listcommands/functions.php
  4. 1 1
      plugins/sent_subfolders/setup.php

+ 2 - 2
plugins/filters/filters.php

@@ -210,7 +210,7 @@ function start_filters($hook_args) {
         $spamfilters = load_spam_filters();
 
         $AllowSpamFilters = false;
-        foreach($spamfilters as $filterskey=>$value) {
+        foreach($spamfilters as $value) {
             if ($value['enabled'] == SMPREF_ON) {
                 $AllowSpamFilters = true;
                 break;
@@ -429,7 +429,7 @@ function spam_filters($imap_stream) {
 
     $run = false;
 
-    foreach ($filters as $Key => $Value) {
+    foreach ($filters as $Value) {
         if ($Value['enabled']) {
             $run = true;
             break;

+ 1 - 1
plugins/info/functions.php

@@ -50,7 +50,7 @@ function imap_test($imap_stream, $string) {
  * @access private
  */
 function print_response($response) {
-    foreach($response as $index=>$value) {
+    foreach($response as $value) {
         if (is_array($value)) {
             print_response($value);
         }

+ 1 - 2
plugins/listcommands/functions.php

@@ -42,7 +42,6 @@ function get_non_rfc_lists() {
   */
 function plugin_listcommands_optpage_register_block_do()
 {
-
     global $optpage_blocks, $listcommands_allow_non_rfc_list_management;
 
     // only allow management of non-RFC lists if admin deems necessary
@@ -64,7 +63,7 @@ function plugin_listcommands_optpage_register_block_do()
  * internal function that builds mailing list links
  */
 function plugin_listcommands_menu_do() {
-    global $passed_id, $passed_ent_id, $color, $mailbox, $message, 
+    global $passed_id, $passed_ent_id, $mailbox, $message, 
            $startMessage, $oTemplate, $listcommands_allow_non_rfc_list_management;
 
     @include_once(SM_PATH . 'plugins/listcommands/config.php');

+ 1 - 1
plugins/sent_subfolders/setup.php

@@ -190,7 +190,7 @@ function save_option_sent_subfolders_setting($option) {
 function sent_subfolders_update_sentfolder() {
     global $sent_folder, $username;
     global $sent_subfolders_base, $sent_subfolders_setting;
-    global $data_dir, $imapServerAddress, $imapPort, $color;
+    global $data_dir, $imapServerAddress, $imapPort;
     global $use_sent_subfolders, $move_to_sent;
 
     sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);