diff --git a/tests/phpunit/selenium/catalog/AmazonPaymentsTest.php b/tests/phpunit/selenium/catalog/AmazonPaymentsTest.php index 52ef2296092..8df5e156c70 100644 --- a/tests/phpunit/selenium/catalog/AmazonPaymentsTest.php +++ b/tests/phpunit/selenium/catalog/AmazonPaymentsTest.php @@ -96,7 +96,7 @@ public function setUpPage() { $this->byCssSelector('.fa-plus-circle')->click(); for ($i = 1; ; $i++) { - $element = $this->byCssSelector('select[name="amazon_checkout_layout_module[0][layout_id]"] option:nth-child(' . $i . ')'); + $element = $this->byCssSelector('select[name="amazon_button_module[0][layout_id]"] option:nth-child(' . $i . ')'); if ($element->text() == 'Cart') { $element->click(); diff --git a/tests/phpunit/selenium/catalog/PayPalExpressTest.php b/tests/phpunit/selenium/catalog/PayPalExpressTest.php index 18a06a1c43b..490ebd0ab07 100644 --- a/tests/phpunit/selenium/catalog/PayPalExpressTest.php +++ b/tests/phpunit/selenium/catalog/PayPalExpressTest.php @@ -124,7 +124,7 @@ public function setUpPage() { $this->byCssSelector('.fa-plus-circle')->click(); for ($i = 1; ; $i++) { - $element = $this->byCssSelector("select[name=\"pp_layout_module[0][layout_id]\"] option:nth-child($i)"); + $element = $this->byCssSelector("select[name=\"pp_button_module[0][layout_id]\"] option:nth-child($i)"); if ($element->text() == 'Cart') { $element->click(); diff --git a/tests/phpunit/selenium/catalog/SagePayDirectTest.php b/tests/phpunit/selenium/catalog/SagePayDirectTest.php index 044f8738aab..1d8bacadd31 100644 --- a/tests/phpunit/selenium/catalog/SagePayDirectTest.php +++ b/tests/phpunit/selenium/catalog/SagePayDirectTest.php @@ -104,7 +104,7 @@ public function setUpPage() { $this->byCssSelector('.fa-plus-circle')->click(); for ($i = 1; ; $i++) { - $element = $this->byCssSelector("select[name=\"pp_layout_module[0][layout_id]\"] option:nth-child($i)"); + $element = $this->byCssSelector("select[name=\"pp_button_module[0][layout_id]\"] option:nth-child($i)"); if ($element->text() == 'Cart') { $element->click(); diff --git a/upload/admin/controller/design/layout.php b/upload/admin/controller/design/layout.php index 3ed4ada4823..1c6b79f9984 100644 --- a/upload/admin/controller/design/layout.php +++ b/upload/admin/controller/design/layout.php @@ -360,50 +360,41 @@ protected function getForm() { $this->load->model('extension/extension'); - $this->load->model('extension/module'); $data['modules'] = array(); // Get a list of installed modules $extensions = $this->model_extension_extension->getInstalled('module'); - - foreach ($extensions as $code) { - if (!$this->config->has($code . '_module')) { - $this->load->language('module/' . $code); - $data['modules'][] = array( - 'name' => $this->language->get('heading_title'), - 'code' => $code, - 'module' => '' - ); - } - } - // Add all the modules which have multiple settings for each module foreach ($extensions as $code) { - if ($this->config->has($code . '_module')) { - $this->load->language('module/' . $code); + $this->load->language('module/' . $code); + + $i = 1; - $i = 1; - - $module_data = array(); - - $modules = $this->model_extension_module->getModules($code); + $module_data = array(); + + if ($this->config->has($code . '_module')) { + $modules = $this->config->get($code . '_module'); - foreach ($modules as $module) { + foreach (array_keys($modules) as $key) { $module_data[] = array( 'name' => $this->language->get('heading_title') . ' ' . $i++, - 'code' => $code . '.' . $module['module_id'] - ); - } - - if ($module_data) { - $data['modules'][] = array( - 'name' => $this->language->get('heading_title'), - 'code' => $code, - 'module' => $module_data + 'code' => $code . '.' . $key ); } + } else { + $module_data[] = array( + 'name' => $this->language->get('heading_title'), + 'code' => $code + ); + } + + if ($module_data) { + $data['modules'][] = array( + 'name' => $this->language->get('heading_title'), + 'module' => $module_data + ); } } diff --git a/upload/admin/controller/extension/module.php b/upload/admin/controller/extension/module.php index 9be215038a1..65cd3899181 100644 --- a/upload/admin/controller/extension/module.php +++ b/upload/admin/controller/extension/module.php @@ -52,6 +52,10 @@ public function uninstall() { $this->model_setting_setting->deleteSetting($this->request->get['extension']); + $this->load->model('extension/module'); + + $this->model_extension_module->deleteModule($this->request->get['extension']); + // Call uninstall method if it exsits $this->load->controller('module/' . $this->request->get['extension'] . '/uninstall'); diff --git a/upload/admin/controller/module/amazon_checkout_layout.php b/upload/admin/controller/module/amazon_button.php similarity index 74% rename from upload/admin/controller/module/amazon_checkout_layout.php rename to upload/admin/controller/module/amazon_button.php index 7a3fa428b12..46b402ab12d 100644 --- a/upload/admin/controller/module/amazon_checkout_layout.php +++ b/upload/admin/controller/module/amazon_button.php @@ -1,14 +1,14 @@ language->load('module/amazon_checkout_layout'); + $this->language->load('module/amazon_button'); $this->document->setTitle($this->language->get('heading_title')); $this->load->model('setting/setting'); if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) { - $this->model_setting_setting->editSetting('amazon_checkout_layout', $this->request->post); + $this->model_setting_setting->editSetting('amazon_button', $this->request->post); $this->session->data['success'] = $this->language->get('text_success'); @@ -48,25 +48,25 @@ public function index() { $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), - 'href' => $this->url->link('module/amazon_checkout_layout', 'token=' . $this->session->data['token'], 'SSL'), + 'href' => $this->url->link('module/amazon_button', 'token=' . $this->session->data['token'], 'SSL'), 'separator' => ' :: ' ); - $data['action'] = $this->url->link('module/amazon_checkout_layout', 'token=' . $this->session->data['token'], 'SSL'); + $data['action'] = $this->url->link('module/amazon_button', 'token=' . $this->session->data['token'], 'SSL'); $data['cancel'] = $this->url->link('extension/module', 'token=' . $this->session->data['token'], 'SSL'); - if (isset($this->request->post['amazon_checkout_layout_status'])) { - $data['amazon_checkout_layout_status'] = $this->request->post['amazon_checkout_layout_status']; + if (isset($this->request->post['amazon_button_status'])) { + $data['amazon_button_status'] = $this->request->post['amazon_button_status']; } else { - $data['amazon_checkout_layout_status'] = $this->config->get('amazon_checkout_layout_status'); + $data['amazon_button_status'] = $this->config->get('amazon_button_status'); } $data['header'] = $this->load->controller('common/header'); $data['column_left'] = $this->load->controller('common/column_left'); $data['footer'] = $this->load->controller('common/footer'); - $this->response->setOutput($this->load->view('module/amazon_checkout_layout.tpl', $data)); + $this->response->setOutput($this->load->view('module/amazon_button.tpl', $data)); } protected function validate() { diff --git a/upload/admin/controller/module/banner.php b/upload/admin/controller/module/banner.php index 133b0539fd6..5aeb4f1db4c 100644 --- a/upload/admin/controller/module/banner.php +++ b/upload/admin/controller/module/banner.php @@ -9,14 +9,9 @@ public function index() { $this->load->model('setting/setting'); - $this->load->model('extension/module'); - if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) { $this->model_setting_setting->editSetting('banner', $this->request->post); - // We need to add modules to a separate table - $this->model_extension_module->addModule('banner', $this->request->post['module']); - $this->session->data['success'] = $this->language->get('text_success'); $this->response->redirect($this->url->link('extension/module', 'token=' . $this->session->data['token'], 'SSL')); @@ -78,10 +73,23 @@ public function index() { $data['banner_status'] = $this->config->get('banner_status'); } - if (isset($this->request->post['module'])) { - $data['modules'] = $this->request->post['module']; + if (isset($this->request->post['banner_module'])) { + $modules = $this->request->post['banner_module']; + } elseif ($this->config->has('banner_module')) { + $modules = $this->config->get('banner_module'); } else { - $data['modules'] = $this->extension_module->getModules('banner'); + $modules = array(); + } + + $data['banner_modules'] = array(); + + foreach ($modules as $key => $module) { + $data['banner_modules'][] = array( + 'key' => $key, + 'banner_id' => $module['banner_id'], + 'width' => $module['width'], + 'height' => $module['height'] + ); } $this->load->model('design/banner'); @@ -100,8 +108,8 @@ protected function validate() { $this->error['warning'] = $this->language->get('error_permission'); } - if (isset($this->request->post['banner_module'])) { - foreach ($this->request->post['banner_module'] as $key => $value) { + if (isset($this->request->post['module'])) { + foreach ($this->request->post['module'] as $key => $value) { if (!$value['width'] || !$value['height']) { $this->error['dimension'][$key] = $this->language->get('error_dimension'); } diff --git a/upload/admin/controller/module/bestseller.php b/upload/admin/controller/module/bestseller.php index ec7ec4f5fca..79967e9e203 100644 --- a/upload/admin/controller/module/bestseller.php +++ b/upload/admin/controller/module/bestseller.php @@ -9,14 +9,9 @@ public function index() { $this->load->model('setting/setting'); - $this->load->model('extension/module'); - if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) { $this->model_setting_setting->editSetting('bestseller', $this->request->post['bestseller_status']); - // We need to add modules to a table - $this->model_extension_module->addModule('bestseller', $this->request->post['module']); - $this->cache->delete('product'); $this->session->data['success'] = $this->language->get('text_success'); @@ -80,12 +75,25 @@ public function index() { $data['bestseller_status'] = $this->config->get('bestseller_status'); } - if (isset($this->request->post['module'])) { - $data['modules'] = $this->request->post['module']; + if (isset($this->request->post['bestseller_module'])) { + $modules = $this->request->post['bestseller_module']; + } elseif ($this->config->has('bestseller_module')) { + $modules = $this->config->get('bestseller_module'); } else { - $data['modules'] = $this->extension_module->getModules('bestseller'); + $modules = array(); } - + + $data['bestseller_modules'] = array(); + + foreach ($modules as $key => $module) { + $data['bestseller_modules'][] = array( + 'key' => $key, + 'limit' => $module['limit'], + 'width' => $module['width'], + 'height' => $module['height'] + ); + } + $data['header'] = $this->load->controller('common/header'); $data['column_left'] = $this->load->controller('common/column_left'); $data['footer'] = $this->load->controller('common/footer'); diff --git a/upload/admin/controller/module/carousel.php b/upload/admin/controller/module/carousel.php index 2063fda5ce5..d425ad32c9c 100644 --- a/upload/admin/controller/module/carousel.php +++ b/upload/admin/controller/module/carousel.php @@ -9,13 +9,8 @@ public function index() { $this->load->model('setting/setting'); - $this->load->model('extension/module'); - if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) { $this->model_setting_setting->editSetting('carousel', $this->request->post); - - // We need to add modules to a table - $this->model_extension_module->addModule('bestseller', $this->request->post['module']); $this->session->data['success'] = $this->language->get('text_success'); @@ -80,10 +75,25 @@ public function index() { $data['carousel_status'] = $this->config->get('carousel_status'); } - if (isset($this->request->post['module'])) { - $data['modules'] = $this->request->post['module']; + if (isset($this->request->post['carousel_module'])) { + $modules = $this->request->post['carousel_module']; + } elseif ($this->config->has('carousel_module')) { + $modules = $this->config->get('carousel_module'); } else { - $data['modules'] = $this->extension_module->getModules('carousel'); + $modules = array(); + } + + $data['carousel_modules'] = array(); + + foreach ($modules as $key => $module) { + $data['carousel_modules'][] = array( + 'key' => $key, + 'banner_id' => $module['banner_id'], + 'limit' => $module['limit'], + 'scroll' => $module['scroll'], + 'width' => $module['width'], + 'height' => $module['height'] + ); } $this->load->model('design/banner'); diff --git a/upload/admin/controller/module/featured.php b/upload/admin/controller/module/featured.php index fbdf21c2f58..69308c961a5 100644 --- a/upload/admin/controller/module/featured.php +++ b/upload/admin/controller/module/featured.php @@ -9,13 +9,8 @@ public function index() { $this->load->model('setting/setting'); - $this->load->model('extension/module'); - if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) { $this->model_setting_setting->editSetting('featured', $this->request->post); - - // We need to add modules to a table - $this->model_extension_module->addModule('featured', $this->request->post['module']); $this->session->data['success'] = $this->language->get('text_success'); @@ -109,13 +104,26 @@ public function index() { } else { $data['featured_status'] = $this->config->get('featured_status'); } - - if (isset($this->request->post['module'])) { - $data['modules'] = $this->request->post['module']; + + if (isset($this->request->post['featured_module'])) { + $modules = $this->request->post['featured_module']; + } elseif ($this->config->has('featured_module')) { + $modules = $this->config->get('featured_module'); } else { - $data['modules'] = $this->extension_module->getModules('featured'); + $modules = array(); } + $data['featured_modules'] = array(); + + foreach ($modules as $key => $module) { + $data['featured_modules'][] = array( + 'key' => $key, + 'limit' => $module['limit'], + 'width' => $module['width'], + 'height' => $module['height'] + ); + } + $data['header'] = $this->load->controller('common/header'); $data['column_left'] = $this->load->controller('common/column_left'); $data['footer'] = $this->load->controller('common/footer'); diff --git a/upload/admin/controller/module/html.php b/upload/admin/controller/module/html.php index 81253bdca0a..79606338a23 100644 --- a/upload/admin/controller/module/html.php +++ b/upload/admin/controller/module/html.php @@ -9,13 +9,9 @@ public function index() { $this->load->model('setting/setting'); - $this->load->model('extension/module'); - if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) { $this->model_setting_setting->editSetting('html', $this->request->post); - $this->model_extension_module->addModule('html', $this->request->post['module']); - $this->session->data['success'] = $this->language->get('text_success'); $this->response->redirect($this->url->link('extension/module', 'token=' . $this->session->data['token'], 'SSL')); @@ -71,10 +67,22 @@ public function index() { $data['html_status'] = $this->config->get('html_status'); } - if (isset($this->request->post['module'])) { - $data['modules'] = $this->request->post['module']; + if (isset($this->request->post['html_module'])) { + $modules = $this->request->post['html_module']; + } elseif ($this->config->has('html_module')) { + $modules = $this->config->get('html_module'); } else { - $data['modules'] = $this->extension_module->getModules('html'); + $modules = array(); + } + + $data['html_modules'] = array(); + + foreach ($modules as $key => $module) { + $data['html_modules'][] = array( + 'key' => $key, + 'heading' => $module['heading'], + 'description' => $module['description'] + ); } $this->load->model('localisation/language'); diff --git a/upload/admin/controller/module/latest.php b/upload/admin/controller/module/latest.php index d4681b4c382..4fa82d02106 100644 --- a/upload/admin/controller/module/latest.php +++ b/upload/admin/controller/module/latest.php @@ -9,14 +9,9 @@ public function index() { $this->load->model('setting/setting'); - $this->load->model('extension/module'); - if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) { $this->model_setting_setting->editSetting('latest', $this->request->post); - // We need to add modules to a table - $this->model_extension_module->addModule('latest', $this->request->post['module']); - $this->cache->delete('product'); $this->session->data['success'] = $this->language->get('text_success'); @@ -80,10 +75,23 @@ public function index() { $data['latest_status'] = $this->config->get('latest_status'); } - if (isset($this->request->post['module'])) { - $data['modules'] = $this->request->post['module']; + if (isset($this->request->post['latest_module'])) { + $modules = $this->request->post['latest_module']; + } elseif ($this->config->has('latest_module')) { + $modules = $this->config->get('latest_module'); } else { - $data['modules'] = $this->model_extension_module->getModules('latest'); + $modules = array(); + } + + $data['latest_modules'] = array(); + + foreach ($modules as $key => $module) { + $data['latest_modules'][] = array( + 'key' => $key, + 'limit' => $module['limit'], + 'width' => $module['width'], + 'height' => $module['height'] + ); } $data['header'] = $this->load->controller('common/header'); diff --git a/upload/admin/controller/module/pp_layout.php b/upload/admin/controller/module/pp_button.php similarity index 78% rename from upload/admin/controller/module/pp_layout.php rename to upload/admin/controller/module/pp_button.php index 1bbee7139fa..4b8b5421650 100644 --- a/upload/admin/controller/module/pp_layout.php +++ b/upload/admin/controller/module/pp_button.php @@ -1,14 +1,14 @@ language->load('module/pp_layout'); + $this->language->load('module/pp_button'); $this->load->model('setting/setting'); $this->document->setTitle($this->language->get('heading_title')); if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) { - $this->model_setting_setting->editSetting('pp_layout', $this->request->post); + $this->model_setting_setting->editSetting('pp_button', $this->request->post); $this->session->data['success'] = $this->language->get('text_success'); @@ -46,28 +46,28 @@ public function index() { $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), - 'href' => $this->url->link('module/pp_layout', 'token=' . $this->session->data['token'], 'SSL') + 'href' => $this->url->link('module/pp_button', 'token=' . $this->session->data['token'], 'SSL') ); - $data['action'] = $this->url->link('module/pp_layout', 'token=' . $this->session->data['token'], 'SSL'); + $data['action'] = $this->url->link('module/pp_button', 'token=' . $this->session->data['token'], 'SSL'); $data['cancel'] = $this->url->link('extension/module', 'token=' . $this->session->data['token'], 'SSL'); - if (isset($this->request->post['pp_layout_status'])) { - $data['pp_layout_status'] = $this->request->post['pp_layout_status']; + if (isset($this->request->post['pp_button_status'])) { + $data['pp_button_status'] = $this->request->post['pp_button_status']; } else { - $data['pp_layout_status'] = $this->config->get('pp_layout_status'); + $data['pp_button_status'] = $this->config->get('pp_button_status'); } $data['header'] = $this->load->controller('common/header'); $data['column_left'] = $this->load->controller('common/column_left'); $data['footer'] = $this->load->controller('common/footer'); - $this->response->setOutput($this->load->view('module/pp_layout.tpl', $data)); + $this->response->setOutput($this->load->view('module/pp_button.tpl', $data)); } protected function validate() { - if (!$this->user->hasPermission('modify', 'module/pp_layout')) { + if (!$this->user->hasPermission('modify', 'module/pp_button')) { $this->error['warning'] = $this->language->get('error_permission'); } diff --git a/upload/admin/controller/module/slideshow.php b/upload/admin/controller/module/slideshow.php index f7f52dfca82..7dbca11f67d 100644 --- a/upload/admin/controller/module/slideshow.php +++ b/upload/admin/controller/module/slideshow.php @@ -9,13 +9,9 @@ public function index() { $this->load->model('setting/setting'); - $this->load->model('extension/module'); - if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) { $this->model_setting_setting->editSetting('slideshow', $this->request->post); - $this->model_extension_module->addModule('slideshow', $this->request->post['module']); - $this->session->data['success'] = $this->language->get('text_success'); $this->response->redirect($this->url->link('extension/module', 'token=' . $this->session->data['token'], 'SSL')); @@ -77,10 +73,23 @@ public function index() { $data['slideshow_status'] = $this->config->get('slideshow_status'); } - if (isset($this->request->post['module'])) { - $data['modules'] = $this->request->post['module']; + if (isset($this->request->post['slideshow_module'])) { + $modules = $this->request->post['slideshow_module']; + } elseif ($this->config->has('slideshow_module')) { + $modules = $this->config->get('slideshow_module'); } else { - $data['modules'] = $this->model_extension_module->getModules('latest'); + $modules = array(); + } + + $data['slideshow_modules'] = array(); + + foreach ($modules as $key => $module) { + $data['slideshow_modules'][] = array( + 'key' => $key, + 'banner_id' => $module['banner_id'], + 'width' => $module['width'], + 'height' => $module['height'] + ); } $this->load->model('design/banner'); diff --git a/upload/admin/controller/module/special.php b/upload/admin/controller/module/special.php index c5b12259f1f..2846d4cc308 100644 --- a/upload/admin/controller/module/special.php +++ b/upload/admin/controller/module/special.php @@ -9,13 +9,8 @@ public function index() { $this->load->model('setting/setting'); - $this->load->model('extension/module'); - if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) { $this->model_setting_setting->editSetting('special', $this->request->post); - - // We need to add modules to a table - $this->model_extension_module->addModule('special', $this->request->post['module']); $this->cache->delete('product'); @@ -79,11 +74,24 @@ public function index() { } else { $data['special_status'] = $this->config->get('special_status'); } - - if (isset($this->request->post['module'])) { - $data['modules'] = $this->request->post['module']; + + if (isset($this->request->post['special_module'])) { + $modules = $this->request->post['special_module']; + } elseif ($this->config->has('special_module')) { + $modules = $this->config->get('special_module'); } else { - $data['modules'] = $this->model_extension_module->getModules('special'); + $modules = array(); + } + + $data['special_modules'] = array(); + + foreach ($modules as $key => $module) { + $data['special_modules'][] = array( + 'key' => $key, + 'limit' => $module['limit'], + 'width' => $module['width'], + 'height' => $module['height'] + ); } $data['header'] = $this->load->controller('common/header'); diff --git a/upload/admin/language/english/module/amazon_checkout_layout.php b/upload/admin/language/english/module/amazon_button.php similarity index 100% rename from upload/admin/language/english/module/amazon_checkout_layout.php rename to upload/admin/language/english/module/amazon_button.php diff --git a/upload/admin/language/english/module/pp_layout.php b/upload/admin/language/english/module/pp_button.php similarity index 100% rename from upload/admin/language/english/module/pp_layout.php rename to upload/admin/language/english/module/pp_button.php diff --git a/upload/admin/model/design/layout.php b/upload/admin/model/design/layout.php index a0ac06d71f0..10ad5c56edf 100644 --- a/upload/admin/model/design/layout.php +++ b/upload/admin/model/design/layout.php @@ -15,7 +15,7 @@ public function addLayout($data) { if (isset($data['layout_module'])) { foreach ($data['layout_module'] as $layout_module) { - $this->db->query("INSERT INTO " . DB_PREFIX . "layout_module SET layout_id = '" . (int)$layout_id . "', module_id = '" . (int)$layout_module['module_id'] . "', position = '" . $this->db->escape($layout_module['position']) . "', status = '" . (int)$layout_module['status'] . "', sort_order = '" . (int)$layout_module['sort_order'] . "'"); + $this->db->query("INSERT INTO " . DB_PREFIX . "layout_module SET layout_id = '" . (int)$layout_id . "', code = '" . $this->db->escape($layout_module['code']) . "', position = '" . $this->db->escape($layout_module['position']) . "', status = '" . (int)$layout_module['status'] . "', sort_order = '" . (int)$layout_module['sort_order'] . "'"); } } @@ -41,7 +41,7 @@ public function editLayout($layout_id, $data) { if (isset($data['layout_module'])) { foreach ($data['layout_module'] as $layout_module) { - $this->db->query("INSERT INTO " . DB_PREFIX . "layout_module SET layout_id = '" . (int)$layout_id . "', module_id = '" . (int)$layout_module['module_id'] . "', position = '" . $this->db->escape($layout_module['position']) . "', status = '" . (int)$layout_module['status'] . "', sort_order = '" . (int)$layout_module['sort_order'] . "'"); + $this->db->query("INSERT INTO " . DB_PREFIX . "layout_module SET layout_id = '" . (int)$layout_id . "', code = '" . $this->db->escape($layout_module['code']) . "', position = '" . $this->db->escape($layout_module['position']) . "', status = '" . (int)$layout_module['status'] . "', sort_order = '" . (int)$layout_module['sort_order'] . "'"); } } diff --git a/upload/admin/model/extension/module.php b/upload/admin/model/extension/module.php deleted file mode 100644 index 3239136eccd..00000000000 --- a/upload/admin/model/extension/module.php +++ /dev/null @@ -1,22 +0,0 @@ -db->query("DELETE FROM " . DB_PREFIX . "module WHERE code = '" . $this->db->escape($code) . "'"); - - if ($data['module_id']) { - $this->db->query("INSERT INTO " . DB_PREFIX . "module SET module_id = '" . $data['module_id'] . "', `code` = '" . $this->db->escape($code) . "', `setting` = '" . $this->db->escape(serialize($setting)) . "'"); - } else { - $this->db->query("INSERT INTO " . DB_PREFIX . "module SET `code` = '" . $this->db->escape($code) . "', `setting` = '" . $this->db->escape(serialize($setting)) . "'"); - } - } - - public function deleteModules($code) { - $this->db->query("DELETE FROM " . DB_PREFIX . "module WHERE code = '" . $this->db->escape($code) . "'"); - } - - public function getModules($code) { - $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "module WHERE code = '" . $this->db->escape($code) . "'"); - - return $query->rows; - } -} \ No newline at end of file diff --git a/upload/admin/view/template/design/layout_form.tpl b/upload/admin/view/template/design/layout_form.tpl index 3cb232c0539..b5811f28501 100644 --- a/upload/admin/view/template/design/layout_form.tpl +++ b/upload/admin/view/template/design/layout_form.tpl @@ -84,40 +84,17 @@