summaryrefslogtreecommitdiff
path: root/modules/search/helpers
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-07-28 20:49:50 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-07-28 20:49:50 -0700
commit3461b4e8e65791ae4e01fd45da5df76a9a929dbf (patch)
tree0523422be804d8b6b62f71625796dabc0cf02f72 /modules/search/helpers
parent2d770f1d2784f5559c3ca892c6cfd8db381f2854 (diff)
parent30586236a5b6c71542a02fa13a0018ff4da6eb19 (diff)
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/search/helpers')
-rw-r--r--modules/search/helpers/search.php12
1 files changed, 4 insertions, 8 deletions
diff --git a/modules/search/helpers/search.php b/modules/search/helpers/search.php
index b08cf89d..c03de983 100644
--- a/modules/search/helpers/search.php
+++ b/modules/search/helpers/search.php
@@ -64,19 +64,15 @@ class search_Core {
}
static function update($item) {
- $data = array();
+ $data = new ArrayObject();
$record = ORM::factory("search_record")->where("item_id", $item->id)->find();
if (!$record->loaded) {
$record->item_id = $item->id;
}
- foreach (module::active() as $module) {
- $class_name = "{$module->name}_search";
- if (method_exists($class_name, "item_index_data")) {
- $data[] = call_user_func(array($class_name, "item_index_data"), $record->item());
- }
- }
- $record->data = join(" ", $data);
+ module::event("item_index_data", $record->item(), $data);
+ Kohana::log("alert",print_r($data,1));
+ $record->data = join(" ", (array)$data);
$record->dirty = 0;
$record->save();
}