summaryrefslogtreecommitdiff
path: root/modules/search/helpers/search.php
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-07-08 09:27:37 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-07-08 09:27:37 -0700
commit6ac5238b83d58824eb9327406a2ee50b7e603214 (patch)
tree78f714cb36d04e8987f0c77eb1be10dd80259236 /modules/search/helpers/search.php
parentac797e609c8c319ca77f9b746a7cecad8dd69004 (diff)
Add task logging to the "Update Search Index" task
Diffstat (limited to 'modules/search/helpers/search.php')
-rw-r--r--modules/search/helpers/search.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/search/helpers/search.php b/modules/search/helpers/search.php
index ea8dad81..34eaecbd 100644
--- a/modules/search/helpers/search.php
+++ b/modules/search/helpers/search.php
@@ -50,6 +50,9 @@ class search_Core {
return array($count, new ORM_Iterator(ORM::factory("item"), $db->query($query)));
}
+ /**
+ * @return string An error message suitable for inclusion in the task log
+ */
static function check_index() {
list ($remaining) = search::stats();
if ($remaining) {
@@ -76,6 +79,7 @@ class search_Core {
$record->data = join(" ", $data);
$record->dirty = 0;
$record->save();
+ return t("Search index updated for '%title'", array("title" => p::purify($item->title)));
}
static function stats() {