@@ -37,12 +37,12 @@ |
||
| 37 | 37 | protected $user; |
| 38 | 38 | |
| 39 | 39 | /** |
| 40 | - * Constructor |
|
| 41 | - * |
|
| 42 | - * @param \phpbb\controller\helper $helper Controller helper object |
|
| 43 | - * @param \phpbb\template $template Template object |
|
| 44 | - * @param \phpbb\user $user User object |
|
| 45 | - */ |
|
| 40 | + * Constructor |
|
| 41 | + * |
|
| 42 | + * @param \phpbb\controller\helper $helper Controller helper object |
|
| 43 | + * @param \phpbb\template $template Template object |
|
| 44 | + * @param \phpbb\user $user User object |
|
| 45 | + */ |
|
| 46 | 46 | public function __construct(\phpbb\controller\helper $helper, \phpbb\template\template $template, \phpbb\user $user) |
| 47 | 47 | { |
| 48 | 48 | $this->helper = $helper; |
@@ -27,13 +27,13 @@ discard block |
||
| 27 | 27 | /* @var \phpbb\user */ |
| 28 | 28 | protected $user; |
| 29 | 29 | /** |
| 30 | - * Constructor |
|
| 31 | - * |
|
| 32 | - * @param \phpbb\config\config $config |
|
| 33 | - * @param \phpbb\controller\helper $helper |
|
| 34 | - * @param \phpbb\template\template $template |
|
| 35 | - * @param \phpbb\user $user |
|
| 36 | - */ |
|
| 30 | + * Constructor |
|
| 31 | + * |
|
| 32 | + * @param \phpbb\config\config $config |
|
| 33 | + * @param \phpbb\controller\helper $helper |
|
| 34 | + * @param \phpbb\template\template $template |
|
| 35 | + * @param \phpbb\user $user |
|
| 36 | + */ |
|
| 37 | 37 | public function __construct(\phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\controller\helper $helper, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user, $table_amount, $table_config, $table_donations, $table_items) |
| 38 | 38 | { |
| 39 | 39 | $this->config = $config; |
@@ -48,10 +48,10 @@ discard block |
||
| 48 | 48 | $this->table_items = $table_items; |
| 49 | 49 | } |
| 50 | 50 | /** |
| 51 | - * Controller for route /paypal |
|
| 52 | - * |
|
| 53 | - * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 54 | - */ |
|
| 51 | + * Controller for route /paypal |
|
| 52 | + * |
|
| 53 | + * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 54 | + */ |
|
| 55 | 55 | public function page() |
| 56 | 56 | { |
| 57 | 57 | $this->user->add_lang_ext('tas2580/paypal', 'common'); |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | $myPost = array(); |
| 118 | 118 | foreach ($raw_post_array as $keyval) |
| 119 | 119 | { |
| 120 | - $keyval = explode ('=', $keyval); |
|
| 120 | + $keyval = explode('=', $keyval); |
|
| 121 | 121 | if (count($keyval) == 2) |
| 122 | 122 | { |
| 123 | 123 | $myPost[$keyval[0]] = urldecode($keyval[1]); |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | } |
| 126 | 126 | // read the post from PayPal system and add 'cmd' |
| 127 | 127 | $req = 'cmd=_notify-validate'; |
| 128 | - if(function_exists('get_magic_quotes_gpc')) |
|
| 128 | + if (function_exists('get_magic_quotes_gpc')) |
|
| 129 | 129 | { |
| 130 | 130 | $get_magic_quotes_exists = true; |
| 131 | 131 | } |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | } |
| 158 | 158 | curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); |
| 159 | 159 | curl_setopt($ch, CURLOPT_POST, 1); |
| 160 | - curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); |
|
| 160 | + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
|
| 161 | 161 | curl_setopt($ch, CURLOPT_POSTFIELDS, $req); |
| 162 | 162 | curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1); |
| 163 | 163 | curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | |
| 168 | 168 | $item_id = $request->variable('item_id', 0); |
| 169 | 169 | |
| 170 | - $action = $request->variable('action', ''); |
|
| 170 | + $action = $request->variable('action', ''); |
|
| 171 | 171 | switch ($action) |
| 172 | 172 | { |
| 173 | 173 | case 'add': |
@@ -265,7 +265,7 @@ discard block |
||
| 265 | 265 | else if ($action == 'edit') |
| 266 | 266 | { |
| 267 | 267 | $sql = 'UPDATE ' . $table_prefix . 'paypal_items SET |
| 268 | - ' . $db->sql_build_array('UPDATE', $sql_data) .' |
|
| 268 | + ' . $db->sql_build_array('UPDATE', $sql_data) . ' |
|
| 269 | 269 | WHERE item_id = ' . (int) $item_id; |
| 270 | 270 | $db->sql_query($sql); |
| 271 | 271 | trigger_error($user->lang('ACP_ITEM_EDIT_SUCCESS') . adm_back_link($this->u_action)); |
@@ -329,7 +329,7 @@ discard block |
||
| 329 | 329 | $this->page_title = $user->lang('ACP_PAYPAL_DONATIONS'); |
| 330 | 330 | |
| 331 | 331 | |
| 332 | - $action = $request->variable('action', ''); |
|
| 332 | + $action = $request->variable('action', ''); |
|
| 333 | 333 | if ($action == 'delete') |
| 334 | 334 | { |
| 335 | 335 | $donation_id = $request->variable('donation_id', 0); |