@@ -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 | } |
@@ -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 | { |
@@ -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 | } |
@@ -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 | } |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | * @license GNU General Public License, version 2 (GPL-2.0) |
| 111 | 111 | * |
| 112 | 112 | * @param string $step The step (enable, disable, purge) |
| 113 | - * @param array $notification_types The notification type names |
|
| 113 | + * @param string[] $notification_types The notification type names |
|
| 114 | 114 | * |
| 115 | 115 | * @return string Return notifications as temporary state |
| 116 | 116 | * @access protected |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | /** |
| 132 | 132 | * Returns the list of notification types |
| 133 | 133 | * |
| 134 | - * @return array |
|
| 134 | + * @return string[] |
|
| 135 | 135 | * @access protected |
| 136 | 136 | */ |
| 137 | 137 | protected function notification_types() |
@@ -122,7 +122,7 @@ |
||
| 122 | 122 | |
| 123 | 123 | foreach ($notification_types as $notification_type) |
| 124 | 124 | { |
| 125 | - call_user_func(array($phpbb_notifications, $step . '_notifications'), $notification_type); |
|
| 125 | + call_user_func(array($phpbb_notifications, $step.'_notifications'), $notification_type); |
|
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | return 'notifications'; |
@@ -130,13 +130,13 @@ |
||
| 130 | 130 | { |
| 131 | 131 | if ($event['on_page'][1] == 'app') |
| 132 | 132 | { |
| 133 | - if (strrpos($event['row']['session_page'], 'app.' . $this->php_ext . '/donate') === 0) |
|
| 133 | + if (strrpos($event['row']['session_page'], 'app.'.$this->php_ext.'/donate') === 0) |
|
| 134 | 134 | { |
| 135 | 135 | $event['location'] = $this->user->lang('PPDE_VIEWONLINE'); |
| 136 | 136 | $event['location_url'] = $this->controller_helper->route('skouat_ppde_donate'); |
| 137 | 137 | } |
| 138 | 138 | |
| 139 | - if (strrpos($event['row']['session_page'], 'app.' . $this->php_ext . '/donorlist') === 0) |
|
| 139 | + if (strrpos($event['row']['session_page'], 'app.'.$this->php_ext.'/donorlist') === 0) |
|
| 140 | 140 | { |
| 141 | 141 | $event['location'] = $this->user->lang('PPDE_VIEWONLINE_DONORLIST'); |
| 142 | 142 | $event['location_url'] = $this->controller_helper->route('skouat_ppde_donorlist'); |
@@ -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 | } |
@@ -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 |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | 'ON' => 'u.user_id = txn.user_id', |
| 89 | 89 | ), |
| 90 | 90 | ), |
| 91 | - 'WHERE' => 'txn.user_id <> ' . ANONYMOUS . " |
|
| 91 | + 'WHERE' => 'txn.user_id <> '.ANONYMOUS." |
|
| 92 | 92 | AND txn.payment_status = 'Completed'", |
| 93 | 93 | 'GROUP_BY' => 'txn.user_id', |
| 94 | 94 | 'ORDER_BY' => 'txn.transaction_id DESC', |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | |
| 102 | 102 | if ($max_txn_id) |
| 103 | 103 | { |
| 104 | - $donorlist_sql_ary['WHERE'] = 'txn.transaction_id = ' . $max_txn_id; |
|
| 104 | + $donorlist_sql_ary['WHERE'] = 'txn.transaction_id = '.$max_txn_id; |
|
| 105 | 105 | unset($donorlist_sql_ary['GROUP_BY'], $donorlist_sql_ary['ORDER_BY']); |
| 106 | 106 | } |
| 107 | 107 | |
@@ -132,11 +132,11 @@ discard block |
||
| 132 | 132 | */ |
| 133 | 133 | public function query_sql_count($count_sql_ary, $selected_field) |
| 134 | 134 | { |
| 135 | - $count_sql_ary['SELECT'] = 'COUNT(' . $selected_field . ') AS total_entries'; |
|
| 135 | + $count_sql_ary['SELECT'] = 'COUNT('.$selected_field.') AS total_entries'; |
|
| 136 | 136 | |
| 137 | 137 | if (array_key_exists('GROUP_BY', $count_sql_ary)) |
| 138 | 138 | { |
| 139 | - $count_sql_ary['SELECT'] = 'COUNT(DISTINCT ' . $count_sql_ary['GROUP_BY'] . ') AS total_entries'; |
|
| 139 | + $count_sql_ary['SELECT'] = 'COUNT(DISTINCT '.$count_sql_ary['GROUP_BY'].') AS total_entries'; |
|
| 140 | 140 | } |
| 141 | 141 | unset($count_sql_ary['ORDER_BY'], $count_sql_ary['GROUP_BY']); |
| 142 | 142 | |
@@ -171,13 +171,13 @@ discard block |
||
| 171 | 171 | $this->ppde_transactions_log_table => 'txn', |
| 172 | 172 | USERS_TABLE => 'u', |
| 173 | 173 | ), |
| 174 | - 'WHERE' => 'txn.user_id = u.user_id ' . $sql_keywords, |
|
| 174 | + 'WHERE' => 'txn.user_id = u.user_id '.$sql_keywords, |
|
| 175 | 175 | 'ORDER_BY' => $sort_by, |
| 176 | 176 | ); |
| 177 | 177 | |
| 178 | 178 | if ($log_time) |
| 179 | 179 | { |
| 180 | - $get_logs_sql_ary['WHERE'] = 'txn.payment_date >= ' . (int) $log_time . ' |
|
| 180 | + $get_logs_sql_ary['WHERE'] = 'txn.payment_date >= '.(int) $log_time.' |
|
| 181 | 181 | AND ' . $get_logs_sql_ary['WHERE']; |
| 182 | 182 | } |
| 183 | 183 | |
@@ -210,12 +210,12 @@ discard block |
||
| 210 | 210 | for ($i = 0, $num_keywords = sizeof($keywords); $i < $num_keywords; $i++) |
| 211 | 211 | { |
| 212 | 212 | $keywords_pattern[] = preg_quote($keywords[$i], '#'); |
| 213 | - $keywords[$i] = $this->db->sql_like_expression($this->db->get_any_char() . $keywords[$i] . $this->db->get_any_char()); |
|
| 213 | + $keywords[$i] = $this->db->sql_like_expression($this->db->get_any_char().$keywords[$i].$this->db->get_any_char()); |
|
| 214 | 214 | } |
| 215 | 215 | |
| 216 | - $sql_keywords = ' ' . $statement_operator . ' ('; |
|
| 216 | + $sql_keywords = ' '.$statement_operator.' ('; |
|
| 217 | 217 | $sql_lower = $this->db->sql_lower_text('txn.txn_id'); |
| 218 | - $sql_keywords .= ' ' . $sql_lower . ' ' . implode(' OR ' . $sql_lower . ' ', $keywords) . ')'; |
|
| 218 | + $sql_keywords .= ' '.$sql_lower.' '.implode(' OR '.$sql_lower.' ', $keywords).')'; |
|
| 219 | 219 | } |
| 220 | 220 | |
| 221 | 221 | return $sql_keywords; |
@@ -236,17 +236,17 @@ discard block |
||
| 236 | 236 | switch ($type) |
| 237 | 237 | { |
| 238 | 238 | case 'user': |
| 239 | - $sql_where = ' WHERE user_id = ' . (int) $arg; |
|
| 239 | + $sql_where = ' WHERE user_id = '.(int) $arg; |
|
| 240 | 240 | break; |
| 241 | 241 | case 'email': |
| 242 | - $sql_where = ' WHERE user_email_hash = ' . crc32(strtolower($arg)) . strlen($arg); |
|
| 242 | + $sql_where = ' WHERE user_email_hash = '.crc32(strtolower($arg)).strlen($arg); |
|
| 243 | 243 | break; |
| 244 | 244 | default: |
| 245 | 245 | $sql_where = ''; |
| 246 | 246 | } |
| 247 | 247 | |
| 248 | 248 | $sql = 'SELECT user_id, username |
| 249 | - FROM ' . USERS_TABLE . |
|
| 249 | + FROM ' . USERS_TABLE. |
|
| 250 | 250 | $sql_where; |
| 251 | 251 | $result = $this->db->sql_query($sql); |
| 252 | 252 | |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | $txn_url = ''; |
| 320 | 320 | if ($txn_id) |
| 321 | 321 | { |
| 322 | - $txn_url = ($custom_url !== '') ? $custom_url . '&action=view&id=' . $id : $txn_id; |
|
| 322 | + $txn_url = ($custom_url !== '') ? $custom_url.'&action=view&id='.$id : $txn_id; |
|
| 323 | 323 | } |
| 324 | 324 | |
| 325 | 325 | // Return |
@@ -348,6 +348,6 @@ discard block |
||
| 348 | 348 | $sql_in[] = $mark; |
| 349 | 349 | } |
| 350 | 350 | |
| 351 | - return ' WHERE ' . $this->db->sql_in_set('transaction_id', $sql_in); |
|
| 351 | + return ' WHERE '.$this->db->sql_in_set('transaction_id', $sql_in); |
|
| 352 | 352 | } |
| 353 | 353 | } |