@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | $this->template->assign_vars(array( |
111 | 111 | 'DEFAULT_CURRENCY' => $this->build_currency_select_menu($this->config['ppde_default_currency']), |
112 | 112 | 'DONATION_BODY' => $this->donation_body, |
113 | - 'IMG_LOADER' => '<img src="' . $this->root_path . '../ext/skouat/ppde/images/loader.gif' . '" />', |
|
113 | + 'IMG_LOADER' => '<img src="'.$this->root_path.'../ext/skouat/ppde/images/loader.gif'.'" />', |
|
114 | 114 | 'PPDE_DEFAULT_VALUE' => $this->config['ppde_default_value'] ? $this->config['ppde_default_value'] : 0, |
115 | 115 | 'PPDE_LIST_VALUE' => $this->build_currency_value_select_menu(), |
116 | 116 | |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | case 'cancel': |
149 | 149 | case 'success': |
150 | 150 | $this->template->assign_vars(array( |
151 | - 'L_PPDE_DONATION_TITLE' => $this->user->lang['PPDE_' . strtoupper($set_return_args_url) . '_TITLE'], |
|
151 | + 'L_PPDE_DONATION_TITLE' => $this->user->lang['PPDE_'.strtoupper($set_return_args_url).'_TITLE'], |
|
152 | 152 | )); |
153 | 153 | $this->return_args_url = $set_return_args_url; |
154 | 154 | break; |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | foreach ($donation_ary_value as $value) |
220 | 220 | { |
221 | 221 | $int_value = $this->settype_dropbox_int_value($value); |
222 | - $list_donation_value .= !empty($int_value) ? '<option value="' . $int_value . '">' . $int_value . '</option>' : ''; |
|
222 | + $list_donation_value .= !empty($int_value) ? '<option value="'.$int_value.'">'.$int_value.'</option>' : ''; |
|
223 | 223 | } |
224 | 224 | unset($value); |
225 | 225 | } |
@@ -266,12 +266,12 @@ discard block |
||
266 | 266 | return build_hidden_fields(array( |
267 | 267 | 'cmd' => '_donations', |
268 | 268 | 'business' => $this->get_account_id(), |
269 | - 'item_name' => $this->user->lang['PPDE_DONATION_TITLE_HEAD'] . ' ' . $this->config['sitename'], |
|
269 | + 'item_name' => $this->user->lang['PPDE_DONATION_TITLE_HEAD'].' '.$this->config['sitename'], |
|
270 | 270 | 'no_shipping' => 1, |
271 | 271 | 'return' => $this->generate_paypal_return_url('success'), |
272 | 272 | 'notify_url' => $this->generate_paypal_notify_return_url(), |
273 | 273 | 'cancel_return' => $this->generate_paypal_return_url('cancel'), |
274 | - 'item_number' => 'uid_' . $this->user->data['user_id'] . '_' . time(), |
|
274 | + 'item_number' => 'uid_'.$this->user->data['user_id'].'_'.time(), |
|
275 | 275 | 'tax' => 0, |
276 | 276 | 'bn' => 'Board_Donate_WPS', |
277 | 277 | 'charset' => 'utf-8', |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | */ |
311 | 311 | private function generate_paypal_return_url($arg) |
312 | 312 | { |
313 | - return generate_board_url(true) . $this->helper->route('skouat_ppde_donate', array('return' => $arg)); |
|
313 | + return generate_board_url(true).$this->helper->route('skouat_ppde_donate', array('return' => $arg)); |
|
314 | 314 | } |
315 | 315 | |
316 | 316 | /** |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | */ |
322 | 322 | private function generate_paypal_notify_return_url() |
323 | 323 | { |
324 | - return generate_board_url(true) . $this->helper->route('skouat_ppde_ipn_listener'); |
|
324 | + return generate_board_url(true).$this->helper->route('skouat_ppde_ipn_listener'); |
|
325 | 325 | } |
326 | 326 | |
327 | 327 | /** |
@@ -417,7 +417,7 @@ discard block |
||
417 | 417 | */ |
418 | 418 | private function get_amount($value, $currency, $on_left = true) |
419 | 419 | { |
420 | - return $on_left ? $currency . $value : $value . $currency; |
|
420 | + return $on_left ? $currency.$value : $value.$currency; |
|
421 | 421 | } |
422 | 422 | |
423 | 423 | /** |
@@ -502,8 +502,8 @@ discard block |
||
502 | 502 | private function assign_vars_stats_percent($multiplicand, $dividend, $type = '') |
503 | 503 | { |
504 | 504 | $this->template->assign_vars(array( |
505 | - 'PPDE_' . $type => round(($multiplicand * 100) / $dividend, 2), |
|
506 | - 'S_' . $type => !empty($type) ? true : false, |
|
505 | + 'PPDE_'.$type => round(($multiplicand * 100) / $dividend, 2), |
|
506 | + 'S_'.$type => !empty($type) ? true : false, |
|
507 | 507 | )); |
508 | 508 | } |
509 | 509 | |
@@ -519,7 +519,7 @@ discard block |
||
519 | 519 | { |
520 | 520 | case 'cancel': |
521 | 521 | case 'success': |
522 | - return $this->helper->render('donate_body.html', $this->user->lang('PPDE_' . strtoupper($this->return_args_url) . '_TITLE')); |
|
522 | + return $this->helper->render('donate_body.html', $this->user->lang('PPDE_'.strtoupper($this->return_args_url).'_TITLE')); |
|
523 | 523 | default: |
524 | 524 | return $this->helper->render('donate_body.html', $this->user->lang('PPDE_DONATION_TITLE')); |
525 | 525 | } |
@@ -604,7 +604,7 @@ discard block |
||
604 | 604 | protected function retrieve_ext_name() |
605 | 605 | { |
606 | 606 | $namespace_ary = explode('\\', __NAMESPACE__); |
607 | - $this->ext_name = $namespace_ary[0] . '/' . $namespace_ary[1]; |
|
607 | + $this->ext_name = $namespace_ary[0].'/'.$namespace_ary[1]; |
|
608 | 608 | } |
609 | 609 | |
610 | 610 | /** |
@@ -82,12 +82,12 @@ discard block |
||
82 | 82 | 'CURRENCY_NAME' => $data['currency_name'], |
83 | 83 | 'CURRENCY_ENABLED' => (bool) $data['currency_enable'], |
84 | 84 | |
85 | - 'U_DELETE' => $this->u_action . '&action=delete&' . $this->id_prefix_name . '_id=' . $data['currency_id'], |
|
86 | - 'U_EDIT' => $this->u_action . '&action=edit&' . $this->id_prefix_name . '_id=' . $data['currency_id'], |
|
87 | - 'U_ENABLE_DISABLE' => $this->u_action . '&action=' . $enable_value . '&' . $this->id_prefix_name . '_id=' . $data['currency_id'], |
|
85 | + 'U_DELETE' => $this->u_action.'&action=delete&'.$this->id_prefix_name.'_id='.$data['currency_id'], |
|
86 | + 'U_EDIT' => $this->u_action.'&action=edit&'.$this->id_prefix_name.'_id='.$data['currency_id'], |
|
87 | + 'U_ENABLE_DISABLE' => $this->u_action.'&action='.$enable_value.'&'.$this->id_prefix_name.'_id='.$data['currency_id'], |
|
88 | 88 | 'L_ENABLE_DISABLE' => $this->user->lang[$enable_lang], |
89 | - 'U_MOVE_DOWN' => $this->u_action . '&action=move_down&' . $this->id_prefix_name . '_id=' . $data['currency_id'], |
|
90 | - 'U_MOVE_UP' => $this->u_action . '&action=move_up&' . $this->id_prefix_name . '_id=' . $data['currency_id'], |
|
89 | + 'U_MOVE_DOWN' => $this->u_action.'&action=move_down&'.$this->id_prefix_name.'_id='.$data['currency_id'], |
|
90 | + 'U_MOVE_UP' => $this->u_action.'&action=move_up&'.$this->id_prefix_name.'_id='.$data['currency_id'], |
|
91 | 91 | )); |
92 | 92 | } |
93 | 93 | unset($data_ary, $page); |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | $this->template->assign_vars(array( |
127 | 127 | 'S_ADD' => true, |
128 | 128 | |
129 | - 'U_ADD_ACTION' => $this->u_action . '&action=add', |
|
129 | + 'U_ADD_ACTION' => $this->u_action.'&action=add', |
|
130 | 130 | 'U_BACK' => $this->u_action, |
131 | 131 | )); |
132 | 132 | } |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | |
161 | 161 | // Check some settings before submitting data |
162 | 162 | $errors = array_merge($errors, |
163 | - $this->is_invalid_form('add_edit_' . $this->module_name, $this->submit_or_preview($this->submit)), |
|
163 | + $this->is_invalid_form('add_edit_'.$this->module_name, $this->submit_or_preview($this->submit)), |
|
164 | 164 | $this->is_empty_data($entity, 'name', '', $this->submit_or_preview($this->submit)), |
165 | 165 | $this->is_empty_data($entity, 'iso_code', '', $this->submit_or_preview($this->submit)), |
166 | 166 | $this->is_empty_data($entity, 'symbol', '', $this->submit_or_preview($this->submit)) |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | 'CURRENCY_POSITION' => $entity->get_currency_position(), |
181 | 181 | 'CURRENCY_ENABLE' => $entity->get_currency_enable(), |
182 | 182 | |
183 | - 'S_HIDDEN_FIELDS' => '<input type="hidden" name="' . $this->id_prefix_name . '_id" value="' . $entity->get_id() . '" />', |
|
183 | + 'S_HIDDEN_FIELDS' => '<input type="hidden" name="'.$this->id_prefix_name.'_id" value="'.$entity->get_id().'" />', |
|
184 | 184 | )); |
185 | 185 | } |
186 | 186 | |
@@ -201,8 +201,8 @@ discard block |
||
201 | 201 | |
202 | 202 | $log_action = $this->add_edit_data($entity, 'set_order'); |
203 | 203 | // Log and show user confirmation of the saved item and provide link back to the previous page |
204 | - $this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_' . $this->lang_key_prefix . '_' . strtoupper($log_action), time(), array($entity->get_name())); |
|
205 | - trigger_error($this->user->lang[$this->lang_key_prefix . '_' . strtoupper($log_action)] . adm_back_link($this->u_action)); |
|
204 | + $this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_'.$this->lang_key_prefix.'_'.strtoupper($log_action), time(), array($entity->get_name())); |
|
205 | + trigger_error($this->user->lang[$this->lang_key_prefix.'_'.strtoupper($log_action)].adm_back_link($this->u_action)); |
|
206 | 206 | } |
207 | 207 | } |
208 | 208 | |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | $this->template->assign_vars(array( |
243 | 243 | 'S_EDIT' => true, |
244 | 244 | |
245 | - 'U_EDIT_ACTION' => $this->u_action . '&action=edit&' . $this->id_prefix_name . '_id=' . $currency_id, |
|
245 | + 'U_EDIT_ACTION' => $this->u_action.'&action=edit&'.$this->id_prefix_name.'_id='.$currency_id, |
|
246 | 246 | 'U_BACK' => $this->u_action, |
247 | 247 | )); |
248 | 248 | } |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | // Log action if data was moved |
279 | 279 | if ($move_executed) |
280 | 280 | { |
281 | - $this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_' . $this->lang_key_prefix . '_' . strtoupper($direction), time(), array($entity->get_name())); |
|
281 | + $this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_'.$this->lang_key_prefix.'_'.strtoupper($direction), time(), array($entity->get_name())); |
|
282 | 282 | } |
283 | 283 | |
284 | 284 | if ($this->request->is_ajax()) |
@@ -304,13 +304,13 @@ discard block |
||
304 | 304 | // Return an error if no currency |
305 | 305 | if (!$currency_id) |
306 | 306 | { |
307 | - trigger_error($this->user->lang[$this->lang_key_prefix . '_NO_CURRENCY'] . adm_back_link($this->u_action), E_USER_WARNING); |
|
307 | + trigger_error($this->user->lang[$this->lang_key_prefix.'_NO_CURRENCY'].adm_back_link($this->u_action), E_USER_WARNING); |
|
308 | 308 | } |
309 | 309 | |
310 | 310 | // Return an error if it's the last enabled currency |
311 | 311 | if ($this->ppde_operator->last_currency_enabled($action) && ($action == 'disable')) |
312 | 312 | { |
313 | - trigger_error($this->user->lang['PPDE_CANNOT_DISABLE_ALL_CURRENCIES'] . adm_back_link($this->u_action), E_USER_WARNING); |
|
313 | + trigger_error($this->user->lang['PPDE_CANNOT_DISABLE_ALL_CURRENCIES'].adm_back_link($this->u_action), E_USER_WARNING); |
|
314 | 314 | } |
315 | 315 | |
316 | 316 | // Load selected currency |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | // Save data to the database |
324 | 324 | $entity->save($entity->check_required_field()); |
325 | 325 | // Log action |
326 | - $this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_' . $this->lang_key_prefix . '_' . strtoupper($action) . 'D', time(), array($entity->get_name())); |
|
326 | + $this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_'.$this->lang_key_prefix.'_'.strtoupper($action).'D', time(), array($entity->get_name())); |
|
327 | 327 | |
328 | 328 | if ($this->request->is_ajax() && ($action == 'enable' || $action == 'disable')) |
329 | 329 | { |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | $entity->delete($currency_id, 'check_currency_enable'); |
352 | 352 | |
353 | 353 | // Log the action |
354 | - $this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_' . $this->lang_key_prefix . '_DELETED', time(), array($entity->get_name())); |
|
355 | - trigger_error($this->user->lang[$this->lang_key_prefix . '_DELETED'] . adm_back_link($this->u_action)); |
|
354 | + $this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_'.$this->lang_key_prefix.'_DELETED', time(), array($entity->get_name())); |
|
355 | + trigger_error($this->user->lang[$this->lang_key_prefix.'_DELETED'].adm_back_link($this->u_action)); |
|
356 | 356 | } |
357 | 357 | } |
@@ -101,8 +101,8 @@ discard block |
||
101 | 101 | 'S_FSOCKOPEN' => $this->config['ppde_curl_detected'], |
102 | 102 | 'S_CURL' => $this->config['ppde_fsock_detected'], |
103 | 103 | |
104 | - 'U_PPDE_MORE_INFORMATION' => append_sid("index.$this->php_ext", 'i=acp_extensions&mode=main&action=details&ext_name=' . urlencode($this->ext_meta['name'])), |
|
105 | - 'U_PPDE_VERSIONCHECK_FORCE' => $this->u_action . '&versioncheck_force=1', |
|
104 | + 'U_PPDE_MORE_INFORMATION' => append_sid("index.$this->php_ext", 'i=acp_extensions&mode=main&action=details&ext_name='.urlencode($this->ext_meta['name'])), |
|
105 | + 'U_PPDE_VERSIONCHECK_FORCE' => $this->u_action.'&versioncheck_force=1', |
|
106 | 106 | 'U_ACTION' => $this->u_action, |
107 | 107 | )); |
108 | 108 | } |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | case 'donors': |
154 | 154 | case 'transactions': |
155 | 155 | $confirm = true; |
156 | - $confirm_lang = 'STAT_RESYNC_' . strtoupper($action) . 'COUNTS_CONFIRM'; |
|
156 | + $confirm_lang = 'STAT_RESYNC_'.strtoupper($action).'COUNTS_CONFIRM'; |
|
157 | 157 | break; |
158 | 158 | default: |
159 | 159 | $confirm = true; |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | { |
179 | 179 | if (!$this->auth->acl_get('a_ppde_manage')) |
180 | 180 | { |
181 | - trigger_error($this->user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING); |
|
181 | + trigger_error($this->user->lang['NO_AUTH_OPERATION'].adm_back_link($this->u_action), E_USER_WARNING); |
|
182 | 182 | } |
183 | 183 | |
184 | 184 | switch ($action) |
@@ -243,14 +243,14 @@ discard block |
||
243 | 243 | return $sql; |
244 | 244 | case 'ppde_known_donors_count': |
245 | 245 | $sql = $this->make_stats_sql_select('payer_id'); |
246 | - $sql .= ' LEFT JOIN ' . USERS_TABLE . ' u |
|
246 | + $sql .= ' LEFT JOIN '.USERS_TABLE.' u |
|
247 | 247 | ON txn.user_id = u.user_id |
248 | - WHERE u.user_type = ' . USER_NORMAL . ' OR u.user_type = ' . USER_FOUNDER; |
|
248 | + WHERE u.user_type = ' . USER_NORMAL.' OR u.user_type = '.USER_FOUNDER; |
|
249 | 249 | |
250 | 250 | return $sql; |
251 | 251 | case 'ppde_anonymous_donors_count': |
252 | 252 | $sql = $this->make_stats_sql_select('payer_id'); |
253 | - $sql .= ' WHERE txn.user_id = ' . ANONYMOUS; |
|
253 | + $sql .= ' WHERE txn.user_id = '.ANONYMOUS; |
|
254 | 254 | |
255 | 255 | return $sql; |
256 | 256 | default: |
@@ -268,8 +268,8 @@ discard block |
||
268 | 268 | */ |
269 | 269 | private function make_stats_sql_select($field_name) |
270 | 270 | { |
271 | - return 'SELECT COUNT(DISTINCT txn.' . $field_name . ') AS count_result |
|
272 | - FROM ' . $this->table_ppde_transactions . ' txn'; |
|
271 | + return 'SELECT COUNT(DISTINCT txn.'.$field_name.') AS count_result |
|
272 | + FROM ' . $this->table_ppde_transactions.' txn'; |
|
273 | 273 | } |
274 | 274 | |
275 | 275 | /** |
@@ -39,16 +39,16 @@ |
||
39 | 39 | case 'transactions': |
40 | 40 | // Get an instance of the admin controller |
41 | 41 | /** @type \skouat\ppde\controller\admin_main $admin_controller */ |
42 | - $admin_controller = $phpbb_container->get('skouat.ppde.controller.admin.' . $mode); |
|
42 | + $admin_controller = $phpbb_container->get('skouat.ppde.controller.admin.'.$mode); |
|
43 | 43 | |
44 | 44 | // Make the $u_action url available in the admin overview controller |
45 | 45 | $admin_controller->set_page_url($this->u_action); |
46 | 46 | |
47 | 47 | // Set the page title for our ACP page |
48 | - $this->page_title = 'PPDE_ACP_' . strtoupper($mode); |
|
48 | + $this->page_title = 'PPDE_ACP_'.strtoupper($mode); |
|
49 | 49 | |
50 | 50 | // Load a template from adm/style for our ACP page |
51 | - $this->tpl_name = 'ppde_' . strtolower($mode); |
|
51 | + $this->tpl_name = 'ppde_'.strtolower($mode); |
|
52 | 52 | |
53 | 53 | switch ($mode) |
54 | 54 | { |
@@ -164,6 +164,6 @@ |
||
164 | 164 | ); |
165 | 165 | |
166 | 166 | // Insert data |
167 | - $this->db->sql_multi_insert($this->table_prefix . 'ppde_currency', $currency_data); |
|
167 | + $this->db->sql_multi_insert($this->table_prefix.'ppde_currency', $currency_data); |
|
168 | 168 | } |
169 | 169 | } |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | { |
23 | 23 | return array( |
24 | 24 | 'add_tables' => array( |
25 | - $this->table_prefix . 'ppde_currency' => array( |
|
25 | + $this->table_prefix.'ppde_currency' => array( |
|
26 | 26 | 'COLUMNS' => array( |
27 | 27 | 'currency_id' => array('UINT', null, 'auto_increment'), |
28 | 28 | 'currency_name' => array('VCHAR:50', ''), |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | 'PRIMARY_KEY' => array('currency_id'), |
36 | 36 | ), |
37 | 37 | |
38 | - $this->table_prefix . 'ppde_donation_pages' => array( |
|
38 | + $this->table_prefix.'ppde_donation_pages' => array( |
|
39 | 39 | 'COLUMNS' => array( |
40 | 40 | 'page_id' => array('UINT', null, 'auto_increment'), |
41 | 41 | 'page_title' => array('VCHAR:50', ''), |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | 'PRIMARY_KEY' => array('page_id'), |
50 | 50 | ), |
51 | 51 | |
52 | - $this->table_prefix . 'ppde_txn_log' => array( |
|
52 | + $this->table_prefix.'ppde_txn_log' => array( |
|
53 | 53 | 'COLUMNS' => array( |
54 | 54 | 'transaction_id' => array('UINT', null, 'auto_increment'), |
55 | 55 | // Receiver information |
@@ -106,9 +106,9 @@ discard block |
||
106 | 106 | { |
107 | 107 | return array( |
108 | 108 | 'drop_tables' => array( |
109 | - $this->table_prefix . 'ppde_currency', |
|
110 | - $this->table_prefix . 'ppde_donation_pages', |
|
111 | - $this->table_prefix . 'ppde_txn_log', |
|
109 | + $this->table_prefix.'ppde_currency', |
|
110 | + $this->table_prefix.'ppde_donation_pages', |
|
111 | + $this->table_prefix.'ppde_txn_log', |
|
112 | 112 | ), |
113 | 113 | ); |
114 | 114 | } |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | // Use WHERE clause when $currency_id is different from 0 |
61 | 61 | if ((int) $transaction_id) |
62 | 62 | { |
63 | - $sql_ary['WHERE'] = 'txn.transaction_id = ' . (int) $transaction_id; |
|
63 | + $sql_ary['WHERE'] = 'txn.transaction_id = '.(int) $transaction_id; |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | // Return all transactions entities |
@@ -92,13 +92,13 @@ discard block |
||
92 | 92 | $this->ppde_transactions_log_table => 'txn', |
93 | 93 | USERS_TABLE => 'u', |
94 | 94 | ), |
95 | - 'WHERE' => 'txn.user_id = u.user_id ' . $sql_keywords, |
|
95 | + 'WHERE' => 'txn.user_id = u.user_id '.$sql_keywords, |
|
96 | 96 | 'ORDER_BY' => $sort_by, |
97 | 97 | ); |
98 | 98 | |
99 | 99 | if ($log_time) |
100 | 100 | { |
101 | - $get_logs_sql_ary['WHERE'] = 'txn.payment_date >= ' . (int) $log_time . ' |
|
101 | + $get_logs_sql_ary['WHERE'] = 'txn.payment_date >= '.(int) $log_time.' |
|
102 | 102 | AND ' . $get_logs_sql_ary['WHERE']; |
103 | 103 | } |
104 | 104 | |
@@ -131,12 +131,12 @@ discard block |
||
131 | 131 | for ($i = 0, $num_keywords = sizeof($keywords); $i < $num_keywords; $i++) |
132 | 132 | { |
133 | 133 | $keywords_pattern[] = preg_quote($keywords[$i], '#'); |
134 | - $keywords[$i] = $this->db->sql_like_expression($this->db->get_any_char() . $keywords[$i] . $this->db->get_any_char()); |
|
134 | + $keywords[$i] = $this->db->sql_like_expression($this->db->get_any_char().$keywords[$i].$this->db->get_any_char()); |
|
135 | 135 | } |
136 | 136 | |
137 | - $sql_keywords = ' ' . $statement_operator . ' ('; |
|
137 | + $sql_keywords = ' '.$statement_operator.' ('; |
|
138 | 138 | $sql_lower = $this->db->sql_lower_text('txn.txn_id'); |
139 | - $sql_keywords .= ' ' . $sql_lower . ' ' . implode(' OR ' . $sql_lower . ' ', $keywords) . ')'; |
|
139 | + $sql_keywords .= ' '.$sql_lower.' '.implode(' OR '.$sql_lower.' ', $keywords).')'; |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | return $sql_keywords; |
@@ -176,17 +176,17 @@ discard block |
||
176 | 176 | switch ($type) |
177 | 177 | { |
178 | 178 | case 'user': |
179 | - $sql_where = ' WHERE user_id = ' . (int) $arg; |
|
179 | + $sql_where = ' WHERE user_id = '.(int) $arg; |
|
180 | 180 | break; |
181 | 181 | case 'email': |
182 | - $sql_where = ' WHERE user_email_hash = ' . crc32(strtolower($arg)) . strlen($arg); |
|
182 | + $sql_where = ' WHERE user_email_hash = '.crc32(strtolower($arg)).strlen($arg); |
|
183 | 183 | break; |
184 | 184 | default: |
185 | 185 | $sql_where = ''; |
186 | 186 | } |
187 | 187 | |
188 | 188 | $sql = 'SELECT user_id, username |
189 | - FROM ' . USERS_TABLE . |
|
189 | + FROM ' . USERS_TABLE. |
|
190 | 190 | $sql_where; |
191 | 191 | $result = $this->db->sql_query($sql); |
192 | 192 | |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | $txn_url = ''; |
259 | 259 | if ($txn_id) |
260 | 260 | { |
261 | - $txn_url = ($custom_url !== '') ? $custom_url . '&action=view&id=' . $id : $txn_id; |
|
261 | + $txn_url = ($custom_url !== '') ? $custom_url.'&action=view&id='.$id : $txn_id; |
|
262 | 262 | } |
263 | 263 | |
264 | 264 | // Return |
@@ -287,6 +287,6 @@ discard block |
||
287 | 287 | $sql_in[] = $mark; |
288 | 288 | } |
289 | 289 | |
290 | - return ' WHERE ' . $this->db->sql_in_set('transaction_id', $sql_in); |
|
290 | + return ' WHERE '.$this->db->sql_in_set('transaction_id', $sql_in); |
|
291 | 291 | } |
292 | 292 | } |
@@ -46,9 +46,9 @@ discard block |
||
46 | 46 | public function build_sql_data($lang_id = 0, $mode = 'all_pages') |
47 | 47 | { |
48 | 48 | return 'SELECT * |
49 | - FROM ' . $this->ppde_donation_pages_table . ' |
|
50 | - WHERE page_lang_id = ' . (int) ($lang_id) . |
|
51 | - $this->build_sql_and_page_title($mode) . ' |
|
49 | + FROM ' . $this->ppde_donation_pages_table.' |
|
50 | + WHERE page_lang_id = ' . (int) ($lang_id). |
|
51 | + $this->build_sql_and_page_title($mode).' |
|
52 | 52 | ORDER BY page_title'; |
53 | 53 | } |
54 | 54 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | case 'body': |
69 | 69 | case 'cancel': |
70 | 70 | case 'success': |
71 | - return " AND page_title = 'donation_" . $mode . "'"; |
|
71 | + return " AND page_title = 'donation_".$mode."'"; |
|
72 | 72 | default: |
73 | 73 | return ''; |
74 | 74 | } |
@@ -88,11 +88,11 @@ discard block |
||
88 | 88 | public function get_languages($lang_id = 0) |
89 | 89 | { |
90 | 90 | // Request by id if provided, otherwise default to request all |
91 | - $sql_where = ($lang_id <> 0) ? 'WHERE lang_id = ' . (int) $lang_id : ''; |
|
91 | + $sql_where = ($lang_id <> 0) ? 'WHERE lang_id = '.(int) $lang_id : ''; |
|
92 | 92 | |
93 | 93 | $langs = array(); |
94 | 94 | |
95 | - $sql = 'SELECT * FROM ' . LANG_TABLE . ' ' . $sql_where; |
|
95 | + $sql = 'SELECT * FROM '.LANG_TABLE.' '.$sql_where; |
|
96 | 96 | $result = $this->db->sql_query($sql); |
97 | 97 | while ($row = $this->db->sql_fetchrow($result)) |
98 | 98 | { |
@@ -58,13 +58,13 @@ discard block |
||
58 | 58 | // Use WHERE clause when $currency_id is different from 0 |
59 | 59 | if ((int) $currency_id) |
60 | 60 | { |
61 | - $sql_ary['WHERE'] = 'c.currency_id = ' . (int) $currency_id; |
|
61 | + $sql_ary['WHERE'] = 'c.currency_id = '.(int) $currency_id; |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | // Use WHERE clause when $only_enabled is true |
65 | 65 | if ($only_enabled) |
66 | 66 | { |
67 | - $sql_ary['WHERE'] = !empty($sql_ary['WHERE']) ? $sql_ary['WHERE'] . ' AND c.currency_enable = 1' : 'c.currency_enable = 1'; |
|
67 | + $sql_ary['WHERE'] = !empty($sql_ary['WHERE']) ? $sql_ary['WHERE'].' AND c.currency_enable = 1' : 'c.currency_enable = 1'; |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | // Return all page entities |
@@ -88,8 +88,8 @@ discard block |
||
88 | 88 | |
89 | 89 | if ($row['currency_order'] != $order) |
90 | 90 | { |
91 | - $this->db->sql_query('UPDATE ' . $this->ppde_currency_table . ' |
|
92 | - SET currency_order = ' . $order . ' |
|
91 | + $this->db->sql_query('UPDATE '.$this->ppde_currency_table.' |
|
92 | + SET currency_order = ' . $order.' |
|
93 | 93 | WHERE currency_id = ' . $row['currency_id']); |
94 | 94 | } |
95 | 95 | } |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | { |
108 | 108 | // By default, check that image_order is valid and fix it if necessary |
109 | 109 | return 'SELECT currency_id, currency_order |
110 | - FROM ' . $this->ppde_currency_table . ' |
|
110 | + FROM ' . $this->ppde_currency_table.' |
|
111 | 111 | ORDER BY currency_order'; |
112 | 112 | } |
113 | 113 | |
@@ -124,9 +124,9 @@ discard block |
||
124 | 124 | public function move($switch_order_id, $current_order, $id) |
125 | 125 | { |
126 | 126 | // Update the entry |
127 | - $sql = 'UPDATE ' . $this->ppde_currency_table . ' |
|
128 | - SET currency_order = ' . (int) $current_order . ' |
|
129 | - WHERE currency_order = ' . (int) $switch_order_id . ' |
|
127 | + $sql = 'UPDATE '.$this->ppde_currency_table.' |
|
128 | + SET currency_order = ' . (int) $current_order.' |
|
129 | + WHERE currency_order = ' . (int) $switch_order_id.' |
|
130 | 130 | AND currency_id <> ' . (int) $id; |
131 | 131 | $this->db->sql_query($sql); |
132 | 132 | |
@@ -135,9 +135,9 @@ discard block |
||
135 | 135 | // Only update the other entry too if the previous entry got updated |
136 | 136 | if ($move_executed) |
137 | 137 | { |
138 | - $sql = 'UPDATE ' . $this->ppde_currency_table . ' |
|
139 | - SET currency_order = ' . (int) $switch_order_id . ' |
|
140 | - WHERE currency_order = ' . (int) $current_order . ' |
|
138 | + $sql = 'UPDATE '.$this->ppde_currency_table.' |
|
139 | + SET currency_order = ' . (int) $switch_order_id.' |
|
140 | + WHERE currency_order = ' . (int) $current_order.' |
|
141 | 141 | AND currency_id = ' . (int) $id; |
142 | 142 | $this->db->sql_query($sql); |
143 | 143 | } |