diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2005-03-18 06:50:41 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2005-03-18 06:50:41 +0000 |
commit | ab7815c8cdcd1bbb1d2d12ec58d2c90c9ac77720 (patch) | |
tree | d6694972b59cd04d419d66a1051831af8b9f9f5b /modules/search.module | |
parent | 332a56334d0941aa40c12bfb605888c8df5cc67b (diff) | |
download | brdo-ab7815c8cdcd1bbb1d2d12ec58d2c90c9ac77720.tar.gz brdo-ab7815c8cdcd1bbb1d2d12ec58d2c90c9ac77720.tar.bz2 |
- #19063: Use module_implements instead of hand-rolled routine.
Diffstat (limited to 'modules/search.module')
-rw-r--r-- | modules/search.module | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/modules/search.module b/modules/search.module index 3f983a155..6405dd438 100644 --- a/modules/search.module +++ b/modules/search.module @@ -301,22 +301,8 @@ function search_keywords_variation($text) { * Invokes hook_search_preprocess() in modules. */ function search_preprocess(&$text) { - static $modules = null; - // Cache list of modules which implement this hook. This function gets called - // a lot during reindexing. - if (!is_array($modules)) { - $modules = array(); - foreach (module_list() as $module) { - if (module_hook($module, 'search_preprocess')) { - $modules[] = $module; - } - } - } - // Process $text - if (count($modules) > 0) { - foreach ($modules as $module) { - $text = module_invoke($module, 'search_preprocess', $text); - } + foreach (module_implements('search_preprocess') as $module) { + $text = module_invoke($module, 'search_preprocess', $text); } } |