Completed
Push — master ( 90e122...0bdc28 )
by Paul
03:32 queued 35s
created
migrations/set_role_data.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,8 @@
 block discarded – undo
42 42
 	protected function role_exists($role)
43 43
 	{
44 44
 		$sql = 'SELECT role_id
45
-		FROM ' . ACL_ROLES_TABLE . "
46
-		WHERE role_name = '" . $this->db->sql_escape($role) . "'";
45
+		FROM ' . ACL_ROLES_TABLE."
46
+		WHERE role_name = '" . $this->db->sql_escape($role)."'";
47 47
 		$result = $this->db->sql_query_limit($sql, 1);
48 48
 		$role_id = $this->db->sql_fetchfield('role_id');
49 49
 		$this->db->sql_freeresult($result);
Please login to merge, or discard this patch.
migrations/initial_schema.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 	{
17 17
 		return array(
18 18
 			'add_tables'	=> array(
19
-				$this->table_prefix . 'tfa_registration'	=> array(
19
+				$this->table_prefix.'tfa_registration'	=> array(
20 20
 					'COLUMNS'	=> array(
21 21
 						'registration_id'		=> array('UINT', null, 'auto_increment'),
22 22
 						'user_id'				=> array('UINT', 0),
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 	{
41 41
 		return array(
42 42
 			'drop_tables'	=> array(
43
-				$this->table_prefix . 'tfa_registration',
43
+				$this->table_prefix.'tfa_registration',
44 44
 			),
45 45
 		);
46 46
 	}
Please login to merge, or discard this patch.
migrations/update_sessions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	{
25 25
 		return array(
26 26
 			'add_columns'        => array(
27
-				$this->table_prefix . 'sessions'        => array(
27
+				$this->table_prefix.'sessions'        => array(
28 28
 					'u2f_request'    => array('TEXT', null),
29 29
 				),
30 30
 			),
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 	{
36 36
 		return array(
37 37
 			'drop_columns'        => array(
38
-				$this->table_prefix . 'sessions'        => array(
38
+				$this->table_prefix.'sessions'        => array(
39 39
 					'u2f_request',
40 40
 				),
41 41
 			),
Please login to merge, or discard this patch.
ucp/tfa_module.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 				{
103 103
 					$module->register();
104 104
 					meta_refresh(3, $this->u_action);
105
-					$message = $this->user->lang['TFA_KEY_ADDED'] . '<br /><br />' . sprintf($this->user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
105
+					$message = $this->user->lang['TFA_KEY_ADDED'].'<br /><br />'.sprintf($this->user->lang['RETURN_UCP'], '<a href="'.$this->u_action.'">', '</a>');
106 106
 					trigger_error($message);
107 107
 				}
108 108
 				if ($module->can_register())
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 			}
228 228
 		}
229 229
 		meta_refresh(3, $this->u_action);
230
-		$message = $this->user->lang['TFA_KEYS_DELETED'] . '<br /><br />' . sprintf($this->user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
230
+		$message = $this->user->lang['TFA_KEYS_DELETED'].'<br /><br />'.sprintf($this->user->lang['RETURN_UCP'], '<a href="'.$this->u_action.'">', '</a>');
231 231
 		trigger_error($message);
232 232
 	}
233 233
 }
Please login to merge, or discard this patch.
acp/tfa_module.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 			'title'	=> 'ACP_TFA_SETTINGS',
44 44
 			'vars'	=> array(
45 45
 				'legend1'				=> 'ACP_TFA_SETTINGS',
46
-				'tfa_mode'				=> array('lang' => 'TFA_MODE',			'validate' => 'int',	'type' => 'select', 'method' => 'select_tfa_method', 'explain' => true),
46
+				'tfa_mode'				=> array('lang' => 'TFA_MODE', 'validate' => 'int', 'type' => 'select', 'method' => 'select_tfa_method', 'explain' => true),
47 47
 
48 48
 				'legend4'				=> 'ACP_SUBMIT_CHANGES',
49 49
 			)
@@ -97,12 +97,12 @@  discard block
 block discarded – undo
97 97
 
98 98
 		if ($submit)
99 99
 		{
100
-			$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_TFA_CONFIG_' . strtoupper($mode));
100
+			$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_TFA_CONFIG_'.strtoupper($mode));
101 101
 
102 102
 			$message = $user->lang('CONFIG_UPDATED');
103 103
 			$message_type = E_USER_NOTICE;
104 104
 
105
-			trigger_error($message . adm_back_link($this->u_action), $message_type);
105
+			trigger_error($message.adm_back_link($this->u_action), $message_type);
106 106
 		}
107 107
 
108 108
 		if (!$request->is_secure())
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 
116 116
 		$template->assign_vars(array(
117 117
 			'L_TITLE'			=> $user->lang[$display_vars['title']],
118
-			'L_TITLE_EXPLAIN'	=> $user->lang[$display_vars['title'] . '_EXPLAIN'],
118
+			'L_TITLE_EXPLAIN'	=> $user->lang[$display_vars['title'].'_EXPLAIN'],
119 119
 
120 120
 			'S_ERROR'			=> (sizeof($error)) ? true : false,
121 121
 			'ERROR_MSG'			=> implode('<br />', $error),
@@ -144,9 +144,9 @@  discard block
 block discarded – undo
144 144
 			$type = explode(':', $vars['type']);
145 145
 
146 146
 			$l_explain = '';
147
-			if ($vars['explain'] && isset($user->lang[$vars['lang'] . '_EXPLAIN']))
147
+			if ($vars['explain'] && isset($user->lang[$vars['lang'].'_EXPLAIN']))
148 148
 			{
149
-				$l_explain =  $user->lang[$vars['lang'] . '_EXPLAIN'];
149
+				$l_explain = $user->lang[$vars['lang'].'_EXPLAIN'];
150 150
 			}
151 151
 
152 152
 			$content = build_cfg_template($type, $config_key, $this->new_config, $config_key, $vars);
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 		foreach ($act_ary as $key => $data)
188 188
 		{
189 189
 			$selected = ($data == $selected_value) ? ' selected="selected"' : '';
190
-			$act_options .= '<option value="' . $data . '"' . $selected . '>' . $user->lang($key) . '</option>';
190
+			$act_options .= '<option value="'.$data.'"'.$selected.'>'.$user->lang($key).'</option>';
191 191
 		}
192 192
 		return $act_options;
193 193
 	}
Please login to merge, or discard this patch.
migrations/update_sessions2.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	{
25 25
 		return array(
26 26
 			'add_columns'        => array(
27
-				$this->table_prefix . 'sessions'        => array(
27
+				$this->table_prefix.'sessions'        => array(
28 28
 					'u2f_request'    => array('TEXT', null),
29 29
 				),
30 30
 			),
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 	{
36 36
 		return array(
37 37
 			'drop_columns'        => array(
38
-				$this->table_prefix . 'sessions'        => array(
38
+				$this->table_prefix.'sessions'        => array(
39 39
 					'u2f_request',
40 40
 				),
41 41
 			),
Please login to merge, or discard this patch.
controller/main_controller.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -87,15 +87,15 @@  discard block
 block discarded – undo
87 87
 	 */
88 88
 	public function __construct(helper $controller_helper, driver_interface $db, template $template, user $user, request_interface $request, config $config, session_helper_interface $session_helper, $root_path, $php_ext)
89 89
 	{
90
-		$this->controller_helper 	= $controller_helper;
91
-		$this->template 			= $template;
92
-		$this->db					= $db;
93
-		$this->user					= $user;
94
-		$this->request				= $request;
95
-		$this->config				= $config;
96
-		$this->session_helper		= $session_helper;
97
-		$this->root_path			= $root_path;
98
-		$this->php_ext				= $php_ext;
90
+		$this->controller_helper = $controller_helper;
91
+		$this->template = $template;
92
+		$this->db = $db;
93
+		$this->user = $user;
94
+		$this->request = $request;
95
+		$this->config = $config;
96
+		$this->session_helper = $session_helper;
97
+		$this->root_path = $root_path;
98
+		$this->php_ext = $php_ext;
99 99
 
100 100
 	}
101 101
 
@@ -130,9 +130,9 @@  discard block
 block discarded – undo
130 130
 			'tfa_random' 	=> '',
131 131
 			'tfa_uid'		=> 0,
132 132
 		);
133
-		$sql = 'UPDATE ' . SESSIONS_TABLE . ' SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . '
133
+		$sql = 'UPDATE '.SESSIONS_TABLE.' SET '.$this->db->sql_build_array('UPDATE', $sql_ary).'
134 134
 							WHERE
135
-								session_id = \'' . $this->db->sql_escape($this->user->data['session_id']) . '\' AND
135
+								session_id = \'' . $this->db->sql_escape($this->user->data['session_id']).'\' AND
136 136
 								session_user_id = ' . (int) $this->user->data['user_id'];
137 137
 		$this->db->sql_query($sql);
138 138
 
@@ -170,8 +170,8 @@  discard block
 block discarded – undo
170 170
 			if ($admin)
171 171
 			{
172 172
 				// the login array is used because the user ids do not differ for re-authentication
173
-				$sql = 'DELETE FROM ' . SESSIONS_TABLE . "
174
-						WHERE session_id = '" . $this->db->sql_escape($old_session_id) . "'
173
+				$sql = 'DELETE FROM '.SESSIONS_TABLE."
174
+						WHERE session_id = '" . $this->db->sql_escape($old_session_id)."'
175 175
 						AND session_user_id = " . (int) $user_id;
176 176
 				$this->db->sql_query($sql);
177 177
 
Please login to merge, or discard this patch.
modules/otp.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -177,8 +177,8 @@  discard block
 block discarded – undo
177 177
 				$sql_ary = array(
178 178
 					'last_used' => time(),
179 179
 				);
180
-				$sql = 'UPDATE ' . $this->otp_registration_table . ' 
181
-							SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . ' 
180
+				$sql = 'UPDATE '.$this->otp_registration_table.' 
181
+							SET ' . $this->db->sql_build_array('UPDATE', $sql_ary).' 
182 182
 							WHERE 
183 183
 								registration_id = ' . (int) $registration['registration_id'];
184 184
 				$this->db->sql_query($sql);
@@ -208,9 +208,9 @@  discard block
 block discarded – undo
208 208
 	public function register_start()
209 209
 	{
210 210
 		$secret = $this->otp->generateSecret();
211
-		$QR = $this->otp_helper->generateKeyURI('totp', $secret, generate_board_url(), '',0, 'sha1');
211
+		$QR = $this->otp_helper->generateKeyURI('totp', $secret, generate_board_url(), '', 0, 'sha1');
212 212
 		$this->template->assign_vars(array(
213
-			'TFA_QR_CODE'				=> 'https://chart.googleapis.com/chart?chs=200x200&chld=M|0&cht=qr&chl=' . $QR,
213
+			'TFA_QR_CODE'				=> 'https://chart.googleapis.com/chart?chs=200x200&chld=M|0&cht=qr&chl='.$QR,
214 214
 			'TFA_SECRET'				=> $secret,
215 215
 			'L_TFA_ADD_OTP_KEY_EXPLAIN'	=> $this->user->lang('TFA_ADD_OTP_KEY_EXPLAIN', $secret),
216 216
 			'S_HIDDEN_FIELDS_MODULE'	=> build_hidden_fields(array(
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 	public function register()
231 231
 	{
232 232
 		$secret = $this->request->variable('secret', '');
233
-		$otp	= $this->request->variable('register', '');
233
+		$otp = $this->request->variable('register', '');
234 234
 
235 235
 		if (!$this->otp->checkTOTP($secret, $otp, 'sha1'))
236 236
 		{
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 			'last_used' 	=> time(),
245 245
 		);
246 246
 
247
-		$sql = 'INSERT INTO ' . $this->otp_registration_table . ' ' . $this->db->sql_build_array('INSERT', $sql_ary);
247
+		$sql = 'INSERT INTO '.$this->otp_registration_table.' '.$this->db->sql_build_array('INSERT', $sql_ary);
248 248
 		$this->db->sql_query($sql);
249 249
 	}
250 250
 
@@ -267,8 +267,8 @@  discard block
 block discarded – undo
267 267
 	 */
268 268
 	public function delete($key)
269 269
 	{
270
-		$sql = 'DELETE FROM ' . $this->otp_registration_table . '
271
-					WHERE user_id = ' . (int) $this->user->data['user_id'] . '
270
+		$sql = 'DELETE FROM '.$this->otp_registration_table.'
271
+					WHERE user_id = ' . (int) $this->user->data['user_id'].'
272 272
 					AND registration_id =' . (int) $key;
273 273
 
274 274
 		$this->db->sql_query($sql);
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
 	 */
282 282
 	private function getRegistrations($user_id)
283 283
 	{
284
-		$sql = 'SELECT * FROM ' . $this->otp_registration_table . ' WHERE user_id = ' . (int) $user_id;
284
+		$sql = 'SELECT * FROM '.$this->otp_registration_table.' WHERE user_id = '.(int) $user_id;
285 285
 		$result = $this->db->sql_query($sql);
286 286
 		$rows = $this->db->sql_fetchrowset($result);
287 287
 
Please login to merge, or discard this patch.
modules/abstract_module.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -38,10 +38,10 @@  discard block
 block discarded – undo
38 38
 	protected function show_ucp_complete($table, $where = '')
39 39
 	{
40 40
 		$sql = 'SELECT *
41
-			FROM ' . $table . '
41
+			FROM ' . $table.'
42 42
 			WHERE 
43
-				user_id = ' . (int) $this->user->data['user_id'] . '
44
-				' . $where . '
43
+				user_id = ' . (int) $this->user->data['user_id'].'
44
+				' . $where.'
45 45
 			ORDER BY registration_id ASC';
46 46
 
47 47
 		$result = $this->db->sql_query($sql);
@@ -71,10 +71,10 @@  discard block
 block discarded – undo
71 71
 	protected function check_table_for_user($table, $user_id, $where = '')
72 72
 	{
73 73
 		$sql = 'SELECT COUNT(registration_id) as reg_id 
74
-					FROM ' . $table . ' 
74
+					FROM ' . $table.' 
75 75
 					WHERE 
76
-						user_id = ' . (int) $user_id .
77
-						' ' . $where;
76
+						user_id = ' . (int) $user_id.
77
+						' '.$where;
78 78
 		$result = $this->db->sql_query($sql);
79 79
 		$row = $this->db->sql_fetchrow($result);
80 80
 		$this->db->sql_freeresult($result);
Please login to merge, or discard this patch.