Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
dinoxtech committed Jul 5, 2021
1 parent 8bf4c89 commit 0dcf2b4
Showing 1 changed file with 39 additions and 39 deletions.
78 changes: 39 additions & 39 deletions upload/admin/controller/setting/setting.php
Expand Up @@ -24,7 +24,7 @@ public function index() {

$this->response->redirect($this->url->link('setting/store', 'user_token=' . $this->session->data['user_token'], true));
}

if (isset($this->error['warning'])) {
$data['error_warning'] = $this->error['warning'];
} else {
Expand Down Expand Up @@ -208,13 +208,13 @@ public function index() {

foreach ($extensions as $code) {
$this->load->language('extension/theme/' . $code, 'extension');

$data['themes'][] = array(
'text' => $this->language->get('extension')->get('heading_title'),
'value' => $code
);
}

if (isset($this->request->post['config_layout_id'])) {
$data['config_layout_id'] = $this->request->post['config_layout_id'];
} else {
Expand Down Expand Up @@ -260,13 +260,13 @@ public function index() {
} else {
$data['config_telephone'] = $this->config->get('config_telephone');
}

if (isset($this->request->post['config_fax'])) {
$data['config_fax'] = $this->request->post['config_fax'];
} else {
$data['config_fax'] = $this->config->get('config_fax');
}

if (isset($this->request->post['config_image'])) {
$data['config_image'] = $this->request->post['config_image'];
} else {
Expand Down Expand Up @@ -378,14 +378,15 @@ public function index() {

$extensions = $this->model_setting_extension->getInstalled('currency');

foreach ($extensions as $extension) {
if ($this->config->get('currency_' . $extension . '_status')) {
$this->load->language('extension/currency/' . $extension);
foreach ($extensions as $code) {

$data['currency_engines'][] = [
'text' => $this->language->get('heading_title'),
'value' => $extension
];
if ($this->config->get('currency_' . $code . '_status')) {
$this->load->language('extension/currency/' . $code, 'currency');

$data['currency_engines'][] = array(
'text' => $this->language->get('currency')->get('heading_title'),
'value' => $code
);
}
}

Expand Down Expand Up @@ -690,7 +691,7 @@ public function index() {
} else {
$data['config_captcha'] = $this->config->get('config_captcha');
}

$this->load->model('setting/extension');

$data['captchas'] = array();
Expand All @@ -700,14 +701,13 @@ public function index() {

foreach ($extensions as $code) {
$this->load->language('extension/captcha/' . $code, 'extension');

if ($this->config->get('captcha_' . $code . '_status')) {
$data['captchas'][] = array(
'text' => $this->language->get('extension')->get('heading_title'),
'value' => $code
);
}
}
}

if (isset($this->request->post['config_captcha_page'])) {
$data['config_captcha_page'] = $this->request->post['config_captcha_page'];
Expand All @@ -723,12 +723,12 @@ public function index() {
'text' => $this->language->get('text_register'),
'value' => 'register'
);

$data['captcha_pages'][] = array(
'text' => $this->language->get('text_guest'),
'value' => 'guest'
);

$data['captcha_pages'][] = array(
'text' => $this->language->get('text_review'),
'value' => 'review'
Expand Down Expand Up @@ -853,7 +853,7 @@ public function index() {
} else {
$data['config_mail_alert_email'] = $this->config->get('config_mail_alert_email');
}

if (isset($this->request->post['config_secure'])) {
$data['config_secure'] = $this->request->post['config_secure'];
} else {
Expand Down Expand Up @@ -971,31 +971,31 @@ public function index() {
} else {
$data['config_error_filename'] = $this->config->get('config_error_filename');
}

if (isset($this->request->post['config_seo_pro'])) {
$data['config_seo_pro'] = $this->request->post['config_seo_pro'];
} else {
$data['config_seo_pro'] = $this->config->get('config_seo_pro');
}
}

if (isset($this->request->post['config_seo_url_include_path'])) {
$data['config_seo_url_include_path'] = $this->request->post['config_seo_url_include_path'];
} else {
$data['config_seo_url_include_path'] = $this->config->get('config_seo_url_include_path');
}
}

if (isset($this->request->post['config_seo_url_cache'])) {
$data['config_seo_url_cache'] = $this->request->post['config_seo_url_cache'];
} else {
$data['config_seo_url_cache'] = $this->config->get('config_seo_url_cache');
}
}

if (isset($this->request->post['config_page_postfix'])) {
$data['config_page_postfix'] = $this->request->post['config_page_postfix'];
} else {
$data['config_page_postfix'] = $this->config->get('config_page_postfix');
}
}

if (isset($this->request->post['config_seopro_addslash'])) {
$data['config_seopro_addslash'] = $this->request->post['config_seopro_addslash'];
} elseif ($this->config->has('config_seopro_addslash')) {
Expand All @@ -1006,23 +1006,23 @@ public function index() {
$data['config_seopro_lowercase'] = $this->request->post['config_seopro_lowercase'];
} elseif ($this->config->has('config_seopro_lowercase')) {
$data['config_seopro_lowercase'] = $this->config->get('config_seopro_lowercase');
}
}

if (isset($this->request->post['config_valide_param_flag'])) {
$data['config_valide_param_flag'] = $this->request->post['config_valide_param_flag'];
} elseif ($this->config->has('config_valide_param_flag')) {
$data['config_valide_param_flag'] = $this->config->get('config_valide_param_flag');
}
}


if (isset($this->request->post['config_valide_params'])) {
$data['config_valide_params'] = $this->request->post['config_valide_params'];
} elseif ($this->config->get('config_valide_params')) {
$data['config_valide_params'] = $this->config->get('config_valide_params');
} else {
$data['config_valide_params'] = "block\r\nfrommarket\r\ngclid\r\nfbclid\r\nkeyword\r\nlist_type\r\nopenstat\r\nopenstat_service\r\nopenstat_campaign\r\nopenstat_ad\r\nopenstat_source\r\nposition\r\nsource\r\ntracking\r\ntype\r\nyclid\r\nymclid\r\nuri\r\nurltype\r\nutm_source\r\nutm_medium\r\nutm_campaign\r\nutm_term\r\nutm_content";
}


$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
Expand Down Expand Up @@ -1091,15 +1091,15 @@ protected function validate() {
if (!isset($this->request->post['config_complete_status'])) {
$this->error['complete_status'] = $this->language->get('error_complete_status');
}

if (!$this->request->post['config_error_filename']) {
$this->error['log'] = $this->language->get('error_log_required');
} elseif (preg_match('/\.\.[\/\\\]?/', $this->request->post['config_error_filename'])) {
$this->error['log'] = $this->language->get('error_log_invalid');
} elseif (substr($this->request->post['config_error_filename'], strrpos($this->request->post['config_error_filename'], '.')) != '.log') {
$this->error['log'] = $this->language->get('error_log_extension');
}

if ((utf8_strlen($this->request->post['config_encryption']) < 32) || (utf8_strlen($this->request->post['config_encryption']) > 1024)) {
$this->error['encryption'] = $this->language->get('error_encryption');
}
Expand All @@ -1110,25 +1110,25 @@ protected function validate() {

return !$this->error;
}

public function theme() {
if ($this->request->server['HTTPS']) {
$server = HTTPS_CATALOG;
} else {
$server = HTTP_CATALOG;
}

// This is only here for compatibility with old themes.
if ($this->request->get['theme'] == 'theme_default') {
$theme = $this->config->get('theme_default_directory');
} else {
$theme = basename($this->request->get['theme']);
}

if (is_file(DIR_CATALOG . 'view/theme/' . $theme . '/image/' . $theme . '.png')) {
$this->response->setOutput($server . 'catalog/view/theme/' . $theme . '/image/' . $theme . '.png');
} else {
$this->response->setOutput($server . 'image/no_image.png');
}
}
}
}

0 comments on commit 0dcf2b4

Please sign in to comment.