Completed
Pull Request — master (#27)
by Paul
01:57
created
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.
migrations/initial_backup_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_back_reg'	=> array(
19
+				$this->table_prefix.'tfa_back_reg'	=> array(
20 20
 					'COLUMNS'	=> array(
21 21
 						'registration_id'		=> array('UINT', null, 'auto_increment'),
22 22
 						'user_id'				=> array('UINT', 0),
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	{
39 39
 		return array(
40 40
 			'drop_tables'	=> array(
41
-				$this->table_prefix . 'tfa_back_reg',
41
+				$this->table_prefix.'tfa_back_reg',
42 42
 			),
43 43
 		);
44 44
 	}
Please login to merge, or discard this patch.
migrations/initial_otp_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_otp_reg'	=> array(
19
+				$this->table_prefix.'tfa_otp_reg'	=> array(
20 20
 					'COLUMNS'	=> array(
21 21
 						'registration_id'		=> array('UINT', null, 'auto_increment'),
22 22
 						'user_id'				=> array('UINT', 0),
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	{
38 38
 		return array(
39 39
 			'drop_tables'	=> array(
40
-				$this->table_prefix . 'tfa_otp_reg',
40
+				$this->table_prefix.'tfa_otp_reg',
41 41
 			),
42 42
 		);
43 43
 	}
Please login to merge, or discard this patch.
ucp/tfa_module.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 				{
102 102
 					$module->register();
103 103
 					meta_refresh(3, $this->u_action);
104
-					$message = $this->user->lang('TFA_KEY_ADDED') . '<br /><br />' . $this->user->lang('RETURN_UCP', '<a href="' . $this->u_action . '">', '</a>');
104
+					$message = $this->user->lang('TFA_KEY_ADDED').'<br /><br />'.$this->user->lang('RETURN_UCP', '<a href="'.$this->u_action.'">', '</a>');
105 105
 					trigger_error($message);
106 106
 				}
107 107
 				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 />' . $this->user->lang('RETURN_UCP', '<a href="' . $this->u_action . '">', '</a>');
230
+		$message = $this->user->lang('TFA_KEYS_DELETED').'<br /><br />'.$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.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -111,18 +111,15 @@  discard block
 block discarded – undo
111 111
 						'S_UCP_ACTION'    => $this->u_action,
112 112
 					));
113 113
 					$this->tpl_name = $module->register_start();
114
-				}
115
-				else
114
+				} else
116 115
 				{
117 116
 					$error[] = 'TFA_MODULE_NO_REGISTER';
118 117
 				}
119
-			}
120
-			else
118
+			} else
121 119
 			{
122 120
 				$error[] = $this->user->lang('TFA_MODULE_NOT_FOUND', $class);
123 121
 			}
124
-		}
125
-		catch (\Exception $e)
122
+		} catch (\Exception $e)
126 123
 		{
127 124
 			$error[] = $e->getMessage();
128 125
 		}
@@ -154,8 +151,7 @@  discard block
 block discarded – undo
154 151
 					if (!check_form_key('ucp_tfa_keys'))
155 152
 					{
156 153
 						$error[] = 'FORM_INVALID';
157
-					}
158
-					else
154
+					} else
159 155
 					{
160 156
 							$this->delete_keys();
161 157
 					}
Please login to merge, or discard this patch.
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.
modules/abstract_module.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
 	protected function show_ucp_complete($table, $where = '')
39 39
 	{
40 40
 		$sql = 'SELECT *
41
-			FROM ' . $this->db->sql_escape($table) . '
42
-			WHERE user_id = ' . (int) $this->user->data['user_id'] . ' ' . $where . '
41
+			FROM ' . $this->db->sql_escape($table).'
42
+			WHERE user_id = ' . (int) $this->user->data['user_id'].' '.$where.'
43 43
 			ORDER BY registration_id ASC';
44 44
 
45 45
 		$result = $this->db->sql_query($sql);
@@ -69,8 +69,8 @@  discard block
 block discarded – undo
69 69
 	protected function check_table_for_user($table, $user_id, $where = '')
70 70
 	{
71 71
 		$sql = 'SELECT COUNT(registration_id) as reg_id 
72
-			FROM ' . $this->db->sql_escape($table) . '
73
-			WHERE user_id = ' . (int) $user_id . ' ' . $where;
72
+			FROM ' . $this->db->sql_escape($table).'
73
+			WHERE user_id = ' . (int) $user_id.' '.$where;
74 74
 		$result = $this->db->sql_query($sql);
75 75
 		$row = $this->db->sql_fetchrow($result);
76 76
 		$this->db->sql_freeresult($result);
Please login to merge, or discard this patch.
modules/backup_key.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -181,8 +181,8 @@  discard block
 block discarded – undo
181 181
 					'last_used' => time(),
182 182
 					'valid'		=> false,
183 183
 				);
184
-				$sql = 'UPDATE ' . $this->backup_registration_table . ' 
185
-					SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . ' 
184
+				$sql = 'UPDATE '.$this->backup_registration_table.' 
185
+					SET ' . $this->db->sql_build_array('UPDATE', $sql_ary).' 
186 186
 					WHERE 
187 187
 						registration_id = ' . (int) $registration['registration_id'];
188 188
 				$this->db->sql_query($sql);
@@ -263,8 +263,8 @@  discard block
 block discarded – undo
263 263
 	 */
264 264
 	public function delete($key)
265 265
 	{
266
-		$sql = 'DELETE FROM ' . $this->backup_registration_table . '
267
-			WHERE user_id = ' . (int) $this->user->data['user_id'] . '
266
+		$sql = 'DELETE FROM '.$this->backup_registration_table.'
267
+			WHERE user_id = ' . (int) $this->user->data['user_id'].'
268 268
 			AND registration_id =' . (int) $key;
269 269
 
270 270
 		$this->db->sql_query($sql);
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
 	 */
278 278
 	private function getRegistrations($user_id)
279 279
 	{
280
-		$sql = 'SELECT * FROM ' . $this->backup_registration_table . ' WHERE user_id = ' . (int) $user_id;
280
+		$sql = 'SELECT * FROM '.$this->backup_registration_table.' WHERE user_id = '.(int) $user_id;
281 281
 		$result = $this->db->sql_query($sql);
282 282
 		$rows = $this->db->sql_fetchrowset($result);
283 283
 
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
 					'tfa_random'    => array('TEXT', null),
29 29
 					'tfa_uid'		=> array('UINT', 0),
30 30
 				),
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	{
37 37
 		return array(
38 38
 			'drop_columns'        => array(
39
-				$this->table_prefix . 'sessions'        => array(
39
+				$this->table_prefix.'sessions'        => array(
40 40
 					'tfa_random',
41 41
 				),
42 42
 			),
Please login to merge, or discard this patch.