From 0fd759d695a519233d6986b8531c7a6bfe894c7b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 3 May 2008 21:44:32 +0000 Subject: [PATCH] Speed: Avoid sql request if key is empty. --- htdocs/translate.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/translate.class.php b/htdocs/translate.class.php index e71b08f28aa..75a1edf630a 100644 --- a/htdocs/translate.class.php +++ b/htdocs/translate.class.php @@ -494,6 +494,9 @@ class Translate { */ function getLabelFromKey($db,$key,$tablename,$fieldkey,$fieldlabel) { + // If key empty + if ($key == '') return ''; + // Check in cache if (! empty($this->cache_labels[$tablename][$key])) {