@@ -79,13 +79,13 @@ discard block |
||
79 | 79 | */ |
80 | 80 | public function __construct(session_helper_interface $session_helper, user $user, request_interface $request, driver_interface $db, template $template, config $config, $php_ext, $root_path) |
81 | 81 | { |
82 | - $this->session_helper = $session_helper; |
|
83 | - $this->user = $user; |
|
84 | - $this->request = $request; |
|
85 | - $this->config = $config; |
|
86 | - $this->db = $db; |
|
82 | + $this->session_helper = $session_helper; |
|
83 | + $this->user = $user; |
|
84 | + $this->request = $request; |
|
85 | + $this->config = $config; |
|
86 | + $this->db = $db; |
|
87 | 87 | $this->template = $template; |
88 | - $this->php_ext = $php_ext; |
|
88 | + $this->php_ext = $php_ext; |
|
89 | 89 | $this->root_path = $root_path; |
90 | 90 | } |
91 | 91 | |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | { |
126 | 126 | return; |
127 | 127 | } |
128 | - if (strpos($this->user->page['page_name'], 'app' . $this->php_ext) !== false && strrpos($this->user->page['page_name'], 'paul999/tfa') !== false) |
|
128 | + if (strpos($this->user->page['page_name'], 'app'.$this->php_ext) !== false && strrpos($this->user->page['page_name'], 'paul999/tfa') !== false) |
|
129 | 129 | { |
130 | 130 | @define('SKIP_CHECK_DISABLED', true); |
131 | 131 | } |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | if ($this->user->data['is_bot'] == false && $this->user->data['user_id'] != ANONYMOUS && $this->session_helper->isTfaRequired($this->user->data['user_id'], false, $this->user->data) && !$this->session_helper->isTfaRegistered($this->user->data['user_id'])) |
134 | 134 | { |
135 | 135 | @define('SKIP_CHECK_DISABLED', true); |
136 | - $sql = 'SELECT module_id FROM ' . MODULES_TABLE . " WHERE module_langname = 'UCP_TFA' OR module_langname = 'UCP_TFA_MANAGE'"; |
|
136 | + $sql = 'SELECT module_id FROM '.MODULES_TABLE." WHERE module_langname = 'UCP_TFA' OR module_langname = 'UCP_TFA_MANAGE'"; |
|
137 | 137 | $result = $this->db->sql_query($sql, 3600); |
138 | 138 | $allowed_i = array(); |
139 | 139 | |
@@ -145,14 +145,14 @@ discard block |
||
145 | 145 | $ucp_mode = '-paul999-tfa-ucp-tfa_module'; |
146 | 146 | $allowed_i[] = $ucp_mode; |
147 | 147 | |
148 | - if ($this->user->page['page_name'] === 'ucp.' . $this->php_ext && in_array($this->request->variable('i', ''), $allowed_i)) |
|
148 | + if ($this->user->page['page_name'] === 'ucp.'.$this->php_ext && in_array($this->request->variable('i', ''), $allowed_i)) |
|
149 | 149 | { |
150 | 150 | return; // We are at our UCP page, so skip any other checks. This page is always available |
151 | 151 | } |
152 | 152 | $this->user->add_lang_ext('paul999/tfa', 'common'); |
153 | 153 | $url = append_sid("{$this->root_path}ucp.{$this->php_ext}", "i={$ucp_mode}"); |
154 | - $msg_text = $this->user->lang('TFA_REQUIRED_KEY_MISSING', '<a href="' . $url . '">', '</a>'); |
|
155 | - $msg_title = $this->user->lang['INFORMATION']; |
|
154 | + $msg_text = $this->user->lang('TFA_REQUIRED_KEY_MISSING', '<a href="'.$url.'">', '</a>'); |
|
155 | + $msg_title = $this->user->lang['INFORMATION']; |
|
156 | 156 | |
157 | 157 | page_header($msg_title); |
158 | 158 |