// Fixed upgrade to 1.6.0.1

This commit is contained in:
Damien Metzger
2013-12-02 15:28:02 +01:00
parent 0d7a48095c
commit c8ca67eef5
8 changed files with 62 additions and 65 deletions
+15 -17
View File
@@ -50,21 +50,19 @@ class Dashactivity extends Module
Configuration::updateValue('DASHACTIVITY_CART_ABANDONED_MAX', 48);
Configuration::updateValue('DASHACTIVITY_VISITOR_ONLINE', 24);
if (!parent::install()
|| !$this->registerHook('dashboardZoneOne')
|| !$this->registerHook('dashboardData')
|| !$this->registerHook('actionObjectOrderAddAfter')
|| !$this->registerHook('actionObjectCustomerAddAfter')
|| !$this->registerHook('actionObjectCustomerMessageAddAfter')
|| !$this->registerHook('actionObjectCustomerThreadAddAfter')
|| !$this->registerHook('actionObjectOrderReturnAddAfter')
|| !$this->registerHook('displayBackOfficeHeader')
)
return false;
return true;
return (parent::install()
&& $this->registerHook('dashboardZoneOne')
&& $this->registerHook('dashboardData')
&& $this->registerHook('actionObjectOrderAddAfter')
&& $this->registerHook('actionObjectCustomerAddAfter')
&& $this->registerHook('actionObjectCustomerMessageAddAfter')
&& $this->registerHook('actionObjectCustomerThreadAddAfter')
&& $this->registerHook('actionObjectOrderReturnAddAfter')
&& $this->registerHook('actionAdminControllerSetMedia')
);
}
public function hookDisplayBackOfficeHeader()
public function hookActionAdminControllerSetMedia()
{
if (get_class($this->context->controller) == 'AdminDashboardController')
{
@@ -78,20 +76,20 @@ class Dashactivity extends Module
public function hookDashboardZoneOne($params)
{
$gapi_mode = 'configure';
if (!Module::isInstalled('gapi'))
$gapi_mode = 'install';
elseif (($gapi = Module::getInstanceByName('gapi')) && Validate::isLoadedObject($gapi) && $gapi->isConfigured())
$gapi_mode = false;
else
$gapi_mode = 'configure';
$this->context->smarty->assign(array_merge(array(
$this->context->smarty->assign($this->getConfigFieldsValues());
$this->context->smarty->assign(array(
'gapi_mode' => $gapi_mode,
'dashactivity_config_form' => $this->renderConfigForm(),
'date_subtitle' => $this->l('(from %s to %s)'),
'date_format' => $this->context->language->date_format_lite,
'link' => $this->context->link,
), $this->getConfigFieldsValues()));
));
return $this->display(__FILE__, 'dashboard_zone_one.tpl');
}
+2 -2
View File
@@ -89,7 +89,7 @@ class Dashgoals extends Module
&& parent::install()
&& $this->registerHook('dashboardZoneTwo')
&& $this->registerHook('dashboardData')
&& $this->registerHook('displayBackOfficeHeader')
&& $this->registerHook('actionAdminControllerSetMedia')
);
}
@@ -104,7 +104,7 @@ class Dashgoals extends Module
return parent::uninstall();
}
public function hookDisplayBackOfficeHeader()
public function hookActionAdminControllerSetMedia()
{
if (get_class($this->context->controller) == 'AdminDashboardController')
$this->context->controller->addJs($this->_path.'views/js/'.$this->name.'.js');
+4 -3
View File
@@ -47,9 +47,10 @@ class Dashproducts extends Module
Configuration::updateValue('DASHPRODUCT_NBR_SHOW_MOST_VIEWED', 10);
Configuration::updateValue('DASHPRODUCT_NBR_SHOW_TOP_SEARCH', 10);
if (!parent::install() || !$this->registerHook('dashboardZoneTwo') || !$this->registerHook('dashboardData'))
return false;
return true;
return (parent::install()
&& $this->registerHook('dashboardZoneTwo')
&& $this->registerHook('dashboardData')
);
}
public function hookDashboardZoneTwo($params)
+6 -4
View File
@@ -48,12 +48,14 @@ class Dashtrends extends Module
public function install()
{
if (!parent::install() || !$this->registerHook('dashboardZoneTwo') || !$this->registerHook('dashboardData') || !$this->registerHook('displayBackOfficeHeader'))
return false;
return true;
return (parent::install()
&& $this->registerHook('dashboardZoneTwo')
&& $this->registerHook('dashboardData')
&& $this->registerHook('actionAdminControllerSetMedia')
);
}
public function hookDisplayBackOfficeHeader()
public function hookActionAdminControllerSetMedia()
{
if (get_class($this->context->controller) == 'AdminDashboardController')
$this->context->controller->addJs($this->_path.'views/js/'.$this->name.'.js');
+1 -1
View File
@@ -125,7 +125,7 @@ class HomeFeatured extends Module
/* Retro Compatibility < 1.6.0.1 */
public function hookDisplayHome($params)
{
return $this->hookDisplayHomeTabContent();
return $this->hookDisplayHomeTabContent($params);
}
public function hookAddProduct($params)