From 0787c21bd94f58ce5b7f293929fb055770a4d895 Mon Sep 17 00:00:00 2001 From: lLefevre Date: Thu, 5 Jan 2012 13:52:45 +0000 Subject: [PATCH] [-] BO : fix action add in AdminBackupController git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12187 b9a71923-0436-4b27-9f14-aed3839534dd --- controllers/admin/AdminBackupController.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/controllers/admin/AdminBackupController.php b/controllers/admin/AdminBackupController.php index d62baaa0a..1e0f1570b 100644 --- a/controllers/admin/AdminBackupController.php +++ b/controllers/admin/AdminBackupController.php @@ -114,6 +114,14 @@ class AdminBackupControllerCore extends AdminController } } + public function initContent() + { + if ($this->display == 'add') + $this->display = 'list'; + + parent::initContent(); + } + /** * Load class object using identifier in $_GET (if possible) * otherwise return an empty object @@ -150,11 +158,11 @@ class AdminBackupControllerCore extends AdminController if (!$object->add()) $this->_errors[] = $object->error; else - $this->tpl_view_vars = array( + $this->context->smarty->assign(array( 'conf' => $this->l('It appears that the Backup was successful, however, you must download and carefully verify the Backup file.'), 'backup_url' => $object->getBackupURL(), 'backup_weight' => number_format((filesize($object->id) * 0.000001), 2, '.', '') - ); + )); } }