diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-01-07 05:36:14 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-01-07 05:36:14 +0000 |
commit | 2aed502f93be8ce40a90f31759a8619389d96959 (patch) | |
tree | a7b6c8253c6e5588dd6227e9ffb186062021e7cf | |
parent | 1b8b2f512c250383c2c5f0cb37223f09c40a8017 (diff) | |
download | brdo-2aed502f93be8ce40a90f31759a8619389d96959.tar.gz brdo-2aed502f93be8ce40a90f31759a8619389d96959.tar.bz2 |
#480430 by JamesAn: Update search module to use drupal_static().
-rw-r--r-- | modules/search/search.module | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/search/search.module b/modules/search/search.module index e83c78549..75af55ee2 100644 --- a/modules/search/search.module +++ b/modules/search/search.module @@ -302,7 +302,7 @@ function search_reindex($sid = NULL, $type = NULL, $reindex = FALSE) { * the search_total table, and need to be recounted. */ function search_dirty($word = NULL) { - static $dirty = array(); + $dirty = &drupal_static(__FUNCTION__, array()); if ($word !== NULL) { $dirty[$word] = TRUE; } @@ -429,8 +429,8 @@ function search_expand_cjk($matches) { * Splits a string into tokens for indexing. */ function search_index_split($text) { - static $last = NULL; - static $lastsplit = NULL; + $last = &drupal_static(__FUNCTION__); + $lastsplit = &drupal_static(__FUNCTION__ . ':lastsplit'); if ($last == $text) { return $lastsplit; @@ -810,7 +810,7 @@ function search_expression_insert($keys, $option, $value = '') { * Helper function for grabbing search keys. */ function search_get_keys() { - static $return; + $return = &drupal_static(__FUNCTION__); if (!isset($return)) { // Extract keys as remainder of path // Note: support old GET format of searches for existing links. |