Fix boxpattern behaviour
authorx2003bruneau <x2003bruneau@9869982d-c50d-0410-be91-f2a2ec7c7c7b>
Sat, 24 Mar 2007 15:53:29 +0000 (15:53 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 4 Jan 2008 23:35:36 +0000 (00:35 +0100)
git-svn-id: svn+ssh://murphy/home/svn/banana/trunk@228 9869982d-c50d-0410-be91-f2a2ec7c7c7b

banana/banana.inc.php.in
banana/nntpcore.inc.php

index d7acd83..5baa99a 100644 (file)
@@ -256,7 +256,7 @@ class Banana
             return Banana::$page->kill(_b_('Connexion non-valide'));
         }
         if (Banana::$action & Banana::ACTION_BOX_NEEDED) {
-            if(Banana::$boxpattern && !preg_match('/' . Banana::$boxpattern . '/i', $group)) {
+            if(Banana::$boxpattern && !preg_match('/' . Banana::$boxpattern . '/i', Banana::$group)) {
                 Banana::$page->setPage('group');        
                 return Banana::$page->kill(_b_("Ce newsgroup n'existe pas ou vous n'avez pas l'autorisation d'y accĂ©der"));
             }
index 7867145..f1cf460 100644 (file)
@@ -352,7 +352,7 @@ class BananaNNTPCore
         $groups = array();
         foreach ($list as $result) {
             list($group, $last, $first, $p) = explode(' ', $result, 4);
-            if (!is_null(Banana::$boxpattern) || preg_match('@' . Banana::$boxpattern . '@i', $group)) {
+            if (!Banana::$boxpattern || preg_match('@' . Banana::$boxpattern . '@i', $group)) {
                 $groups[$group] = array(intval($last), intval($first), $p);
             }
         }