Rename dark gray branches to ..dg and black one to ..b
[banana.git] / banana / banana.inc.php.in
index 3ca5da6..1efc68b 100644 (file)
@@ -33,10 +33,14 @@ class Banana
     static public $spool_root    = '/var/spool/banana';
     static public $spool_max     = 3000;
     static public $spool_tbefore = 5;
-    static public $spool_tafter  = 5;
-    static public $spool_tmax    = 50;
+    static public $spool_tcontext= 10;
+    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',
@@ -46,7 +50,7 @@ class Banana
 
 ### Message display ###
     static public $msgshow_headers   = array('from', 'newsgroups', 'followup-to', 'to', 'cc', 'reply-to',
-                                       'organization', 'date', 'references', 'in-reply-to');
+                                             'organization', 'date');
     static public $msgshow_mimeparts = array('multipart/report', 'multipart/mixed',
                                              'text/html', 'text/plain', 'text/enriched', 'text', 'message');
     static public $msgshow_xface     = true;
@@ -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,25 +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']);
-                    $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;
@@ -736,7 +718,7 @@ class Banana
         return true;
     }
 
-    static private function load($file)
+    static public function load($file)
     {
         $file = strtolower($file) . '.inc.php';
         if (!@include_once dirname(__FILE__) . "/$file") {