Skip to content

Commit

Permalink
Started restoring old aray type
Browse files Browse the repository at this point in the history
  • Loading branch information
condor2 committed Aug 17, 2024
1 parent 5d17443 commit 72e63c2
Show file tree
Hide file tree
Showing 277 changed files with 1,302 additions and 1,302 deletions.
26 changes: 13 additions & 13 deletions upload/admin/controller/catalog/information.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,39 +145,39 @@ protected function getList() {

$data['breadcrumbs'] = array();

$data['breadcrumbs'][] = [
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
];
);

$data['breadcrumbs'][] = [
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('catalog/information', 'token=' . $this->session->data['token'] . $url, true)
];
);

$data['add'] = $this->url->link('catalog/information/add', 'token=' . $this->session->data['token'] . $url, true);
$data['delete'] = $this->url->link('catalog/information/delete', 'token=' . $this->session->data['token'] . $url, true);

$data['informations'] = array();

$filter_data = [
$filter_data = array(
'sort' => $sort,
'order' => $order,
'start' => ($page - 1) * $this->config->get('config_limit_admin'),
'limit' => $this->config->get('config_limit_admin')
];
);

$information_total = $this->model_catalog_information->getTotalInformations();

$results = $this->model_catalog_information->getInformations($filter_data);

foreach ($results as $result) {
$data['informations'][] = [
$data['informations'][] = array(
'information_id' => $result['information_id'],
'title' => $result['title'],
'sort_order' => $result['sort_order'],
'edit' => $this->url->link('catalog/information/edit', 'token=' . $this->session->data['token'] . '&information_id=' . $result['information_id'] . $url, true)
];
);
}

$data['heading_title'] = $this->language->get('heading_title');
Expand Down Expand Up @@ -350,15 +350,15 @@ protected function getForm() {

$data['breadcrumbs'] = array();

$data['breadcrumbs'][] = [
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
];
);

$data['breadcrumbs'][] = [
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('catalog/information', 'token=' . $this->session->data['token'] . $url, true)
];
);

if (!isset($this->request->get['information_id'])) {
$data['action'] = $this->url->link('catalog/information/add', 'token=' . $this->session->data['token'] . $url, true);
Expand Down Expand Up @@ -397,7 +397,7 @@ protected function getForm() {
} elseif (!empty($information_info)) {
$data['information_store'] = $this->model_catalog_information->getInformationStores($this->request->get['information_id']);
} else {
$data['information_store'] = [0];
$data['information_store'] = array(0);
}

if (isset($this->request->post['keyword'])) {
Expand Down
34 changes: 17 additions & 17 deletions upload/admin/controller/catalog/manufacturer.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,39 +145,39 @@ protected function getList() {

$data['breadcrumbs'] = array();

$data['breadcrumbs'][] = [
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
];
);

$data['breadcrumbs'][] = [
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('catalog/manufacturer', 'token=' . $this->session->data['token'] . $url, true)
];
);

$data['add'] = $this->url->link('catalog/manufacturer/add', 'token=' . $this->session->data['token'] . $url, true);
$data['delete'] = $this->url->link('catalog/manufacturer/delete', 'token=' . $this->session->data['token'] . $url, true);

$data['manufacturers'] = array();

$filter_data = [
$filter_data = array(
'sort' => $sort,
'order' => $order,
'start' => ($page - 1) * $this->config->get('config_limit_admin'),
'limit' => $this->config->get('config_limit_admin')
];
);

$manufacturer_total = $this->model_catalog_manufacturer->getTotalManufacturers();

$results = $this->model_catalog_manufacturer->getManufacturers($filter_data);

foreach ($results as $result) {
$data['manufacturers'][] = [
$data['manufacturers'][] = array(
'manufacturer_id' => $result['manufacturer_id'],
'name' => $result['name'],
'sort_order' => $result['sort_order'],
'edit' => $this->url->link('catalog/manufacturer/edit', 'token=' . $this->session->data['token'] . '&manufacturer_id=' . $result['manufacturer_id'] . $url, true)
];
);
}

$data['heading_title'] = $this->language->get('heading_title');
Expand Down Expand Up @@ -315,15 +315,15 @@ protected function getForm() {

$data['breadcrumbs'] = array();

$data['breadcrumbs'][] = [
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
];
);

$data['breadcrumbs'][] = [
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('catalog/manufacturer', 'token=' . $this->session->data['token'] . $url, true)
];
);

