[prev in list] [next in list] [prev in thread] [next in thread] 

List:       squirrelmail-cvs
Subject:    [SM-CVS] CVS: squirrelmail/plugins/filters filters.php,1.78,1.79
From:       Jonathan Angliss <jangliss () users ! sourceforge ! net>
Date:       2005-10-25 21:08:23
Message-ID: E1EUW1v-0007Uk-MD () sc8-pr-cvs1 ! sourceforge ! net
[Download RAW message or body]

Update of /cvsroot/squirrelmail/squirrelmail/plugins/filters
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28675/plugins/filters

Modified Files:
	filters.php 
Log Message:
If no filters defined, and spam filters are not enabled, don't bother
issuing a possibly costly IMAP STATUS call to INBOX.



Index: filters.php
===================================================================
RCS file: /cvsroot/squirrelmail/squirrelmail/plugins/filters/filters.php,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -w -r1.78 -r1.79
--- filters.php	24 Sep 2005 17:22:32 -0000	1.78
+++ filters.php	25 Oct 2005 21:08:21 -0000	1.79
@@ -192,6 +192,26 @@
     sqgetGlobalVar('username', $username, SQ_SESSION);
     sqgetGlobalVar('key',      $key,      SQ_COOKIE);
 
+    $filters = load_filters();
+
+    // No point running spam filters if there aren't any to run //
+    if ($AllowSpamFilters) {
+        $spamfilters = load_spam_filters();
+
+        $AllowSpamFilters = false;
+        foreach($spamfilters as $key=>$value) {
+            if ($value['enabled'] == 'yes') {
+                $AllowSpamFilters = true;
+                break;
+            }
+        }
+    }
+
+    if (!$AllowSpamFilters && empty($filters)) {
+        return;
+    }
+
+
     // Detect if we have already connected to IMAP or not.
     // Also check if we are forced to use a separate IMAP connection
     if ((!isset($imap_stream) && !isset($imapConnection)) ||



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
--
squirrelmail-cvs mailing list
List Address: squirrelmail-cvs@lists.sourceforge.net
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-cvs
http://squirrelmail.org/cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic