Attachment hooks were not registering. Also, brace count code had no effect where...
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 25 Oct 2006 01:54:54 +0000 (01:54 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 25 Oct 2006 01:54:54 +0000 (01:54 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11934 7612ce4b-ef26-0410-bec9-ea0150e637f0

config/conf.pl

index a3d1c7f..894a2b1 100755 (executable)
@@ -5100,13 +5100,6 @@ PLUGIN: for ( $ct = 0 ; $ct <= $#plugins ; $ct++ ) {
                 $inside_init_fxn = 1;
 
 
-                # throw away lines that are not exactly one "brace set" deep
-                #
-                if ($brace_count > 1) { 
-                    next;
-                } 
-
-
                 # count open braces
                 #
                 if ($line =~ /{/) {
@@ -5128,6 +5121,13 @@ PLUGIN: for ( $ct = 0 ; $ct <= $#plugins ; $ct++ ) {
                 } 
 
 
+                # throw away lines that are not exactly one "brace set" deep
+                #
+                if ($brace_count > 1) { 
+                    next;
+                } 
+
+
                 # also not interested in lines that are not
                 # hook registration points
                 #
@@ -5160,7 +5160,7 @@ PLUGIN: for ( $ct = 0 ; $ct <= $#plugins ; $ct++ ) {
                     $options[1] =~ s/\\'/'/g;
                     $options[1] =~ s/\\\\/\\/g;
 
-                    if ( $options[0] =~ /^squirrelmail_plugin_hooks\s*\[\s*['"]([a-z0-9._-]+)['"]\s*\]\s*\[\s*['"]([0-9a-z._-]+)['"]\s*\]/i ) {
+                    if ( $options[0] =~ /^squirrelmail_plugin_hooks\s*\[\s*['"]([a-z0-9 \/._*-]+)['"]\s*\]\s*\[\s*['"]([0-9a-z._-]+)['"]\s*\]/i ) {
                         $hook_name = $1;
                         $hooked_plugin_name = $2;
                         # Note: if we wanted to stop plugins from registering