From 774e0b3737d51b70bb141f4e13c6c111208847c0 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 20 May 2009 06:10:14 +0000 Subject: 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. --- modules/search/helpers/search_installer.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'modules/search/helpers/search_installer.php') diff --git a/modules/search/helpers/search_installer.php b/modules/search/helpers/search_installer.php index fe5a7359..a3d0f79e 100644 --- a/modules/search/helpers/search_installer.php +++ b/modules/search/helpers/search_installer.php @@ -35,14 +35,7 @@ class search_installer { // populate the index with dirty records $db->query("INSERT INTO {search_records} (`item_id`) SELECT `id` FROM {items}"); module::set_version("search", 1); - - if (ORM::factory("search_record")->count_all() < 10) { - foreach (ORM::factory("search_record")->where("dirty", 1)->find_all() as $record) { - search::update_record($record); - } - } else { - search::check_index(); - } + search::check_index(); } } -- cgit v1.2.3