summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-06-07 02:45:11 +0000
committerDries Buytaert <dries@buytaert.net>2009-06-07 02:45:11 +0000
commitfd96af92411341f9d672f9ba69c0a94c4b597fe8 (patch)
treedd93b8508a9f334d4a170445898b20f385715c29
parent43b21cffddeaf50b5690888c66fd2eb179d3d8d1 (diff)
downloadbrdo-fd96af92411341f9d672f9ba69c0a94c4b597fe8.tar.gz
brdo-fd96af92411341f9d672f9ba69c0a94c4b597fe8.tar.bz2
- Patch #481504 by JamesAn: converted to drupal_static().
-rw-r--r--modules/translation/translation.module4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/translation/translation.module b/modules/translation/translation.module
index 28cf089ed..58045f396 100644
--- a/modules/translation/translation.module
+++ b/modules/translation/translation.module
@@ -355,9 +355,9 @@ function translation_remove_from_set($node) {
* need more properties. The array is indexed by language code.
*/
function translation_node_get_translations($tnid) {
- static $translations = array();
-
if (is_numeric($tnid) && $tnid) {
+ $translations = &drupal_static(__FUNCTION__, array());
+
if (!isset($translations[$tnid])) {
$translations[$tnid] = array();
$result = db_select('node', 'n')