// Update "$this->context->employee->id" to "Context::getContext()->employee->id"
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8334 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
1 parent
3eff951265
commit
3842a2f473
1 file changed
+2
-2
@@ -46,7 +46,7 @@ class Notification
|
|||||||
$employee_infos = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
|
$employee_infos = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
|
||||||
SELECT id_last_order, id_last_message, id_last_customer
|
SELECT id_last_order, id_last_message, id_last_customer
|
||||||
FROM `'._DB_PREFIX_.'employee`
|
FROM `'._DB_PREFIX_.'employee`
|
||||||
WHERE `id_employee` = '.(int)$this->context->employee->id);
|
WHERE `id_employee` = '.(int)Context::getContext()->employee->id);
|
||||||
|
|
||||||
foreach ($this->types as $type)
|
foreach ($this->types as $type)
|
||||||
$notifications[$type] = Notification::getLastElementsIdsByType($type, $employee_infos['id_last_'.$type]);
|
$notifications[$type] = Notification::getLastElementsIdsByType($type, $employee_infos['id_last_'.$type]);
|
||||||
@@ -94,7 +94,7 @@ class Notification
|
|||||||
UPDATE `'._DB_PREFIX_.'employee`
|
UPDATE `'._DB_PREFIX_.'employee`
|
||||||
SET `id_last_'.pSQL($type).'` = (SELECT MAX(`id_'.$type.'`)
|
SET `id_last_'.pSQL($type).'` = (SELECT MAX(`id_'.$type.'`)
|
||||||
FROM `'._DB_PREFIX_.(($type == 'order') ? pSQL($type).'s' : pSQL($type)).'`)
|
FROM `'._DB_PREFIX_.(($type == 'order') ? pSQL($type).'s' : pSQL($type)).'`)
|
||||||
WHERE `id_employee` = '.(int)$this->context->employee->id);
|
WHERE `id_employee` = '.(int)Context::getContext()->employee->id);
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user