diff --git a/modules/themeinstallator/themeinstallator.php b/modules/themeinstallator/themeinstallator.php index f068606da..cb8ca92d9 100644 --- a/modules/themeinstallator/themeinstallator.php +++ b/modules/themeinstallator/themeinstallator.php @@ -38,6 +38,11 @@ class ThemeInstallator extends Module private $to_disable = array(); private $to_export = array(); + private $selected_shops = array(); + private $selected_variations = array(); + + public $action_form; + /* ** index */ @@ -64,6 +69,8 @@ class ThemeInstallator extends Module parent::__construct(); $this->displayName = $this->l('Import/export a theme'); $this->description = $this->l('Export or Install a theme and its modules on your shop.'); + + $this->action_form = AdminController::$currentIndex.'&configure='.$this->name.'&token='.Tools::htmlentitiesUTF8(Tools::getValue('token')); } private function getTheNativeModules() @@ -108,7 +115,7 @@ class ThemeInstallator extends Module self::deleteDirectory($dirname.'/'.$file); elseif (file_exists($dirname.'/'.$file)) unlink($dirname.'/'.$file); - } + } rmdir($dirname); } @@ -118,7 +125,7 @@ class ThemeInstallator extends Module return; if (!file_exists($dst)) mkdir($dst); - while(($file = readdir($dir)) !== false) + while (($file = readdir($dir)) !== false) if (strncmp($file, '.', 1) != 0) { if (is_dir($src.'/'.$file)) @@ -167,7 +174,7 @@ class ThemeInstallator extends Module unlink(_EXPORT_FOLDER_.'archive.zip'); } - private function init_defines() + private function initDefines() { define('_EXPORT_FOLDER_', dirname(__FILE__).'/export/'); define('_IMPORT_FOLDER_', dirname(__FILE__).'/import/'); @@ -179,12 +186,26 @@ class ThemeInstallator extends Module if (!Tools::isSubmit('cancelExport') && (Tools::isSubmit('exportTheme') || Tools::isSubmit('submitExport'))) $this->page = 'exportPage'; - $this->_html = '