summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-07-19 06:03:04 +0000
committerDries Buytaert <dries@buytaert.net>2009-07-19 06:03:04 +0000
commit53e31e6d6222725f5152e8bea870fd248868b1bf (patch)
treef911651ab391a20a316d121a8ccb0595be044231 /includes
parentde0eb79c2a51c91578e83bcaaafa24c1e75f2829 (diff)
downloadbrdo-53e31e6d6222725f5152e8bea870fd248868b1bf.tar.gz
brdo-53e31e6d6222725f5152e8bea870fd248868b1bf.tar.bz2
- Patch #523694 by catch: improve performance of t().
Diffstat (limited to 'includes')
-rw-r--r--includes/common.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 487a716e9..1ac613b73 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -1138,7 +1138,7 @@ function fix_gpc_magic() {
*/
function t($string, array $args = array(), array $options = array()) {
global $language;
- $custom_strings = &drupal_static(__FUNCTION__);
+ static $custom_strings;
// Merge in default.
if (empty($options['langcode'])) {
@@ -1163,7 +1163,7 @@ function t($string, array $args = array(), array $options = array()) {
// We don't use drupal_function_exists() here, because it breaks the testing
// framework if the locale module is enabled in the parent site (we cannot
// unload functions in PHP).
- elseif (module_exists('locale') && $options['langcode'] != 'en') {
+ elseif (function_exists('locale') && $options['langcode'] != 'en') {
$string = locale($string, $options['context'], $options['langcode']);
}
if (empty($args)) {