Rename dark gray branches to ..dg and black one to ..b
[banana.git] / banana / banana.inc.php.in
index 1ebd1ea..1efc68b 100644 (file)
@@ -37,6 +37,10 @@ class Banana
     static public $spool_tmax    = 10;
     static public $spool_boxlist = true;
 
+### Tree options ###
+    static public $tree_read  = 'dg';
+    static public $tree_unread = 'b';
+
 ### Message processing ###
     static public $msgparse_headers = array('content-disposition', 'content-transfer-encoding',
                                        'content-type', 'content-id', 'date', 'followup-to',
@@ -574,16 +578,12 @@ class Banana
         }
         if (isset($_POST['cancel'])) {
             $this->loadSpool($group);
-            $ndx = Banana::$spool->getNdX($id) - 1;
             if (!Banana::$protocole->cancel($msg)) {
                 return _b_('Une erreur s\'est produite lors de l\'annulation du message :') . '<br />'
                        . Banana::$protocole->lastError();
             }
-            if ($ndx < 50) {
-                 $ndx = 0;
-            }
             $this->removeMessage($group, $artid);
-            Banana::$page->redirect(Array('group' => $group, 'first' => $ndx));
+            Banana::$page->redirect(Array('group' => $group));
         }
 
         Banana::$page->assign_by_ref('message', $msg);
@@ -677,26 +677,7 @@ class Banana
     {
         Banana::load('spool');
         if (!Banana::$spool || Banana::$spool->group != $group) {
-            $clean = false;
-            if (php_sapi_name() != 'cli') {
-                if ($group == @$_SESSION['banana_group'] && isset($_SESSION['banana_spool'])) {
-                    Banana::$spool = unserialize($_SESSION['banana_spool']);
-                    unset($_SESSION['banana_spool']);
-                    $clean = @(Banana::$profile['lastnews'] != $_SESSION['banana_lastnews']);
-                } else {
-                    unset($_SESSION['banana_message']);
-                    unset($_SESSION['banana_artid']);
-                    unset($_SESSION['banana_showhdr']);
-                }
-            }
-            BananaSpool::getSpool($group, Banana::$profile['lastnews'], Banana::$profile['autoup'] || $clean);
-            if (php_sapi_name() != 'cli') {
-                $_SESSION['banana_group'] = $group;
-                if (!Banana::$profile['display']) {
-                    $_SESSION['banana_spool'] = serialize(Banana::$spool);
-                    $_SESSION['banana_lastnews'] = Banana::$profile['lastnews'];
-                }
-            }
+            BananaSpool::getSpool($group, Banana::$profile['lastnews'], Banana::$profile['autoup']);
             Banana::$spool->setMode(Banana::$profile['display'] ? Banana::SPOOL_UNREAD : Banana::SPOOL_ALL);
         }
         return true;