// Context part 20

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7740 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean
2011-07-26 15:55:04 +00:00
parent fddc7a6a75
commit 51b4c8591d
10 changed files with 72 additions and 73 deletions
+2 -6
View File
@@ -1803,14 +1803,10 @@ abstract class AdminTabCore
* @param integer $id_lang Language id (optional)
* @return string
*/
protected function getFieldValue($obj, $key, $id_lang = NULL, Context $context = NULL)
protected function getFieldValue($obj, $key, $id_lang = NULL, $id_shop = null)
{
$id_shop = ($context) ? $context->shop->getID() : null;
if (!$context)
$context = Context::getContext();
if (!$id_shop AND $obj->isLangMultishop())
$id_shop = $context->shop->getID();
$id_shop = Context::getContext()->shop->getID();
if ($id_lang)
$defaultValue = ($obj->id AND isset($obj->{$key}[$id_lang])) ? $obj->{$key}[$id_lang] : '';