From 90c3dd534057fa8ce729b432f95808d0e064a3af Mon Sep 17 00:00:00 2001 From: Daniel Kerr Date: Tue, 5 Jul 2016 15:12:13 +0800 Subject: [PATCH] fix for permission issue --- .../admin/controller/extension/extension.php | 107 +++--------------- .../extension/{ => extension}/analytics.php | 16 +-- .../extension/{ => extension}/captcha.php | 16 +-- .../extension/{ => extension}/dashboard.php | 16 +-- .../extension/{ => extension}/feed.php | 16 +-- .../extension/{ => extension}/fraud.php | 16 +-- .../extension/{ => extension}/menu.php | 0 .../extension/{ => extension}/module.php | 24 ++-- .../extension/{ => extension}/payment.php | 14 +-- .../extension/{ => extension}/shipping.php | 16 +-- .../extension/{ => extension}/theme.php | 16 +-- .../extension/{ => extension}/total.php | 12 +- .../extension/{ => extension}/analytics.php | 0 .../extension/{ => extension}/captcha.php | 0 .../extension/{ => extension}/dashboard.php | 0 .../en-gb/extension/{ => extension}/feed.php | 0 .../en-gb/extension/{ => extension}/fraud.php | 0 .../extension/{ => extension}/module.php | 0 .../en-gb/extension/extension/openbay.php | 95 ++++++++++++++++ .../extension/{ => extension}/payment.php | 0 .../extension/{ => extension}/shipping.php | 0 .../en-gb/extension/{ => extension}/theme.php | 0 .../en-gb/extension/{ => extension}/total.php | 0 .../extension/{ => extension}/analytics.tpl | 0 .../extension/{ => extension}/captcha.tpl | 0 .../extension/{ => extension}/dashboard.tpl | 0 .../extension/{ => extension}/feed.tpl | 0 .../extension/{ => extension}/fraud.tpl | 0 .../extension/{ => extension}/menu.tpl | 0 .../extension/{ => extension}/module.tpl | 0 .../extension/{ => extension}/payment.tpl | 0 .../extension/{ => extension}/shipping.tpl | 0 .../extension/{ => extension}/theme.tpl | 0 .../extension/{ => extension}/total.tpl | 0 34 files changed, 189 insertions(+), 175 deletions(-) rename upload/admin/controller/extension/{ => extension}/analytics.php (85%) rename upload/admin/controller/extension/{ => extension}/captcha.php (83%) rename upload/admin/controller/extension/{ => extension}/dashboard.php (84%) rename upload/admin/controller/extension/{ => extension}/feed.php (83%) rename upload/admin/controller/extension/{ => extension}/fraud.php (83%) rename upload/admin/controller/extension/{ => extension}/menu.php (100%) rename upload/admin/controller/extension/{ => extension}/module.php (82%) rename upload/admin/controller/extension/{ => extension}/payment.php (86%) rename upload/admin/controller/extension/{ => extension}/shipping.php (83%) rename upload/admin/controller/extension/{ => extension}/theme.php (86%) rename upload/admin/controller/extension/{ => extension}/total.php (87%) rename upload/admin/language/en-gb/extension/{ => extension}/analytics.php (100%) rename upload/admin/language/en-gb/extension/{ => extension}/captcha.php (100%) rename upload/admin/language/en-gb/extension/{ => extension}/dashboard.php (100%) rename upload/admin/language/en-gb/extension/{ => extension}/feed.php (100%) rename upload/admin/language/en-gb/extension/{ => extension}/fraud.php (100%) rename upload/admin/language/en-gb/extension/{ => extension}/module.php (100%) create mode 100644 upload/admin/language/en-gb/extension/extension/openbay.php rename upload/admin/language/en-gb/extension/{ => extension}/payment.php (100%) rename upload/admin/language/en-gb/extension/{ => extension}/shipping.php (100%) rename upload/admin/language/en-gb/extension/{ => extension}/theme.php (100%) rename upload/admin/language/en-gb/extension/{ => extension}/total.php (100%) rename upload/admin/view/template/extension/{ => extension}/analytics.tpl (100%) rename upload/admin/view/template/extension/{ => extension}/captcha.tpl (100%) rename upload/admin/view/template/extension/{ => extension}/dashboard.tpl (100%) rename upload/admin/view/template/extension/{ => extension}/feed.tpl (100%) rename upload/admin/view/template/extension/{ => extension}/fraud.tpl (100%) rename upload/admin/view/template/extension/{ => extension}/menu.tpl (100%) rename upload/admin/view/template/extension/{ => extension}/module.tpl (100%) rename upload/admin/view/template/extension/{ => extension}/payment.tpl (100%) rename upload/admin/view/template/extension/{ => extension}/shipping.tpl (100%) rename upload/admin/view/template/extension/{ => extension}/theme.tpl (100%) rename upload/admin/view/template/extension/{ => extension}/total.tpl (100%) diff --git a/upload/admin/controller/extension/extension.php b/upload/admin/controller/extension/extension.php index fdfb5cac714..5a6f78683e4 100644 --- a/upload/admin/controller/extension/extension.php +++ b/upload/admin/controller/extension/extension.php @@ -37,104 +37,23 @@ public function index() { $data['categories'] = array(); - if ($this->user->hasPermission('access', 'extension/analytics')) { - $files = glob(DIR_APPLICATION . 'controller/{extension/analytics,analytics}/*.php', GLOB_BRACE); - - $data['categories'][] = array( - 'code' => 'analytics', - 'text' => $this->language->get('text_analytics') . ' (' . count($files) .')', - 'href' => $this->url->link('extension/analytics', 'token=' . $this->session->data['token'], true) - ); - } - - if ($this->user->hasPermission('access', 'extension/captcha')) { - $files = glob(DIR_APPLICATION . 'controller/{extension/captcha,captcha}/*.php', GLOB_BRACE); - - $data['categories'][] = array( - 'code' => 'captcha', - 'text' => $this->language->get('text_captcha') . ' (' . count($files) .')', - 'href' => $this->url->link('extension/captcha', 'token=' . $this->session->data['token'], true) - ); - } - - if ($this->user->hasPermission('access', 'extension/dashboard')) { - $files = glob(DIR_APPLICATION . 'controller/extension/dashboard/*.php', GLOB_BRACE); - - $data['categories'][] = array( - 'code' => 'dashboard', - 'text' => $this->language->get('text_dashboard') . ' (' . count($files) .')', - 'href' => $this->url->link('extension/dashboard', 'token=' . $this->session->data['token'], true) - ); - } - - if ($this->user->hasPermission('access', 'extension/feed')) { - $files = glob(DIR_APPLICATION . 'controller/{extension/feed,feed}/*.php', GLOB_BRACE); - - $data['categories'][] = array( - 'code' => 'feed', - 'text' => $this->language->get('text_feed') . ' (' . count($files) .')', - 'href' => $this->url->link('extension/feed', 'token=' . $this->session->data['token'], true) - ); - } + $files = glob(DIR_APPLICATION . 'controller/extension/extension/*.php', GLOB_BRACE); - if ($this->user->hasPermission('access', 'extension/fraud')) { - $files = glob(DIR_APPLICATION . 'controller/{extension/fraud,fraud}/*.php', GLOB_BRACE); + foreach ($files as $file) { + $extension = basename($file, '.php'); - $data['categories'][] = array( - 'code' => 'fraud', - 'text' => $this->language->get('text_fraud') . ' (' . count($files) .')', - 'href' => $this->url->link('extension/fraud', 'token=' . $this->session->data['token'], true) - ); - } + // Compatibility code for old extension folders + $this->load->language('extension/extension/' . $extension); - if ($this->user->hasPermission('access', 'extension/module')) { - $files = glob(DIR_APPLICATION . 'controller/{extension/module,module}/*.php', GLOB_BRACE); - - $data['categories'][] = array( - 'code' => 'module', - 'text' => $this->language->get('text_module') . ' (' . count($files) .')', - 'href' => $this->url->link('extension/module', 'token=' . $this->session->data['token'], true) - ); - } - - if ($this->user->hasPermission('access', 'extension/payment')) { - $files = glob(DIR_APPLICATION . 'controller/{extension/payment,payment}/*.php', GLOB_BRACE); - - $data['categories'][] = array( - 'code' => 'payment', - 'text' => $this->language->get('text_payment') . ' (' . count($files) .')', - 'href' => $this->url->link('extension/payment', 'token=' . $this->session->data['token'], true) - ); - } - - if ($this->user->hasPermission('access', 'extension/shipping')) { - $files = glob(DIR_APPLICATION . 'controller/{extension/shipping,shipping}/*.php', GLOB_BRACE); - - $data['categories'][] = array( - 'code' => 'shipping', - 'text' => $this->language->get('text_shipping') . ' (' . count($files) .')', - 'href' => $this->url->link('extension/shipping', 'token=' . $this->session->data['token'], true) - ); - } - - if ($this->user->hasPermission('access', 'extension/theme')) { - $files = glob(DIR_APPLICATION . 'controller/{extension/theme,theme}/*.php', GLOB_BRACE); - - $data['categories'][] = array( - 'code' => 'theme', - 'text' => $this->language->get('text_theme') . ' (' . count($files) .')', - 'href' => $this->url->link('extension/theme', 'token=' . $this->session->data['token'], true) - ); - } + if ($this->user->hasPermission('access', 'extension/extension/' . $extension)) { + $files = glob(DIR_APPLICATION . 'controller/{extension/' . $extension . ',' . $extension . '}/*.php', GLOB_BRACE); - if ($this->user->hasPermission('access', 'extension/total')) { - $files = glob(DIR_APPLICATION . 'controller/{extension/total,total}/*.php', GLOB_BRACE); - - $data['categories'][] = array( - 'code' => 'total', - 'text' => $this->language->get('text_total') . ' (' . count($files) .')', - 'href' => $this->url->link('extension/total', 'token=' . $this->session->data['token'], true) - ); + $data['categories'][] = array( + 'code' => $extension, + 'text' => $this->language->get('heading_title') . ' (' . count($files) .')', + 'href' => $this->url->link('extension/extension/' . $extension, 'token=' . $this->session->data['token'], true) + ); + } } $data['header'] = $this->load->controller('common/header'); diff --git a/upload/admin/controller/extension/analytics.php b/upload/admin/controller/extension/extension/analytics.php similarity index 85% rename from upload/admin/controller/extension/analytics.php rename to upload/admin/controller/extension/extension/analytics.php index 4a20ccab05b..8b3886753c8 100644 --- a/upload/admin/controller/extension/analytics.php +++ b/upload/admin/controller/extension/extension/analytics.php @@ -1,9 +1,9 @@ load->language('extension/analytics'); + $this->load->language('extension/extension/analytics'); $this->load->model('extension/extension'); @@ -11,7 +11,7 @@ public function index() { } public function install() { - $this->load->language('extension/analytics'); + $this->load->language('extension/extension/analytics'); $this->load->model('extension/extension'); @@ -33,7 +33,7 @@ public function install() { } public function uninstall() { - $this->load->language('extension/analytics'); + $this->load->language('extension/extension/analytics'); $this->load->model('extension/extension'); @@ -121,19 +121,19 @@ protected function getList() { $data['extensions'][] = array( 'name' => $this->language->get('heading_title'), - 'install' => $this->url->link('extension/analytics/install', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), - 'uninstall' => $this->url->link('extension/analytics/uninstall', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), + 'install' => $this->url->link('extension/extension/analytics/install', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), + 'uninstall' => $this->url->link('extension/extension/analytics/uninstall', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), 'installed' => in_array($extension, $extensions), 'store' => $store_data ); } } - $this->response->setOutput($this->load->view('extension/analytics', $data)); + $this->response->setOutput($this->load->view('extension/extension/analytics', $data)); } protected function validate() { - if (!$this->user->hasPermission('modify', 'extension/analytics')) { + if (!$this->user->hasPermission('modify', 'extension/extension/analytics')) { $this->error['warning'] = $this->language->get('error_permission'); } diff --git a/upload/admin/controller/extension/captcha.php b/upload/admin/controller/extension/extension/captcha.php similarity index 83% rename from upload/admin/controller/extension/captcha.php rename to upload/admin/controller/extension/extension/captcha.php index 5db1637741f..3866193f8d3 100644 --- a/upload/admin/controller/extension/captcha.php +++ b/upload/admin/controller/extension/extension/captcha.php @@ -1,9 +1,9 @@ load->language('extension/captcha'); + $this->load->language('extension/extension/captcha'); $this->load->model('extension/extension'); @@ -11,7 +11,7 @@ public function index() { } public function install() { - $this->load->language('extension/captcha'); + $this->load->language('extension/extension/captcha'); $this->load->model('extension/extension'); @@ -33,7 +33,7 @@ public function install() { } public function uninstall() { - $this->load->language('extension/captcha'); + $this->load->language('extension/extension/captcha'); $this->load->model('extension/extension'); @@ -100,19 +100,19 @@ protected function getList() { $data['extensions'][] = array( 'name' => $this->language->get('heading_title') . (($extension == $this->config->get('config_captcha')) ? $this->language->get('text_default') : null), 'status' => $this->config->get($extension . '_status') ? $this->language->get('text_enabled') : $this->language->get('text_disabled'), - 'install' => $this->url->link('extension/captcha/install', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), - 'uninstall' => $this->url->link('extension/captcha/uninstall', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), + 'install' => $this->url->link('extension/extension/captcha/install', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), + 'uninstall' => $this->url->link('extension/extension/captcha/uninstall', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), 'installed' => in_array($extension, $extensions), 'edit' => $this->url->link('extension/captcha/' . $extension, 'token=' . $this->session->data['token'], true) ); } } - $this->response->setOutput($this->load->view('extension/captcha', $data)); + $this->response->setOutput($this->load->view('extension/extension/captcha', $data)); } protected function validate() { - if (!$this->user->hasPermission('modify', 'extension/captcha')) { + if (!$this->user->hasPermission('modify', 'extension/extension/captcha')) { $this->error['warning'] = $this->language->get('error_permission'); } diff --git a/upload/admin/controller/extension/dashboard.php b/upload/admin/controller/extension/extension/dashboard.php similarity index 84% rename from upload/admin/controller/extension/dashboard.php rename to upload/admin/controller/extension/extension/dashboard.php index 0152c4663be..c29d4ba289f 100644 --- a/upload/admin/controller/extension/dashboard.php +++ b/upload/admin/controller/extension/extension/dashboard.php @@ -1,9 +1,9 @@ load->language('extension/dashboard'); + $this->load->language('extension/extension/dashboard'); $this->load->model('extension/extension'); @@ -11,7 +11,7 @@ public function index() { } public function install() { - $this->load->language('extension/dashboard'); + $this->load->language('extension/extension/dashboard'); $this->load->model('extension/extension'); @@ -33,7 +33,7 @@ public function install() { } public function uninstall() { - $this->load->language('extension/dashboard'); + $this->load->language('extension/extension/dashboard'); $this->load->model('extension/extension'); @@ -105,19 +105,19 @@ protected function getList() { 'width' => $this->config->get('dashboard_' . $extension . '_width'), 'status' => $this->config->get('dashboard_' . $extension . '_status') ? $this->language->get('text_enabled') : $this->language->get('text_disabled'), 'sort_order' => $this->config->get('dashboard_' . $extension . '_sort_order'), - 'install' => $this->url->link('extension/dashboard/install', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), - 'uninstall' => $this->url->link('extension/dashboard/uninstall', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), + 'install' => $this->url->link('extension/extension/dashboard/install', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), + 'uninstall' => $this->url->link('extension/extension/dashboard/uninstall', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), 'installed' => in_array($extension, $extensions), 'edit' => $this->url->link('extension/dashboard/' . $extension, 'token=' . $this->session->data['token'], true) ); } } - $this->response->setOutput($this->load->view('extension/dashboard', $data)); + $this->response->setOutput($this->load->view('extension/extension/dashboard', $data)); } protected function validate() { - if (!$this->user->hasPermission('modify', 'extension/dashboard')) { + if (!$this->user->hasPermission('modify', 'extension/extension/dashboard')) { $this->error['warning'] = $this->language->get('error_permission'); } diff --git a/upload/admin/controller/extension/feed.php b/upload/admin/controller/extension/extension/feed.php similarity index 83% rename from upload/admin/controller/extension/feed.php rename to upload/admin/controller/extension/extension/feed.php index be101280421..48390282ca9 100644 --- a/upload/admin/controller/extension/feed.php +++ b/upload/admin/controller/extension/extension/feed.php @@ -1,9 +1,9 @@ load->language('extension/feed'); + $this->load->language('extension/extension/feed'); $this->load->model('extension/extension'); @@ -11,7 +11,7 @@ public function index() { } public function install() { - $this->load->language('extension/feed'); + $this->load->language('extension/extension/feed'); $this->load->model('extension/extension'); @@ -33,7 +33,7 @@ public function install() { } public function uninstall() { - $this->load->language('extension/feed'); + $this->load->language('extension/extension/feed'); $this->load->model('extension/extension'); @@ -100,19 +100,19 @@ protected function getList() { $data['extensions'][] = array( 'name' => $this->language->get('heading_title'), 'status' => $this->config->get($extension . '_status') ? $this->language->get('text_enabled') : $this->language->get('text_disabled'), - 'install' => $this->url->link('extension/feed/install', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), - 'uninstall' => $this->url->link('extension/feed/uninstall', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), + 'install' => $this->url->link('extension/extension/feed/install', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), + 'uninstall' => $this->url->link('extension/extension/feed/uninstall', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), 'installed' => in_array($extension, $extensions), 'edit' => $this->url->link('extension/feed/' . $extension, 'token=' . $this->session->data['token'], true) ); } } - $this->response->setOutput($this->load->view('extension/feed', $data)); + $this->response->setOutput($this->load->view('extension/extension/feed', $data)); } protected function validate() { - if (!$this->user->hasPermission('modify', 'extension/feed')) { + if (!$this->user->hasPermission('modify', 'extension/extension/feed')) { $this->error['warning'] = $this->language->get('error_permission'); } diff --git a/upload/admin/controller/extension/fraud.php b/upload/admin/controller/extension/extension/fraud.php similarity index 83% rename from upload/admin/controller/extension/fraud.php rename to upload/admin/controller/extension/extension/fraud.php index ebf863eff13..f26f429a01c 100644 --- a/upload/admin/controller/extension/fraud.php +++ b/upload/admin/controller/extension/extension/fraud.php @@ -1,9 +1,9 @@ load->language('extension/fraud'); + $this->load->language('extension/extension/fraud'); $this->load->model('extension/extension'); @@ -11,7 +11,7 @@ public function index() { } public function install() { - $this->load->language('extension/fraud'); + $this->load->language('extension/extension/fraud'); $this->load->model('extension/extension'); @@ -33,7 +33,7 @@ public function install() { } public function uninstall() { - $this->load->language('extension/fraud'); + $this->load->language('extension/extension/fraud'); $this->load->model('extension/extension'); @@ -100,8 +100,8 @@ protected function getList() { $data['extensions'][] = array( 'name' => $this->language->get('heading_title'), 'status' => $this->config->get($extension . '_status') ? $this->language->get('text_enabled') : $this->language->get('text_disabled'), - 'install' => $this->url->link('extension/fraud/install', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), - 'uninstall' => $this->url->link('extension/fraud/uninstall', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), + 'install' => $this->url->link('extension/extension/fraud/install', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), + 'uninstall' => $this->url->link('extension/extension/fraud/uninstall', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), 'installed' => in_array($extension, $extensions), 'edit' => $this->url->link('extension/fraud/' . $extension, 'token=' . $this->session->data['token'], true) ); @@ -109,11 +109,11 @@ protected function getList() { } - $this->response->setOutput($this->load->view('extension/fraud', $data)); + $this->response->setOutput($this->load->view('extension/extension/fraud', $data)); } protected function validate() { - if (!$this->user->hasPermission('modify', 'extension/fraud')) { + if (!$this->user->hasPermission('modify', 'extension/extension/fraud')) { $this->error['warning'] = $this->language->get('error_permission'); } diff --git a/upload/admin/controller/extension/menu.php b/upload/admin/controller/extension/extension/menu.php similarity index 100% rename from upload/admin/controller/extension/menu.php rename to upload/admin/controller/extension/extension/menu.php diff --git a/upload/admin/controller/extension/module.php b/upload/admin/controller/extension/extension/module.php similarity index 82% rename from upload/admin/controller/extension/module.php rename to upload/admin/controller/extension/extension/module.php index 10bc202a5a1..9c1698efeb4 100644 --- a/upload/admin/controller/extension/module.php +++ b/upload/admin/controller/extension/extension/module.php @@ -1,9 +1,9 @@ load->language('extension/module'); + $this->load->language('extension/extension/module'); $this->load->model('extension/extension'); @@ -13,7 +13,7 @@ public function index() { } public function install() { - $this->load->language('extension/module'); + $this->load->language('extension/extension/module'); $this->load->model('extension/extension'); @@ -37,7 +37,7 @@ public function install() { } public function uninstall() { - $this->load->language('extension/module'); + $this->load->language('extension/extension/module'); $this->load->model('extension/extension'); @@ -58,7 +58,7 @@ public function uninstall() { } public function add() { - $this->load->language('extension/extension'); + $this->load->language('extension/extension/module'); $this->load->model('extension/extension'); @@ -76,7 +76,7 @@ public function add() { } public function delete() { - $this->load->language('extension/module'); + $this->load->language('extension/extension/module'); $this->load->model('extension/extension'); @@ -152,16 +152,16 @@ protected function getList() { $module_data[] = array( 'module_id' => $module['module_id'], 'name' => $module['name'], - 'edit' => $this->url->link('extension/module/' . $extension, 'token=' . $this->session->data['token'] . '&module_id=' . $module['module_id'], true), - 'delete' => $this->url->link('extension/module/delete', 'token=' . $this->session->data['token'] . '&module_id=' . $module['module_id'], true) + 'edit' => $this->url->link('extension/extension/module/' . $extension, 'token=' . $this->session->data['token'] . '&module_id=' . $module['module_id'], true), + 'delete' => $this->url->link('extension/extension/module/delete', 'token=' . $this->session->data['token'] . '&module_id=' . $module['module_id'], true) ); } $data['extensions'][] = array( 'name' => $this->language->get('heading_title'), 'module' => $module_data, - 'install' => $this->url->link('extension/module/install', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), - 'uninstall' => $this->url->link('extension/module/uninstall', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), + 'install' => $this->url->link('extension/extension/module/install', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), + 'uninstall' => $this->url->link('extension/extension/module/uninstall', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), 'installed' => in_array($extension, $extensions), 'edit' => $this->url->link('extension/module/' . $extension, 'token=' . $this->session->data['token'], true) ); @@ -176,11 +176,11 @@ protected function getList() { array_multisort($sort_order, SORT_ASC, $data['extensions']); - $this->response->setOutput($this->load->view('extension/module', $data)); + $this->response->setOutput($this->load->view('extension/extension/module', $data)); } protected function validate() { - if (!$this->user->hasPermission('modify', 'extension/module')) { + if (!$this->user->hasPermission('modify', 'extension/extension/module')) { $this->error['warning'] = $this->language->get('error_permission'); } diff --git a/upload/admin/controller/extension/payment.php b/upload/admin/controller/extension/extension/payment.php similarity index 86% rename from upload/admin/controller/extension/payment.php rename to upload/admin/controller/extension/extension/payment.php index bda723e7ec0..537827000d0 100644 --- a/upload/admin/controller/extension/payment.php +++ b/upload/admin/controller/extension/extension/payment.php @@ -1,9 +1,9 @@ load->language('extension/payment'); + $this->load->language('extension/extension/payment'); $this->load->model('extension/extension'); @@ -11,7 +11,7 @@ public function index() { } public function install() { - $this->load->language('extension/payment'); + $this->load->language('extension/extension/payment'); $this->load->model('extension/extension'); @@ -33,7 +33,7 @@ public function install() { } public function uninstall() { - $this->load->language('extension/payment'); + $this->load->language('extension/extension/payment'); $this->load->model('extension/extension'); @@ -113,8 +113,8 @@ protected function getList() { 'link' => $link, 'status' => $this->config->get($extension . '_status') ? $this->language->get('text_enabled') : $this->language->get('text_disabled'), 'sort_order' => $this->config->get($extension . '_sort_order'), - 'install' => $this->url->link('extension/payment/install', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), - 'uninstall' => $this->url->link('extension/payment/uninstall', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), + 'install' => $this->url->link('extension/extension/payment/install', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), + 'uninstall' => $this->url->link('extension/extension/payment/uninstall', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), 'installed' => in_array($extension, $extensions), 'edit' => $this->url->link('extension/payment/' . $extension, 'token=' . $this->session->data['token'], true) ); @@ -125,7 +125,7 @@ protected function getList() { } protected function validate() { - if (!$this->user->hasPermission('modify', 'extension/payment')) { + if (!$this->user->hasPermission('modify', 'extension/extension/payment')) { $this->error['warning'] = $this->language->get('error_permission'); } diff --git a/upload/admin/controller/extension/shipping.php b/upload/admin/controller/extension/extension/shipping.php similarity index 83% rename from upload/admin/controller/extension/shipping.php rename to upload/admin/controller/extension/extension/shipping.php index cd6f482acb7..4e542c39a61 100644 --- a/upload/admin/controller/extension/shipping.php +++ b/upload/admin/controller/extension/extension/shipping.php @@ -1,9 +1,9 @@ load->language('extension/shipping'); + $this->load->language('extension/extension/shipping'); $this->load->model('extension/extension'); @@ -11,7 +11,7 @@ public function index() { } public function install() { - $this->load->language('extension/shipping'); + $this->load->language('extension/extension/shipping'); $this->load->model('extension/extension'); @@ -33,7 +33,7 @@ public function install() { } public function uninstall() { - $this->load->language('extension/shipping'); + $this->load->language('extension/extension/shipping'); $this->load->model('extension/extension'); @@ -104,19 +104,19 @@ protected function getList() { 'name' => $this->language->get('heading_title'), 'status' => $this->config->get($extension . '_status') ? $this->language->get('text_enabled') : $this->language->get('text_disabled'), 'sort_order' => $this->config->get($extension . '_sort_order'), - 'install' => $this->url->link('extension/shipping/install', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), - 'uninstall' => $this->url->link('extension/shipping/uninstall', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), + 'install' => $this->url->link('extension/extension/shipping/install', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), + 'uninstall' => $this->url->link('extension/extension/shipping/uninstall', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), 'installed' => in_array($extension, $extensions), 'edit' => $this->url->link('extension/shipping/' . $extension, 'token=' . $this->session->data['token'], true) ); } } - $this->response->setOutput($this->load->view('extension/shipping', $data)); + $this->response->setOutput($this->load->view('extension/extension/shipping', $data)); } protected function validate() { - if (!$this->user->hasPermission('modify', 'extension/shipping')) { + if (!$this->user->hasPermission('modify', 'extension/extension/shipping')) { $this->error['warning'] = $this->language->get('error_permission'); } diff --git a/upload/admin/controller/extension/theme.php b/upload/admin/controller/extension/extension/theme.php similarity index 86% rename from upload/admin/controller/extension/theme.php rename to upload/admin/controller/extension/extension/theme.php index f3aa386f08a..f37af10b8cf 100644 --- a/upload/admin/controller/extension/theme.php +++ b/upload/admin/controller/extension/extension/theme.php @@ -1,9 +1,9 @@ load->language('extension/theme'); + $this->load->language('extension/extension/theme'); $this->load->model('extension/extension'); @@ -11,7 +11,7 @@ public function index() { } public function install() { - $this->load->language('extension/feed'); + $this->load->language('extension/extension/feed'); $this->load->model('extension/extension'); @@ -33,7 +33,7 @@ public function install() { } public function uninstall() { - $this->load->language('extension/theme'); + $this->load->language('extension/extension/theme'); $this->load->model('extension/extension'); @@ -120,19 +120,19 @@ protected function getList() { $data['extensions'][] = array( 'name' => $this->language->get('heading_title'), - 'install' => $this->url->link('extension/theme/install', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), - 'uninstall' => $this->url->link('extension/theme/uninstall', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), + 'install' => $this->url->link('extension/extension/theme/install', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), + 'uninstall' => $this->url->link('extension/extension/theme/uninstall', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), 'installed' => in_array($extension, $extensions), 'store' => $store_data ); } } - $this->response->setOutput($this->load->view('extension/theme', $data)); + $this->response->setOutput($this->load->view('extension/extension/theme', $data)); } protected function validate() { - if (!$this->user->hasPermission('modify', 'extension/theme')) { + if (!$this->user->hasPermission('modify', 'extension/extension/theme')) { $this->error['warning'] = $this->language->get('error_permission'); } diff --git a/upload/admin/controller/extension/total.php b/upload/admin/controller/extension/extension/total.php similarity index 87% rename from upload/admin/controller/extension/total.php rename to upload/admin/controller/extension/extension/total.php index 15bcea493be..58012efb926 100644 --- a/upload/admin/controller/extension/total.php +++ b/upload/admin/controller/extension/extension/total.php @@ -1,9 +1,9 @@ load->language('extension/total'); + $this->load->language('extension/extension/total'); $this->load->model('extension/extension'); @@ -11,7 +11,7 @@ public function index() { } public function install() { - $this->load->language('extension/total'); + $this->load->language('extension/extension/total'); $this->load->model('extension/extension'); @@ -32,7 +32,7 @@ public function install() { } public function uninstall() { - $this->load->language('extension/total'); + $this->load->language('extension/extension/total'); $this->load->model('extension/extension'); @@ -102,8 +102,8 @@ protected function getList() { 'name' => $this->language->get('heading_title'), 'status' => $this->config->get($extension . '_status') ? $this->language->get('text_enabled') : $this->language->get('text_disabled'), 'sort_order' => $this->config->get($extension . '_sort_order'), - 'install' => $this->url->link('extension/total/install', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), - 'uninstall' => $this->url->link('extension/total/uninstall', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), + 'install' => $this->url->link('extension/extension/total/install', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), + 'uninstall' => $this->url->link('extension/extension/total/uninstall', 'token=' . $this->session->data['token'] . '&extension=' . $extension, true), 'installed' => in_array($extension, $extensions), 'edit' => $this->url->link('extension/total/' . $extension, 'token=' . $this->session->data['token'], true) ); diff --git a/upload/admin/language/en-gb/extension/analytics.php b/upload/admin/language/en-gb/extension/extension/analytics.php similarity index 100% rename from upload/admin/language/en-gb/extension/analytics.php rename to upload/admin/language/en-gb/extension/extension/analytics.php diff --git a/upload/admin/language/en-gb/extension/captcha.php b/upload/admin/language/en-gb/extension/extension/captcha.php similarity index 100% rename from upload/admin/language/en-gb/extension/captcha.php rename to upload/admin/language/en-gb/extension/extension/captcha.php diff --git a/upload/admin/language/en-gb/extension/dashboard.php b/upload/admin/language/en-gb/extension/extension/dashboard.php similarity index 100% rename from upload/admin/language/en-gb/extension/dashboard.php rename to upload/admin/language/en-gb/extension/extension/dashboard.php diff --git a/upload/admin/language/en-gb/extension/feed.php b/upload/admin/language/en-gb/extension/extension/feed.php similarity index 100% rename from upload/admin/language/en-gb/extension/feed.php rename to upload/admin/language/en-gb/extension/extension/feed.php diff --git a/upload/admin/language/en-gb/extension/fraud.php b/upload/admin/language/en-gb/extension/extension/fraud.php similarity index 100% rename from upload/admin/language/en-gb/extension/fraud.php rename to upload/admin/language/en-gb/extension/extension/fraud.php diff --git a/upload/admin/language/en-gb/extension/module.php b/upload/admin/language/en-gb/extension/extension/module.php similarity index 100% rename from upload/admin/language/en-gb/extension/module.php rename to upload/admin/language/en-gb/extension/extension/module.php diff --git a/upload/admin/language/en-gb/extension/extension/openbay.php b/upload/admin/language/en-gb/extension/extension/openbay.php new file mode 100644 index 00000000000..f1949326171 --- /dev/null +++ b/upload/admin/language/en-gb/extension/extension/openbay.php @@ -0,0 +1,95 @@ + or <'; +$_['error_tracking_courier'] = 'You must select a courier if you want to add a tracking ID'; +$_['error_tracking_custom'] = 'Please leave courier field empty if you want to use custom courier'; +$_['error_permission'] = 'You do not have permission to modify the OpenBay Pro extension'; +$_['error_mkdir'] = 'PHP mkdir function is disabled, contact your host'; +$_['error_file_delete'] = 'Unable to remove these files, you should delete them manually'; +$_['error_mcrypt'] = 'PHP function "mcrypt_encrypt" is not enabled. Contact your hosting provider.'; +$_['error_mbstring'] = 'PHP library "mb strings" is not enabled. Contact your hosting provider.'; +$_['error_oc_version'] = 'Your version of OpenCart is not tested to work with this module. You may experience problems.'; +$_['error_fopen'] = 'PHP function "fopen" is disabled by your host - you will be unable to import images when importing products'; +$_['lang_error_vqmod'] = 'Your vqmod folder contains older OpenBay Pro files - these need to be removed!'; + +// Help +$_['help_clear_faq'] = 'Show all of the help notifications again'; +$_['help_empty_data'] = 'This can cause serious damage, do not use it if you do not know what it does!'; +$_['help_easy_update'] = 'Click update to install the latest version of OpenBay Pro automatically'; +$_['help_patch'] = 'Click to run the patch scripts'; +$_['help_beta'] = 'Caution! The beta version is the latest development version. It may not be stable and could contain bugs.'; \ No newline at end of file diff --git a/upload/admin/language/en-gb/extension/payment.php b/upload/admin/language/en-gb/extension/extension/payment.php similarity index 100% rename from upload/admin/language/en-gb/extension/payment.php rename to upload/admin/language/en-gb/extension/extension/payment.php diff --git a/upload/admin/language/en-gb/extension/shipping.php b/upload/admin/language/en-gb/extension/extension/shipping.php similarity index 100% rename from upload/admin/language/en-gb/extension/shipping.php rename to upload/admin/language/en-gb/extension/extension/shipping.php diff --git a/upload/admin/language/en-gb/extension/theme.php b/upload/admin/language/en-gb/extension/extension/theme.php similarity index 100% rename from upload/admin/language/en-gb/extension/theme.php rename to upload/admin/language/en-gb/extension/extension/theme.php diff --git a/upload/admin/language/en-gb/extension/total.php b/upload/admin/language/en-gb/extension/extension/total.php similarity index 100% rename from upload/admin/language/en-gb/extension/total.php rename to upload/admin/language/en-gb/extension/extension/total.php diff --git a/upload/admin/view/template/extension/analytics.tpl b/upload/admin/view/template/extension/extension/analytics.tpl similarity index 100% rename from upload/admin/view/template/extension/analytics.tpl rename to upload/admin/view/template/extension/extension/analytics.tpl diff --git a/upload/admin/view/template/extension/captcha.tpl b/upload/admin/view/template/extension/extension/captcha.tpl similarity index 100% rename from upload/admin/view/template/extension/captcha.tpl rename to upload/admin/view/template/extension/extension/captcha.tpl diff --git a/upload/admin/view/template/extension/dashboard.tpl b/upload/admin/view/template/extension/extension/dashboard.tpl similarity index 100% rename from upload/admin/view/template/extension/dashboard.tpl rename to upload/admin/view/template/extension/extension/dashboard.tpl diff --git a/upload/admin/view/template/extension/feed.tpl b/upload/admin/view/template/extension/extension/feed.tpl similarity index 100% rename from upload/admin/view/template/extension/feed.tpl rename to upload/admin/view/template/extension/extension/feed.tpl diff --git a/upload/admin/view/template/extension/fraud.tpl b/upload/admin/view/template/extension/extension/fraud.tpl similarity index 100% rename from upload/admin/view/template/extension/fraud.tpl rename to upload/admin/view/template/extension/extension/fraud.tpl diff --git a/upload/admin/view/template/extension/menu.tpl b/upload/admin/view/template/extension/extension/menu.tpl similarity index 100% rename from upload/admin/view/template/extension/menu.tpl rename to upload/admin/view/template/extension/extension/menu.tpl diff --git a/upload/admin/view/template/extension/module.tpl b/upload/admin/view/template/extension/extension/module.tpl similarity index 100% rename from upload/admin/view/template/extension/module.tpl rename to upload/admin/view/template/extension/extension/module.tpl diff --git a/upload/admin/view/template/extension/payment.tpl b/upload/admin/view/template/extension/extension/payment.tpl similarity index 100% rename from upload/admin/view/template/extension/payment.tpl rename to upload/admin/view/template/extension/extension/payment.tpl diff --git a/upload/admin/view/template/extension/shipping.tpl b/upload/admin/view/template/extension/extension/shipping.tpl similarity index 100% rename from upload/admin/view/template/extension/shipping.tpl rename to upload/admin/view/template/extension/extension/shipping.tpl diff --git a/upload/admin/view/template/extension/theme.tpl b/upload/admin/view/template/extension/extension/theme.tpl similarity index 100% rename from upload/admin/view/template/extension/theme.tpl rename to upload/admin/view/template/extension/extension/theme.tpl diff --git a/upload/admin/view/template/extension/total.tpl b/upload/admin/view/template/extension/extension/total.tpl similarity index 100% rename from upload/admin/view/template/extension/total.tpl rename to upload/admin/view/template/extension/extension/total.tpl