if (!isset($this->request->get['manufacturer_id'])) {
$data['action'] = $this->url->link('catalog/manufacturer/add', 'token=' . $this->session->data['token'] . $url, true);
Expand Down Expand Up @@ -356,7 +356,7 @@ protected function getForm() {
} elseif (!empty($manufacturer_info)) {
$data['manufacturer_store'] = $this->model_catalog_manufacturer->getManufacturerStores($this->request->get['manufacturer_id']);
} else {
$data['manufacturer_store'] = [0];
$data['manufacturer_store'] = array(0);
}

if (isset($this->request->post['keyword'])) {
Expand Down Expand Up @@ -454,19 +454,19 @@ public function autocomplete() {
if (isset($this->request->get['filter_name'])) {
$this->load->model('catalog/manufacturer');

$filter_data = [
$filter_data = array(
'filter_name' => $this->request->get['filter_name'],
'start' => 0,
'limit' => 5
];
);

$results = $this->model_catalog_manufacturer->getManufacturers($filter_data);

foreach ($results as $result) {
$json[] = [
$json[] = array(
'manufacturer_id' => $result['manufacturer_id'],
'name' => strip_tags(html_entity_decode($result['name'], ENT_QUOTES, 'UTF-8'))
];
);
}
}

Expand Down
40 changes: 20 additions & 20 deletions upload/admin/controller/catalog/option.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,39 +145,39 @@ protected function getList() {

$data['breadcrumbs'] = array();

$data['breadcrumbs'][] = [
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
];
);

$data['breadcrumbs'][] = [
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('catalog/option', 'token=' . $this->session->data['token'] . $url, true)
];
);

$data['add'] = $this->url->link('catalog/option/add', 'token=' . $this->session->data['token'] . $url, true);
$data['delete'] = $this->url->link('catalog/option/delete', 'token=' . $this->session->data['token'] . $url, true);

$data['options'] = array();

$filter_data = [
$filter_data = array(
'sort' => $sort,
'order' => $order,
'start' => ($page - 1) * $this->config->get('config_limit_admin'),
'limit' => $this->config->get('config_limit_admin')
];
);

$option_total = $this->model_catalog_option->getTotalOptions();

$results = $this->model_catalog_option->getOptions($filter_data);

foreach ($results as $result) {
$data['options'][] = [
$data['options'][] = array(
'option_id' => $result['option_id'],
'name' => $result['name'],
'sort_order' => $result['sort_order'],
'edit' => $this->url->link('catalog/option/edit', 'token=' . $this->session->data['token'] . '&option_id=' . $result['option_id'] . $url, true)
];
);
}

$data['heading_title'] = $this->language->get('heading_title');
Expand Down Expand Up @@ -320,15 +320,15 @@ protected function getForm() {

$data['breadcrumbs'] = array();

$data['breadcrumbs'][] = [
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
];
);

$data['breadcrumbs'][] = [
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('catalog/option', 'token=' . $this->session->data['token'] . $url, true)
];
);

if (!isset($this->request->get['option_id'])) {
$data['action'] = $this->url->link('catalog/option/add', 'token=' . $this->session->data['token'] . $url, true);
Expand Down Expand Up @@ -393,13 +393,13 @@ protected function getForm() {
$thumb = 'no_image.png';
}

$data['option_values'][] = [
$data['option_values'][] = array(
'option_value_id' => $option_value['option_value_id'],
'option_value_description' => $option_value['option_value_description'],
'image' => $image,
'thumb' => $this->model_tool_image->resize($thumb, 100, 100),
'sort_order' => $option_value['sort_order']
];
);
}

$data['placeholder'] = $this->model_tool_image->resize('no_image.png', 100, 100);
Expand Down Expand Up @@ -471,11 +471,11 @@ public function autocomplete() {

$this->load->model('tool/image');

$filter_data = [
$filter_data = array(
'filter_name' => $this->request->get['filter_name'],
'start' => 0,
'limit' => 5
];
);

$options = $this->model_catalog_option->getOptions($filter_data);

Expand All @@ -492,11 +492,11 @@ public function autocomplete() {
$image = $this->model_tool_image->resize('no_image.png', 50, 50);
}

$option_value_data[] = [
$option_value_data[] = array(
'option_value_id' => $option_value['option_value_id'],
'name' => strip_tags(html_entity_decode($option_value['name'], ENT_QUOTES, 'UTF-8')),
'image' => $image
];
);
}

$sort_order = array();
Expand Down Expand Up @@ -526,13 +526,13 @@ public function autocomplete() {
$type = $this->language->get('text_date');
}

$json[] = [
$json[] = array(
'option_id' => $option['option_id'],
'name' => strip_tags(html_entity_decode($option['name'], ENT_QUOTES, 'UTF-8')),
'category' => $type,
'type' => $option['type'],
'option_value' => $option_value_data
];
);
}
}

Expand Down
Loading

0 comments on commit 72e63c2

Please sign in to comment.