- Patch #481504 by JamesAn: converted to drupal_static().

merge-requests/26/head
Dries Buytaert 2009-06-07 02:45:11 +00:00
parent 43b21cffdd
commit fd96af9241
1 changed files with 2 additions and 2 deletions

View File

@ -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')