diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2009-05-20 06:10:14 +0000 |
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2009-05-20 06:10:14 +0000 |
| commit | 774e0b3737d51b70bb141f4e13c6c111208847c0 (patch) | |
| tree | 8f367c99a16c1d4d3419838aec420a29a320bc3b /modules/search/helpers/search_event.php | |
| parent | 54fe2c600e6930c2885f3f6048221710637a142f (diff) | |
Avoid complex inserts in available_tasks() to make admin/maintenance
run faster. This fixes ticket #235.
Incidentally, refactor exif and search to use the same patterns
overall so that if you understand one, you understand the other and
they generally use the same strings for localization.
Diffstat (limited to 'modules/search/helpers/search_event.php')
| -rw-r--r-- | modules/search/helpers/search_event.php | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/modules/search/helpers/search_event.php b/modules/search/helpers/search_event.php index 50a968e7..b9657395 100644 --- a/modules/search/helpers/search_event.php +++ b/modules/search/helpers/search_event.php @@ -19,16 +19,11 @@ */ class search_event_Core { static function item_created($item) { - $record = ORM::factory("search_record"); - $record->item_id = $item->id; - search::update_record($record); + search::update($item); } static function item_updated($old_item, $new_item) { - $record = ORM::factory("search_record") - ->where("item_id", $new_item->id) - ->find(); - search::update_record($record); + search::update($new_item); } static function item_before_delete($item) { @@ -38,10 +33,7 @@ class search_event_Core { } static function item_related_update($item) { - $record = ORM::factory("search_record") - ->where("item_id", $item->id) - ->find(); - search::update_record($record); + search::update($item); } static function item_related_update_batch($sql) { |
