summaryrefslogtreecommitdiff
path: root/modules/search/helpers
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-12-02 10:02:08 -0800
committerBharat Mediratta <bharat@menalto.com>2009-12-02 10:02:08 -0800
commit94411b36585a5bdf6225b8af6ae4ee5c21d5779d (patch)
tree4442a4ae403302d150ce25cc114ec1a47fb03c31 /modules/search/helpers
parentd2cb217e20d44d7928a0910ac0375740de163bb3 (diff)
Fix a bunch of places where we were using "= null" instead of "IS NULL".
Diffstat (limited to 'modules/search/helpers')
-rw-r--r--modules/search/helpers/search.php6
-rw-r--r--modules/search/helpers/search_task.php2
2 files changed, 3 insertions, 5 deletions
diff --git a/modules/search/helpers/search.php b/modules/search/helpers/search.php
index 9123df09..70a39272 100644
--- a/modules/search/helpers/search.php
+++ b/modules/search/helpers/search.php
@@ -73,15 +73,13 @@ class search_Core {
static function stats() {
$remaining = db::build()
- ->select("items.id")
->from("items")
->join("search_records", "items.id", "search_records.item_id", "left")
->and_open()
- ->where("search_records.item_id", "=", null)
+ ->where("search_records.item_id", "IS", null)
->or_where("search_records.dirty", "=", 1)
->close()
- ->execute()
- ->count();
+ ->count_records();
$total = ORM::factory("item")->count_all();
$percent = round(100 * ($total - $remaining) / $total);
diff --git a/modules/search/helpers/search_task.php b/modules/search/helpers/search_task.php
index 6aa4a0d1..e039e493 100644
--- a/modules/search/helpers/search_task.php
+++ b/modules/search/helpers/search_task.php
@@ -45,7 +45,7 @@ class search_task_Core {
$start = microtime(true);
foreach (ORM::factory("item")
->join("search_records", "items.id", "search_records.item_id", "left")
- ->where("search_records.item_id", "=", null)
+ ->where("search_records.item_id", "IS", null)
->or_where("search_records.dirty", "=", 1)
->find_all() as $item) {
// The query above can take a long time, so start the timer after its done