//smal fix on hookDashboardData params
This commit is contained in:
1 parent
de8bd97831
commit
9af3b30135
1 file changed
+7
-2
@@ -343,7 +343,12 @@ class AdminDashboardControllerCore extends AdminController
|
|||||||
$module = Tools::getValue('module');
|
$module = Tools::getValue('module');
|
||||||
$hook = Tools::getValue('hook');
|
$hook = Tools::getValue('hook');
|
||||||
$configs = Tools::getValue('configs');
|
$configs = Tools::getValue('configs');
|
||||||
|
|
||||||
|
$params = array(
|
||||||
|
'date_from' => $this->context->employee->stats_date_from,
|
||||||
|
'date_to' => $this->context->employee->stats_date_to
|
||||||
|
);
|
||||||
|
|
||||||
if (Validate::isModuleName($module) && $module_obj = Module::getInstanceByName($module))
|
if (Validate::isModuleName($module) && $module_obj = Module::getInstanceByName($module))
|
||||||
if (Validate::isLoadedObject($module_obj) && method_exists($module_obj, 'saveDashConfig'))
|
if (Validate::isLoadedObject($module_obj) && method_exists($module_obj, 'saveDashConfig'))
|
||||||
$return['has_errors'] = $module_obj->saveDashConfig($configs);
|
$return['has_errors'] = $module_obj->saveDashConfig($configs);
|
||||||
@@ -353,7 +358,7 @@ class AdminDashboardControllerCore extends AdminController
|
|||||||
Configuration::updateValue($name, $value);
|
Configuration::updateValue($name, $value);
|
||||||
|
|
||||||
if (Validate::isHookName($hook) && method_exists($module_obj, $hook))
|
if (Validate::isHookName($hook) && method_exists($module_obj, $hook))
|
||||||
$return['widget_html'] = $module_obj->$hook(array());
|
$return['widget_html'] = $module_obj->$hook($params);
|
||||||
|
|
||||||
die(Tools::jsonEncode($return));
|
die(Tools::jsonEncode($return));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user