// Fix translation performance for any tab used by module

This commit is contained in:
vSchoener
2011-12-30 14:43:46 +00:00
parent 1d125981f0
commit 11daef7ef1
2 changed files with 44 additions and 8 deletions
+20
View File
@@ -173,6 +173,26 @@ class TabCore extends ObjectModel
);
}
/**
* Return the list of tab used by a module
*
* @static
* @return array
*/
public static function getModuleTabList()
{
$list = array();
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
SELECT t.`class_name`, t.`module`
FROM `'._DB_PREFIX_.'tab` t
WHERE t.`module` IS NOT NULL AND t.`module` != ""');
foreach ($result as $detail)
$list[strtolower($detail['class_name'])] = $detail;
return $list;
}
/**
* Get tabs
*