Remove numeric keys from plugin array in config.php
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 26 Jan 2005 20:31:42 +0000 (20:31 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 26 Jan 2005 20:31:42 +0000 (20:31 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@8708 7612ce4b-ef26-0410-bec9-ea0150e637f0

ChangeLog
config/conf.pl
config/config_default.php

index d7d0d3eca3699cf6015344dea3ac149be865a0ba..9d78a247eb71098b58fd9ad9e122c05fc3d79b2b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -191,6 +191,7 @@ Version 1.5.1 -- CVS
   - Security: Fix possible XSS issues in src/webmail.php. [CAN-2005-0104]
   - Fix undefined variables in src/webmail.php.
   - 24hr clock format should include a leading 0.
   - Security: Fix possible XSS issues in src/webmail.php. [CAN-2005-0104]
   - Fix undefined variables in src/webmail.php.
   - 24hr clock format should include a leading 0.
+  - Removed numeric keys for plugin array in config.php
 
 Version 1.5.0
 --------------------
 
 Version 1.5.0
 --------------------
index ba63bd535500f22533fd5c58124efe94e918ce18..39ea11b61afdaee6329690db0461843fe7c9d01f 100755 (executable)
@@ -188,11 +188,15 @@ while ( $line = <FILE> ) {
             $sub =~ s/\]\[['"]NAME['"]\]//;
             $sub =~ s/.*\[//;
             $theme_name[$sub] = $options[1];
             $sub =~ s/\]\[['"]NAME['"]\]//;
             $sub =~ s/.*\[//;
             $theme_name[$sub] = $options[1];
-        } elsif ( $options[0] =~ /^plugins\[[0-9]+\]/ ) {
+        } elsif ( $options[0] =~ /^plugins\[[0-9]*\]/ ) {
             $sub = $options[0];
             $sub =~ s/\]//;
             $sub =~ s/^plugins\[//;
             $sub = $options[0];
             $sub =~ s/\]//;
             $sub =~ s/^plugins\[//;
-            $plugins[$sub] = $options[1];
+            if ($sub eq '') {
+               push @plugins, $options[1];
+            } else {
+               $plugins[$sub] = $options[1];
+            }
         } elsif ( $options[0] =~ /^ldap_server\[[0-9]+\]/ ) {
             $sub = $options[0];
             $sub =~ s/\]//;
         } elsif ( $options[0] =~ /^ldap_server\[[0-9]+\]/ ) {
             $sub = $options[0];
             $sub =~ s/\]//;
@@ -3219,7 +3223,7 @@ sub save_data {
 
     # all plugins are strings
         for ( $ct = 0 ; $ct <= $#plugins ; $ct++ ) {
 
     # all plugins are strings
         for ( $ct = 0 ; $ct <= $#plugins ; $ct++ ) {
-            print CF "\$plugins[$ct] = '$plugins[$ct]';\n";
+            print CF "\$plugins[] = '$plugins[$ct]';\n";
         }
         print CF "\n";
 
         }
         print CF "\n";
 
index e883a04ccc9a3abc61babfa92666d785fc6dc1c9..31796f197d6c1b156356f5d46fb7cd5012973105 100644 (file)
@@ -773,8 +773,8 @@ $motd = "";
  * the plugin directory name relative to the /plugins/ directory.
  * For instance, for the 'sqclock' plugin, you'd put a line like
  * the following.
  * the plugin directory name relative to the /plugins/ directory.
  * For instance, for the 'sqclock' plugin, you'd put a line like
  * the following.
- *    $plugins[0] = 'sqclock';
- *    $plugins[1] = 'attachment_common';
+ *    $plugins[] = 'sqclock';
+ *    $plugins[] = 'attachment_common';
  */
 // Add list of enabled plugins here
 
  */
 // Add list of enabled plugins here
 
@@ -969,4 +969,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.
  */
  * 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
+?>