From ee4f5860f20ff7b2d033984c8637889a79a8b20d 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 --- 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, '.', '') - ); + )); } }