Fixes a bug that occurs when you delete the current default index, a=chris

Chris Pollett [2011-10-25 02:Oct:th]
Fixes a bug that occurs when you delete the current default index, a=chris
Filename
models/crawl_model.php
diff --git a/models/crawl_model.php b/models/crawl_model.php
index f9aec621a..6e33a7007 100755
--- a/models/crawl_model.php
+++ b/models/crawl_model.php
@@ -267,6 +267,10 @@ class CrawlModel extends Model implements CrawlConstants
         foreach($rows as $row) {
             $this->deleteCrawlMix($row['MIX_TIMESTAMP']);
         }
+        $current_timestamp = $this->getCurrentIndexDatabaseName();
+        if($current_timestamp == $timestamp) {
+            $this->db->execute("DELETE FROM CURRENT_WEB_INDEX");
+        }
     }

     /**
ViewGit