@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | SELECT `data` |
| 66 | 66 | FROM `session` |
| 67 | 67 | WHERE session_id = '" . $this->db->escape($session_id) . "' |
| 68 | - AND expire > '" . $this->db->escape(date('Y-m-d H:i:s')) . "' |
|
| 68 | + AND expire > '" . $this->db->escape(date('Y-m-d H:i:s')) . "' |
|
| 69 | 69 | "); |
| 70 | 70 | |
| 71 | 71 | if ($query->num_rows) { |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | expire = '" . $this->db->escape(date('Y-m-d H:i:s', time() + $this->expire)) . "' |
| 84 | 84 | FROM `session` |
| 85 | 85 | WHERE session_id = '" . $this->db->escape($session_id) . "' |
| 86 | - AND expire > '" . $this->db->escape(date('Y-m-d H:i:s')) . "' |
|
| 86 | + AND expire > '" . $this->db->escape(date('Y-m-d H:i:s')) . "' |
|
| 87 | 87 | "); |
| 88 | 88 | |
| 89 | 89 | return true; |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | public function model($route) |
| 37 | 37 | { |
| 38 | 38 | // Sanitize the call |
| 39 | - $route = preg_replace('/[^a-zA-Z0-9_\/]/', '', (string) $route); |
|
| 39 | + $route = preg_replace('/[^a-zA-Z0-9_\/]/', '', (string)$route); |
|
| 40 | 40 | |
| 41 | 41 | if (!$this->registry->has('model_' . str_replace(array('/', '-', '.'), array('_', '', ''), $route))) { |
| 42 | 42 | $file = SR_APPLICATION . 'model/' . $route . '.php'; |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | $this->registry->set( |
| 55 | - 'model_' . str_replace(array('/', '-', '.'), array('_', '', ''), (string) $route), |
|
| 55 | + 'model_' . str_replace(array('/', '-', '.'), array('_', '', ''), (string)$route), |
|
| 56 | 56 | $proxy |
| 57 | 57 | ); |
| 58 | 58 | } else { |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | public function controller($route, $data = array()) |
| 65 | 65 | { |
| 66 | 66 | // Sanitize the call |
| 67 | - $route = preg_replace('/[^a-zA-Z0-9_\/]/', '', (string) $route); |
|
| 67 | + $route = preg_replace('/[^a-zA-Z0-9_\/]/', '', (string)$route); |
|
| 68 | 68 | |
| 69 | 69 | $output = null; |
| 70 | 70 | |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | $output = null; |
| 82 | 82 | |
| 83 | 83 | // Sanitize the call |
| 84 | - $route = preg_replace('/[^a-zA-Z0-9_\/]/', '', (string) $route); |
|
| 84 | + $route = preg_replace('/[^a-zA-Z0-9_\/]/', '', (string)$route); |
|
| 85 | 85 | |
| 86 | 86 | if (!$output) { |
| 87 | 87 | $template = new \Sunrise\Engine\Library\Template( |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | public function library($route) |
| 119 | 119 | { |
| 120 | 120 | // Sanitize the call |
| 121 | - $route = preg_replace('/[^a-zA-Z0-9_\/]/', '', (string) $route); |
|
| 121 | + $route = preg_replace('/[^a-zA-Z0-9_\/]/', '', (string)$route); |
|
| 122 | 122 | |
| 123 | 123 | $file = $_SERVER['DOCUMENT_ROOT'] . '/engine/library/' . $route . '.php'; |
| 124 | 124 | $class = str_replace('/', '\\', $route); |
@@ -151,14 +151,14 @@ discard block |
||
| 151 | 151 | |
| 152 | 152 | protected function callback($registry, $route) |
| 153 | 153 | { |
| 154 | - return function ($args) use ($registry, &$route) { |
|
| 154 | + return function($args) use ($registry, &$route) { |
|
| 155 | 155 | static $model = array(); |
| 156 | 156 | |
| 157 | 157 | $output = null; |
| 158 | 158 | |
| 159 | 159 | // Store the model object |
| 160 | 160 | if (!isset($model[$route])) { |
| 161 | - $file = SR_APPLICATION . 'model/' . substr($route, 0, strrpos($route, '/')) . '.php'; |
|
| 161 | + $file = SR_APPLICATION . 'model/' . substr($route, 0, strrpos($route, '/')) . '.php'; |
|
| 162 | 162 | $class = 'Model' . preg_replace('/[^a-zA-Z0-9]/', '', substr($route, 0, strrpos($route, '/'))); |
| 163 | 163 | |
| 164 | 164 | if (is_file($file)) { |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
| 22 | 22 | |
| 23 | 23 | // Site |
| 24 | -$_['app_url'] = '/administration/'; |
|
| 24 | +$_['app_url'] = '/administration/'; |
|
| 25 | 25 | |
| 26 | 26 | // Cache (file or redis) |
| 27 | 27 | $_['cache_type'] = 'file'; |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
| 22 | 22 | |
| 23 | 23 | // Site |
| 24 | -$_['app_url'] = '/application/'; |
|
| 24 | +$_['app_url'] = '/application/'; |
|
| 25 | 25 | |
| 26 | 26 | // Cache ( file or redis) |
| 27 | 27 | $_['cache_type'] = 'redis'; |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
| 22 | 22 | |
| 23 | 23 | // Language (then transferred to /engine/instance.php - Language section) |
| 24 | -$_['language_default'] = 'en-gb'; |
|
| 24 | +$_['language_default'] = 'en-gb'; |
|
| 25 | 25 | |
| 26 | 26 | // Database (mysqli or pdo) |
| 27 | 27 | $_['db_autostart'] = true; |
@@ -272,7 +272,7 @@ |
||
| 272 | 272 | stream_socket_enable_crypto($handle, true, STREAM_CRYPTO_METHOD_TLS_CLIENT); |
| 273 | 273 | } |
| 274 | 274 | |
| 275 | - if (!empty($this->smtp_username) && !empty($this->smtp_password)) { |
|
| 275 | + if (!empty($this->smtp_username) && !empty($this->smtp_password)) { |
|
| 276 | 276 | fputs($handle, 'EHLO ' . getenv('SERVER_NAME') . "\r\n"); |
| 277 | 277 | |
| 278 | 278 | $reply = ''; |
@@ -167,7 +167,7 @@ |
||
| 167 | 167 | |
| 168 | 168 | foreach ($languages as $language) { |
| 169 | 169 | if (empty($this->request->post['bank_transfer_bank' . $language['language_id']])) { |
| 170 | - $this->error['bank' . $language['language_id']] = $this->language->get('error_bank'); |
|
| 170 | + $this->error['bank' . $language['language_id']] = $this->language->get('error_bank'); |
|
| 171 | 171 | } |
| 172 | 172 | } |
| 173 | 173 | |
@@ -89,41 +89,41 @@ |
||
| 89 | 89 | |
| 90 | 90 | $data['cancel'] = $this->url->link('extension/extension', 'token=' . $this->session->data['token'] . '&type=shipping', true); |
| 91 | 91 | |
| 92 | - for ($i=1;$i<=12;$i++) { |
|
| 93 | - if (isset($this->request->post['xshipping_cost'.$i])) { |
|
| 94 | - $data['xshipping_cost'.$i] = $this->request->post['xshipping_cost'.$i]; |
|
| 92 | + for ($i = 1; $i <= 12; $i++) { |
|
| 93 | + if (isset($this->request->post['xshipping_cost' . $i])) { |
|
| 94 | + $data['xshipping_cost' . $i] = $this->request->post['xshipping_cost' . $i]; |
|
| 95 | 95 | } else { |
| 96 | - $data['xshipping_cost'.$i] = $this->config->get('xshipping_cost'.$i); |
|
| 96 | + $data['xshipping_cost' . $i] = $this->config->get('xshipping_cost' . $i); |
|
| 97 | 97 | } |
| 98 | 98 | |
| 99 | - if (isset($this->request->post['xshipping_name'.$i])) { |
|
| 100 | - $data['xshipping_name'.$i] = $this->request->post['xshipping_name'.$i]; |
|
| 99 | + if (isset($this->request->post['xshipping_name' . $i])) { |
|
| 100 | + $data['xshipping_name' . $i] = $this->request->post['xshipping_name' . $i]; |
|
| 101 | 101 | } else { |
| 102 | - $data['xshipping_name'.$i] = $this->config->get('xshipping_name'.$i); |
|
| 102 | + $data['xshipping_name' . $i] = $this->config->get('xshipping_name' . $i); |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | - if (isset($this->request->post['xshipping_free'.$i])) { |
|
| 106 | - $data['xshipping_free'.$i] = $this->request->post['xshipping_free'.$i]; |
|
| 105 | + if (isset($this->request->post['xshipping_free' . $i])) { |
|
| 106 | + $data['xshipping_free' . $i] = $this->request->post['xshipping_free' . $i]; |
|
| 107 | 107 | } else { |
| 108 | - $data['xshipping_free'.$i] = $this->config->get('xshipping_free'.$i); |
|
| 108 | + $data['xshipping_free' . $i] = $this->config->get('xshipping_free' . $i); |
|
| 109 | 109 | } |
| 110 | 110 | |
| 111 | - if (isset($this->request->post['xshipping_geo_zone_id'.$i])) { |
|
| 112 | - $data['xshipping_geo_zone_id'.$i] = $this->request->post['xshipping_geo_zone_id'.$i]; |
|
| 111 | + if (isset($this->request->post['xshipping_geo_zone_id' . $i])) { |
|
| 112 | + $data['xshipping_geo_zone_id' . $i] = $this->request->post['xshipping_geo_zone_id' . $i]; |
|
| 113 | 113 | } else { |
| 114 | - $data['xshipping_geo_zone_id'.$i] = $this->config->get('xshipping_geo_zone_id'.$i); |
|
| 114 | + $data['xshipping_geo_zone_id' . $i] = $this->config->get('xshipping_geo_zone_id' . $i); |
|
| 115 | 115 | } |
| 116 | 116 | |
| 117 | - if (isset($this->request->post['xshipping_status'.$i])) { |
|
| 118 | - $data['xshipping_status'.$i] = $this->request->post['xshipping_status'.$i]; |
|
| 117 | + if (isset($this->request->post['xshipping_status' . $i])) { |
|
| 118 | + $data['xshipping_status' . $i] = $this->request->post['xshipping_status' . $i]; |
|
| 119 | 119 | } else { |
| 120 | - $data['xshipping_status'.$i] = $this->config->get('xshipping_status'.$i); |
|
| 120 | + $data['xshipping_status' . $i] = $this->config->get('xshipping_status' . $i); |
|
| 121 | 121 | } |
| 122 | 122 | |
| 123 | - if (isset($this->request->post['xshipping_sort_order'.$i])) { |
|
| 124 | - $data['xshipping_sort_order'.$i] = $this->request->post['xshipping_sort_order'.$i]; |
|
| 123 | + if (isset($this->request->post['xshipping_sort_order' . $i])) { |
|
| 124 | + $data['xshipping_sort_order' . $i] = $this->request->post['xshipping_sort_order' . $i]; |
|
| 125 | 125 | } else { |
| 126 | - $data['xshipping_sort_order'.$i] = $this->config->get('xshipping_sort_order'.$i); |
|
| 126 | + $data['xshipping_sort_order' . $i] = $this->config->get('xshipping_sort_order' . $i); |
|
| 127 | 127 | } |
| 128 | 128 | } |
| 129 | 129 | |
@@ -170,14 +170,14 @@ discard block |
||
| 170 | 170 | $url .= '&page=' . $this->request->get['page']; |
| 171 | 171 | } |
| 172 | 172 | |
| 173 | - $data['breadcrumbs'] = array(); |
|
| 173 | + $data['breadcrumbs'] = array(); |
|
| 174 | 174 | |
| 175 | - $data['breadcrumbs'][] = array( |
|
| 175 | + $data['breadcrumbs'][] = array( |
|
| 176 | 176 | 'text' => $this->language->get('text_home'), |
| 177 | 177 | 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) |
| 178 | 178 | ); |
| 179 | 179 | |
| 180 | - $data['breadcrumbs'][] = array( |
|
| 180 | + $data['breadcrumbs'][] = array( |
|
| 181 | 181 | 'text' => $this->language->get('heading_title'), |
| 182 | 182 | 'href' => $this->url->link('localisation/location', 'token=' . $this->session->data['token'] . $url, true) |
| 183 | 183 | ); |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | $results = $this->model_localisation_location->getLocations($filter_data); |
| 200 | 200 | |
| 201 | 201 | foreach ($results as $result) { |
| 202 | - $data['location'][] = array( |
|
| 202 | + $data['location'][] = array( |
|
| 203 | 203 | 'location_id' => $result['location_id'], |
| 204 | 204 | 'name' => $result['name'], |
| 205 | 205 | 'address' => $result['address'], |
@@ -365,7 +365,7 @@ discard block |
||
| 365 | 365 | if (!isset($this->request->get['location_id'])) { |
| 366 | 366 | $data['action'] = $this->url->link('localisation/location/add', 'token=' . $this->session->data['token'] . $url, true); |
| 367 | 367 | } else { |
| 368 | - $data['action'] = $this->url->link('localisation/location/edit', 'token=' . $this->session->data['token'] . '&location_id=' . $this->request->get['location_id'] . $url, true); |
|
| 368 | + $data['action'] = $this->url->link('localisation/location/edit', 'token=' . $this->session->data['token'] . '&location_id=' . $this->request->get['location_id'] . $url, true); |
|
| 369 | 369 | } |
| 370 | 370 | |
| 371 | 371 | $data['cancel'] = $this->url->link('localisation/location', 'token=' . $this->session->data['token'] . $url, true); |
@@ -381,7 +381,7 @@ discard block |
||
| 381 | 381 | } elseif (!empty($location_info)) { |
| 382 | 382 | $data['name'] = $location_info['name']; |
| 383 | 383 | } else { |
| 384 | - $data['name'] = ''; |
|
| 384 | + $data['name'] = ''; |
|
| 385 | 385 | } |
| 386 | 386 | |
| 387 | 387 | if (isset($this->request->post['address'])) { |