@@ -100,8 +100,8 @@ discard block |
||
100 | 100 | 'S_CURL' => $this->config['ppde_curl_detected'], |
101 | 101 | 'S_FSOCKOPEN' => $this->config['ppde_fsock_detected'], |
102 | 102 | |
103 | - 'U_PPDE_MORE_INFORMATION' => append_sid("index.$this->php_ext", 'i=acp_extensions&mode=main&action=details&ext_name=' . urlencode($this->ext_meta['name'])), |
|
104 | - 'U_PPDE_VERSIONCHECK_FORCE' => $this->u_action . '&versioncheck_force=1', |
|
103 | + 'U_PPDE_MORE_INFORMATION' => append_sid("index.$this->php_ext", 'i=acp_extensions&mode=main&action=details&ext_name='.urlencode($this->ext_meta['name'])), |
|
104 | + 'U_PPDE_VERSIONCHECK_FORCE' => $this->u_action.'&versioncheck_force=1', |
|
105 | 105 | 'U_ACTION' => $this->u_action, |
106 | 106 | )); |
107 | 107 | } |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | case 'donors': |
153 | 153 | case 'transactions': |
154 | 154 | $confirm = true; |
155 | - $confirm_lang = 'STAT_RESYNC_' . strtoupper($action) . 'COUNTS_CONFIRM'; |
|
155 | + $confirm_lang = 'STAT_RESYNC_'.strtoupper($action).'COUNTS_CONFIRM'; |
|
156 | 156 | break; |
157 | 157 | default: |
158 | 158 | $confirm = true; |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | { |
178 | 178 | if (!$this->auth->acl_get('a_ppde_manage')) |
179 | 179 | { |
180 | - trigger_error($this->user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING); |
|
180 | + trigger_error($this->user->lang['NO_AUTH_OPERATION'].adm_back_link($this->u_action), E_USER_WARNING); |
|
181 | 181 | } |
182 | 182 | |
183 | 183 | switch ($action) |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $this->template = $template; |
71 | 71 | $this->user = $user; |
72 | 72 | $this->adm_relative_path = $adm_relative_path; |
73 | - $this->phpbb_admin_path = $phpbb_root_path . $adm_relative_path; |
|
73 | + $this->phpbb_admin_path = $phpbb_root_path.$adm_relative_path; |
|
74 | 74 | $this->phpbb_root_path = $phpbb_root_path; |
75 | 75 | $this->php_ext = $php_ext; |
76 | 76 | $this->table_ppde_transactions = $table_ppde_transactions; |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | $this->config->set('ppde_anonymous_donors_count', $this->sql_query_update_stats('ppde_anonymous_donors_count')); |
128 | 128 | $this->config->set('ppde_transactions_count', $this->sql_query_update_stats('ppde_transactions_count'), true); |
129 | 129 | |
130 | - $this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_' . $this->lang_key_prefix . '_PURGED', time()); |
|
130 | + $this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_'.$this->lang_key_prefix.'_PURGED', time()); |
|
131 | 131 | } |
132 | 132 | } |
133 | 133 | else |
@@ -164,10 +164,10 @@ discard block |
||
164 | 164 | |
165 | 165 | // Define where and sort sql for use in displaying transactions |
166 | 166 | $sql_where = ($sort_days) ? (time() - ($sort_days * 86400)) : 0; |
167 | - $sql_sort = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC'); |
|
167 | + $sql_sort = $sort_by_sql[$sort_key].' '.(($sort_dir == 'd') ? 'DESC' : 'ASC'); |
|
168 | 168 | |
169 | 169 | $keywords = utf8_normalize_nfc($this->request->variable('keywords', '', true)); |
170 | - $keywords_param = !empty($keywords) ? '&keywords=' . urlencode(htmlspecialchars_decode($keywords)) : ''; |
|
170 | + $keywords_param = !empty($keywords) ? '&keywords='.urlencode(htmlspecialchars_decode($keywords)) : ''; |
|
171 | 171 | |
172 | 172 | // Grab log data |
173 | 173 | $log_data = array(); |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | |
176 | 176 | $this->view_txn_log($log_data, $log_count, $this->config['topics_per_page'], $start, $sql_where, $sql_sort, $keywords); |
177 | 177 | |
178 | - $base_url = $this->u_action . '&' . $u_sort_param . $keywords_param; |
|
178 | + $base_url = $this->u_action.'&'.$u_sort_param.$keywords_param; |
|
179 | 179 | $pagination->generate_template_pagination($base_url, 'pagination', 'start', $log_count, $this->config['topics_per_page'], $start); |
180 | 180 | |
181 | 181 | $this->template->assign_vars(array( |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | 'S_SORT_KEY' => $s_sort_key, |
186 | 186 | 'S_SORT_DIR' => $s_sort_dir, |
187 | 187 | 'S_TXN' => $mode, |
188 | - 'U_ACTION' => $this->u_action . '&' . $u_sort_param . $keywords_param . '&start=' . $start, |
|
188 | + 'U_ACTION' => $this->u_action.'&'.$u_sort_param.$keywords_param.'&start='.$start, |
|
189 | 189 | )); |
190 | 190 | |
191 | 191 | foreach ($log_data as $row) |
@@ -249,14 +249,14 @@ discard block |
||
249 | 249 | return $sql; |
250 | 250 | case 'ppde_known_donors_count': |
251 | 251 | $sql = $this->make_stats_sql_select('payer_id'); |
252 | - $sql .= ' LEFT JOIN ' . USERS_TABLE . ' u |
|
252 | + $sql .= ' LEFT JOIN '.USERS_TABLE.' u |
|
253 | 253 | ON txn.user_id = u.user_id |
254 | - WHERE u.user_type = ' . USER_NORMAL . ' OR u.user_type = ' . USER_FOUNDER; |
|
254 | + WHERE u.user_type = ' . USER_NORMAL.' OR u.user_type = '.USER_FOUNDER; |
|
255 | 255 | |
256 | 256 | return $sql; |
257 | 257 | case 'ppde_anonymous_donors_count': |
258 | 258 | $sql = $this->make_stats_sql_select('payer_id'); |
259 | - $sql .= ' WHERE txn.user_id = ' . ANONYMOUS; |
|
259 | + $sql .= ' WHERE txn.user_id = '.ANONYMOUS; |
|
260 | 260 | |
261 | 261 | return $sql; |
262 | 262 | default: |
@@ -274,8 +274,8 @@ discard block |
||
274 | 274 | */ |
275 | 275 | private function make_stats_sql_select($field_name) |
276 | 276 | { |
277 | - return 'SELECT COUNT(DISTINCT txn.' . $field_name . ') AS count_result |
|
278 | - FROM ' . $this->table_ppde_transactions . ' txn'; |
|
277 | + return 'SELECT COUNT(DISTINCT txn.'.$field_name.') AS count_result |
|
278 | + FROM ' . $this->table_ppde_transactions.' txn'; |
|
279 | 279 | } |
280 | 280 | |
281 | 281 | /** |
@@ -311,14 +311,14 @@ discard block |
||
311 | 311 | |
312 | 312 | $this->template->assign_vars(array( |
313 | 313 | 'BOARD_USERNAME' => $data['username'], |
314 | - 'EXCHANGE_RATE' => '1 ' . $data['mc_currency'] . ' = ' . $data['exchange_rate'] . ' ' . $data['settle_currency'], |
|
314 | + 'EXCHANGE_RATE' => '1 '.$data['mc_currency'].' = '.$data['exchange_rate'].' '.$data['settle_currency'], |
|
315 | 315 | 'ITEM_NAME' => $data['item_name'], |
316 | 316 | 'ITEM_NUMBER' => $data['item_number'], |
317 | - 'MC_CURRENCY' => $data['net_amount'] . ' ' . $data['mc_currency'], |
|
318 | - 'MC_GROSS' => $data['mc_gross'] . ' ' . $data['mc_currency'], |
|
319 | - 'MC_FEE' => '-' . $data['mc_fee'] . ' ' . $data['mc_currency'], |
|
320 | - 'MC_NET' => $data['net_amount'] . ' ' . $data['mc_currency'], |
|
321 | - 'NAME' => $data['first_name'] . ' ' . $data['last_name'], |
|
317 | + 'MC_CURRENCY' => $data['net_amount'].' '.$data['mc_currency'], |
|
318 | + 'MC_GROSS' => $data['mc_gross'].' '.$data['mc_currency'], |
|
319 | + 'MC_FEE' => '-'.$data['mc_fee'].' '.$data['mc_currency'], |
|
320 | + 'MC_NET' => $data['net_amount'].' '.$data['mc_currency'], |
|
321 | + 'NAME' => $data['first_name'].' '.$data['last_name'], |
|
322 | 322 | 'PAYER_EMAIL' => $data['payer_email'], |
323 | 323 | 'PAYER_ID' => $data['payer_id'], |
324 | 324 | 'PAYER_STATUS' => ($data['payer_status']) ? $this->user->lang['PPDE_DT_VERIFIED'] : $this->user->lang['PPDE_DT_UNVERIFIED'], |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | 'PAYMENT_STATUS' => $payment_status_ary[strtolower($data['payment_status'])], |
327 | 327 | 'RECEIVER_EMAIL' => $data['receiver_email'], |
328 | 328 | 'RECEIVER_ID' => $data['receiver_id'], |
329 | - 'SETTLE_AMOUNT' => $data['settle_amount'] . ' ' . $data['settle_currency'], |
|
329 | + 'SETTLE_AMOUNT' => $data['settle_amount'].' '.$data['settle_currency'], |
|
330 | 330 | 'TXN_ID' => $data['txn_id'], |
331 | 331 | |
332 | 332 | 'L_PPDE_DT_SETTLE_AMOUNT' => $this->user->lang('PPDE_DT_SETTLE_AMOUNT', $data['settle_currency']), |
@@ -388,13 +388,13 @@ discard block |
||
388 | 388 | |
389 | 389 | if ($this->get_container_entity()->is_in_admin() && $this->phpbb_admin_path) |
390 | 390 | { |
391 | - $url_ary['profile_url'] = append_sid($this->phpbb_admin_path . 'index.' . $this->php_ext, 'i=users&mode=overview'); |
|
392 | - $url_ary['txn_url'] = append_sid($this->phpbb_admin_path . 'index.' . $this->php_ext, 'i=-skouat-ppde-acp-ppde_module&mode=transactions'); |
|
391 | + $url_ary['profile_url'] = append_sid($this->phpbb_admin_path.'index.'.$this->php_ext, 'i=users&mode=overview'); |
|
392 | + $url_ary['txn_url'] = append_sid($this->phpbb_admin_path.'index.'.$this->php_ext, 'i=-skouat-ppde-acp-ppde_module&mode=transactions'); |
|
393 | 393 | |
394 | 394 | } |
395 | 395 | else |
396 | 396 | { |
397 | - $url_ary['profile_url'] = append_sid($this->phpbb_root_path . 'memberlist.' . $this->php_ext, 'mode=viewprofile'); |
|
397 | + $url_ary['profile_url'] = append_sid($this->phpbb_root_path.'memberlist.'.$this->php_ext, 'mode=viewprofile'); |
|
398 | 398 | $url_ary['txn_url'] = ''; |
399 | 399 | } |
400 | 400 |
@@ -263,14 +263,14 @@ discard block |
||
263 | 263 | foreach ($args as $key => $value) |
264 | 264 | { |
265 | 265 | $value = urlencode($value); |
266 | - $message .= $key . ' = ' . $value . ";\n"; |
|
266 | + $message .= $key.' = '.$value.";\n"; |
|
267 | 267 | } |
268 | 268 | unset($value); |
269 | 269 | } |
270 | 270 | |
271 | 271 | if ($log_in_file) |
272 | 272 | { |
273 | - error_log(sprintf('[%s] %s %s', $error_timestamp, $message, $backtrace), 3, $this->root_path . 'store/ppde_transactions.log'); |
|
273 | + error_log(sprintf('[%s] %s %s', $error_timestamp, $message, $backtrace), 3, $this->root_path.'store/ppde_transactions.log'); |
|
274 | 274 | } |
275 | 275 | |
276 | 276 | if ($exit) |
@@ -489,13 +489,13 @@ discard block |
||
489 | 489 | foreach ($this->get_post_data() as $key => $value) |
490 | 490 | { |
491 | 491 | $encoded = urlencode(stripslashes($value)); |
492 | - $values[] = $key . '=' . $encoded; |
|
492 | + $values[] = $key.'='.$encoded; |
|
493 | 493 | |
494 | 494 | $this->transaction_data[$key] = $value; |
495 | 495 | } |
496 | 496 | |
497 | 497 | // implode the array into a string URI |
498 | - $this->args_return_uri .= '&' . implode('&', $values); |
|
498 | + $this->args_return_uri .= '&'.implode('&', $values); |
|
499 | 499 | } |
500 | 500 | |
501 | 501 | /** |
@@ -556,7 +556,7 @@ discard block |
||
556 | 556 | if (curl_errno($ch) != 0) |
557 | 557 | { |
558 | 558 | // cURL error |
559 | - $this->log_error($this->user->lang['CURL_ERROR'] . curl_errno($ch) . ' (' . curl_error($ch) . ')', $this->use_log_error); |
|
559 | + $this->log_error($this->user->lang['CURL_ERROR'].curl_errno($ch).' ('.curl_error($ch).')', $this->use_log_error); |
|
560 | 560 | curl_close($ch); |
561 | 561 | } |
562 | 562 | else |
@@ -593,20 +593,20 @@ discard block |
||
593 | 593 | // post back to PayPal system to validate |
594 | 594 | $header = "POST /cgi-bin/webscr HTTP/1.1\r\n"; |
595 | 595 | $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; |
596 | - $header .= 'Host: ' . $parse_url['host'] . "\r\n"; |
|
597 | - $header .= 'Content-Length: ' . strlen($encoded_data) . "\r\n"; |
|
596 | + $header .= 'Host: '.$parse_url['host']."\r\n"; |
|
597 | + $header .= 'Content-Length: '.strlen($encoded_data)."\r\n"; |
|
598 | 598 | $header .= "Connection: Close\r\n\r\n"; |
599 | 599 | |
600 | - $fp = fsockopen('ssl://' . $parse_url['host'], 443, $errno, $errstr, $this->timeout); |
|
600 | + $fp = fsockopen('ssl://'.$parse_url['host'], 443, $errno, $errstr, $this->timeout); |
|
601 | 601 | |
602 | 602 | if (!$fp) |
603 | 603 | { |
604 | - $this->log_error($this->user->lang['FSOCK_ERROR'] . $errno . ' (' . $errstr . ')', $this->use_log_error); |
|
604 | + $this->log_error($this->user->lang['FSOCK_ERROR'].$errno.' ('.$errstr.')', $this->use_log_error); |
|
605 | 605 | } |
606 | 606 | else |
607 | 607 | { |
608 | 608 | // Send the data to PayPal |
609 | - fputs($fp, $header . $encoded_data); |
|
609 | + fputs($fp, $header.$encoded_data); |
|
610 | 610 | |
611 | 611 | // Loop through the response |
612 | 612 | while (!feof($fp)) |
@@ -641,17 +641,17 @@ discard block |
||
641 | 641 | if ($this->txn_is_verified()) |
642 | 642 | { |
643 | 643 | $this->verified = $this->transaction_data['confirmed'] = true; |
644 | - $this->log_error("DEBUG VERIFIED:\n" . $this->get_text_report(), $this->use_log_error); |
|
644 | + $this->log_error("DEBUG VERIFIED:\n".$this->get_text_report(), $this->use_log_error); |
|
645 | 645 | } |
646 | 646 | else if ($this->txn_is_invalid()) |
647 | 647 | { |
648 | 648 | $this->verified = $this->transaction_data['confirmed'] = false; |
649 | - $this->log_error("DEBUG INVALID:\n" . $this->get_text_report(), $this->use_log_error, true); |
|
649 | + $this->log_error("DEBUG INVALID:\n".$this->get_text_report(), $this->use_log_error, true); |
|
650 | 650 | } |
651 | 651 | else |
652 | 652 | { |
653 | 653 | $this->verified = $this->transaction_data['confirmed'] = false; |
654 | - $this->log_error("DEBUG OTHER:\n" . $this->get_text_report(), $this->use_log_error); |
|
654 | + $this->log_error("DEBUG OTHER:\n".$this->get_text_report(), $this->use_log_error); |
|
655 | 655 | $this->log_error($this->user->lang['UNEXPECTED_RESPONSE'], $this->use_log_error, true); |
656 | 656 | } |
657 | 657 | |
@@ -711,12 +711,12 @@ discard block |
||
711 | 711 | |
712 | 712 | // Date and POST url |
713 | 713 | $this->text_report_insert_line($r); |
714 | - $r .= "\n[" . date('m/d/Y g:i A') . '] - ' . $this->u_paypal . ' ( ' . $this->get_curl_fsock() . " )\n"; |
|
714 | + $r .= "\n[".date('m/d/Y g:i A').'] - '.$this->u_paypal.' ( '.$this->get_curl_fsock()." )\n"; |
|
715 | 715 | |
716 | 716 | // HTTP Response |
717 | 717 | $this->text_report_insert_line($r); |
718 | - $r .= "\n" . $this->get_report_response() . "\n"; |
|
719 | - $r .= "\n" . $this->get_response_status() . "\n"; |
|
718 | + $r .= "\n".$this->get_report_response()."\n"; |
|
719 | + $r .= "\n".$this->get_response_status()."\n"; |
|
720 | 720 | $this->text_report_insert_line($r); |
721 | 721 | |
722 | 722 | // POST vars |
@@ -782,7 +782,7 @@ discard block |
||
782 | 782 | { |
783 | 783 | foreach ($this->transaction_data as $key => $value) |
784 | 784 | { |
785 | - $r .= str_pad($key, 25) . $value . "\n"; |
|
785 | + $r .= str_pad($key, 25).$value."\n"; |
|
786 | 786 | } |
787 | 787 | } |
788 | 788 | |
@@ -953,7 +953,7 @@ discard block |
||
953 | 953 | { |
954 | 954 | if (!function_exists('group_user_add')) |
955 | 955 | { |
956 | - include($this->root_path . 'includes/functions_user.' . $this->php_ext); |
|
956 | + include($this->root_path.'includes/functions_user.'.$this->php_ext); |
|
957 | 957 | } |
958 | 958 | |
959 | 959 | // add the user to the donors group and set as default. |