From fd96af92411341f9d672f9ba69c0a94c4b597fe8 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 7 Jun 2009 02:45:11 +0000 Subject: - Patch #481504 by JamesAn: converted to drupal_static(). --- modules/translation/translation.module | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules') 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') -- cgit v1.2.3