bugfix + dead code
authorx2000habouzit <x2000habouzit>
Sun, 2 Jan 2005 03:13:50 +0000 (03:13 +0000)
committerx2000habouzit <x2000habouzit>
Sun, 2 Jan 2005 03:13:50 +0000 (03:13 +0000)
include/spool.inc.php

index 2522f04..942f36e 100644 (file)
@@ -192,9 +192,10 @@ class spool
             if (sizeof($newpostsids)>0) {
                 switch ($_display) {
                     case 1:
-                        foreach ($this->roots as $i) {
+                        foreach ($this->roots as $k=>$i) {
                             if ($this->overview[$i]->descunread==0) {
                                 $this->killdesc($i);
+                                unset($this->roots[$k]);
                             }
                         }
                         break;
@@ -205,10 +206,6 @@ class spool
         return true;
     }
 
-    function cmp($a, $b) {
-        return $this->overview[$a]->date < $this->overview[$b]->date;
-    }
-
     function save($file)
     {
         uasort($this->overview, "spoolcompare");
@@ -234,8 +231,6 @@ class spool
                 $this->killdesc($c);
             }
         }
-        $pos = array_search($_id, $this->roots);
-        unset($this->roots[$pos]);
         unset($this->overview[$_id]);
         $msgid = array_search($_id, $this->ids);
         if ($msgid) {