Speed: Avoid sql request if key is empty.

This commit is contained in:
Laurent Destailleur 2008-05-03 21:44:32 +00:00
parent cbfce9e07d
commit 0fd759d695

View File

@ -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]))
{