diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/book.module | 2 | ||||
-rw-r--r-- | modules/book/book.module | 2 | ||||
-rw-r--r-- | modules/search.module | 12 | ||||
-rw-r--r-- | modules/search/search.module | 12 | ||||
-rw-r--r-- | modules/system.module | 9 | ||||
-rw-r--r-- | modules/system/system.module | 9 | ||||
-rw-r--r-- | modules/user.module | 4 | ||||
-rw-r--r-- | modules/user/user.module | 4 |
8 files changed, 28 insertions, 26 deletions
diff --git a/modules/book.module b/modules/book.module index a515fa0e7..cbe8f1635 100644 --- a/modules/book.module +++ b/modules/book.module @@ -662,7 +662,7 @@ function book_render() { */ function book_export($type = 'html', $nid = 0) { global $base_url; - $type = strtolower($type); + $type = drupal_strtolower($type); $depth = _book_get_depth($nid); switch ($type) { case 'docbook': diff --git a/modules/book/book.module b/modules/book/book.module index a515fa0e7..cbe8f1635 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -662,7 +662,7 @@ function book_render() { */ function book_export($type = 'html', $nid = 0) { global $base_url; - $type = strtolower($type); + $type = drupal_strtolower($type); $depth = _book_get_depth($nid); switch ($type) { case 'docbook': diff --git a/modules/search.module b/modules/search.module index d366f795e..9670483e4 100644 --- a/modules/search.module +++ b/modules/search.module @@ -357,7 +357,7 @@ function search_index($sid, $type, $text) { if ($tag) { // Increase or decrease score per word based on tag list($tagname) = explode(' ', $value, 2); - $tagname = strtolower($tagname); + $tagname = drupal_strtolower($tagname); if ($tagname{0} == '/') { $score -= $tags[substr($tagname, 1)]; if ($score < 1) { // possible due to bad HTML @@ -389,9 +389,8 @@ function search_index($sid, $type, $text) { $words = search_keywords_split($value); foreach ($words as $word) { // Check wordlength - if (string_length($word) >= $minimum_word_size) { - // Note: strtolower can be used because the value is only used internally. - $word = strtolower($word); + if (drupal_strlen($word) >= $minimum_word_size) { + $word = drupal_strtolower($word); if ($link) { if (!isset($results[$linknid])) { $results[$linknid] = array(); @@ -484,13 +483,12 @@ function do_search($keywords, $type, $join = '', $where = '1', $variation = true continue; } if (strpos($word, '�') !== false) { - // Note: strtolower can be used because the value is only used internally. $words[] = "i.word LIKE '%s'"; - $arguments[] = str_replace('�', '%', strtolower($word)); + $arguments[] = str_replace('�', '%', drupal_strtolower($word)); } else { $words[] = "i.word = '%s'"; - $arguments[] = strtolower($word); + $arguments[] = drupal_strtolower($word); } } // Tell the user which words were excluded diff --git a/modules/search/search.module b/modules/search/search.module index d366f795e..9670483e4 100644 --- a/modules/search/search.module +++ b/modules/search/search.module @@ -357,7 +357,7 @@ function search_index($sid, $type, $text) { if ($tag) { // Increase or decrease score per word based on tag list($tagname) = explode(' ', $value, 2); - $tagname = strtolower($tagname); + $tagname = drupal_strtolower($tagname); if ($tagname{0} == '/') { $score -= $tags[substr($tagname, 1)]; if ($score < 1) { // possible due to bad HTML @@ -389,9 +389,8 @@ function search_index($sid, $type, $text) { $words = search_keywords_split($value); foreach ($words as $word) { // Check wordlength - if (string_length($word) >= $minimum_word_size) { - // Note: strtolower can be used because the value is only used internally. - $word = strtolower($word); + if (drupal_strlen($word) >= $minimum_word_size) { + $word = drupal_strtolower($word); if ($link) { if (!isset($results[$linknid])) { $results[$linknid] = array(); @@ -484,13 +483,12 @@ function do_search($keywords, $type, $join = '', $where = '1', $variation = true continue; } if (strpos($word, '�') !== false) { - // Note: strtolower can be used because the value is only used internally. $words[] = "i.word LIKE '%s'"; - $arguments[] = str_replace('�', '%', strtolower($word)); + $arguments[] = str_replace('�', '%', drupal_strtolower($word)); } else { $words[] = "i.word = '%s'"; - $arguments[] = strtolower($word); + $arguments[] = drupal_strtolower($word); } } // Tell the user which words were excluded diff --git a/modules/system.module b/modules/system.module index 3ff0c6ddf..4b4ec2476 100644 --- a/modules/system.module +++ b/modules/system.module @@ -234,11 +234,11 @@ function system_view_general() { $group = ''; $toolkits_available = image_get_available_toolkits(); if (count($toolkits_available) > 1) { - $group .= form_radios(t('Select an image processing toolkit'), 'image_toolkit', variable_get('image_toolkit', image_get_toolkit()), $toolkits_available); + $group .= form_radios(t('Select an image processing toolkit'), 'image_toolkit', variable_get('image_toolkit', image_get_toolkit()), $toolkits_available); } $group .= image_toolkit_invoke('settings'); if ($group) { - $output .= form_group_collapsible(t('Image handling'), '<p>'.$group.'</p>', TRUE); + $output .= form_group_collapsible(t('Image handling'), '<p>'. $group .'</p>', TRUE); } // Date settings: @@ -276,6 +276,9 @@ function system_view_general() { $output .= form_group_collapsible(t('Date settings'), $group, TRUE); + // String handling: report status and errors. + $output .= form_group_collapsible(t('String handling'), unicode_settings(), TRUE); + return $output; } @@ -678,7 +681,7 @@ function system_theme_settings($key = '') { $rows = array(); // Use $utype field , and strtolower() it to get the type field.. to avoid issues with ucfirst() and unicode. - $type = strtolower($utype); + $type = drupal_strtolower($utype); $value = $settings[$type . '_links']; if (!is_array($value)) { $value = array(); diff --git a/modules/system/system.module b/modules/system/system.module index 3ff0c6ddf..4b4ec2476 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -234,11 +234,11 @@ function system_view_general() { $group = ''; $toolkits_available = image_get_available_toolkits(); if (count($toolkits_available) > 1) { - $group .= form_radios(t('Select an image processing toolkit'), 'image_toolkit', variable_get('image_toolkit', image_get_toolkit()), $toolkits_available); + $group .= form_radios(t('Select an image processing toolkit'), 'image_toolkit', variable_get('image_toolkit', image_get_toolkit()), $toolkits_available); } $group .= image_toolkit_invoke('settings'); if ($group) { - $output .= form_group_collapsible(t('Image handling'), '<p>'.$group.'</p>', TRUE); + $output .= form_group_collapsible(t('Image handling'), '<p>'. $group .'</p>', TRUE); } // Date settings: @@ -276,6 +276,9 @@ function system_view_general() { $output .= form_group_collapsible(t('Date settings'), $group, TRUE); + // String handling: report status and errors. + $output .= form_group_collapsible(t('String handling'), unicode_settings(), TRUE); + return $output; } @@ -678,7 +681,7 @@ function system_theme_settings($key = '') { $rows = array(); // Use $utype field , and strtolower() it to get the type field.. to avoid issues with ucfirst() and unicode. - $type = strtolower($utype); + $type = drupal_strtolower($utype); $value = $settings[$type . '_links']; if (!is_array($value)) { $value = array(); diff --git a/modules/user.module b/modules/user.module index 5f55e3867..ff4666cef 100644 --- a/modules/user.module +++ b/modules/user.module @@ -57,8 +57,8 @@ function user_load($array = array()) { $params[] = $value; } else { - $query .= "LOWER(u.$key) = '%s' AND "; - $params[] = strtolower($value); + $query .= "LOWER(u.$key) = LOWER('%s') AND "; + $params[] = $value; } } $result = db_query_range("SELECT u.* FROM {users} u WHERE $query u.status < 3", $params, 0, 1); diff --git a/modules/user/user.module b/modules/user/user.module index 5f55e3867..ff4666cef 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -57,8 +57,8 @@ function user_load($array = array()) { $params[] = $value; } else { - $query .= "LOWER(u.$key) = '%s' AND "; - $params[] = strtolower($value); + $query .= "LOWER(u.$key) = LOWER('%s') AND "; + $params[] = $value; } } $result = db_query_range("SELECT u.* FROM {users} u WHERE $query u.status < 3", $params, 0, 1); |