Passed
Push — master ( 5a3ed5...a919c1 )
by Nils
06:37 queued 14s
created
includes/core/login.php 1 patch
Spacing   +40 added lines, -41 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 $postType = $request->query->get('post_type', '');
48 48
 $postType = filter_var($postType, FILTER_SANITIZE_SPECIAL_CHARS);
49 49
 $get['post_type'] = $postType;
50
-if (isset($SETTINGS['duo']) === true && (int) $SETTINGS['duo'] === 1 && $get['post_type'] === 'duo' ) {
50
+if (isset($SETTINGS['duo']) === true && (int) $SETTINGS['duo'] === 1 && $get['post_type'] === 'duo') {
51 51
     $get['duo_state'] = $request->query->get('state');
52 52
     $get['duo_code'] = $request->query->get('duo_code');
53 53
 }
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         exit;
78 78
     } else {
79 79
         // Gérer les erreurs
80
-        echo 'Erreur lors de la récupération des informations utilisateur : ' . htmlspecialchars($userInfo['message'], ENT_QUOTES, 'UTF-8');
80
+        echo 'Erreur lors de la récupération des informations utilisateur : '.htmlspecialchars($userInfo['message'], ENT_QUOTES, 'UTF-8');
81 81
     };
82 82
 }
83 83
 
@@ -100,8 +100,7 @@  discard block
 block discarded – undo
100 100
 <div class="login-box">
101 101
     <div class="login-logo"><div style="margin:30px;">',
102 102
     isset($SETTINGS['custom_logo']) === true && empty($SETTINGS['custom_logo']) === false ?
103
-        '<img src="' . (string) $SETTINGS['custom_logo'] . '" alt="" style="text-align:center; max-width:100px;" />' :
104
-        '<img src="includes/images/teampass-logo2-login.png" alt="Teampass Logo">',
103
+        '<img src="'.(string) $SETTINGS['custom_logo'].'" alt="" style="text-align:center; max-width:100px;" />' : '<img src="includes/images/teampass-logo2-login.png" alt="Teampass Logo">',
105 104
         '
106 105
         </div>
107 106
         <div style="font-weight:bold;">
@@ -121,14 +120,14 @@  discard block
 block discarded – undo
121 120
 
122 121
         <div class="card-body login-card-body1">
123 122
             <div class="input-group has-feedback mb-2">
124
-                <div class="input-group-prepend infotip" title="' . $lang->get('login') . '">
123
+                <div class="input-group-prepend infotip" title="' . $lang->get('login').'">
125 124
                     <span class="input-group-text"><i class="fa-solid fa-user fa-fw"></i></span>
126 125
                 </div>';
127 126
 if (
128 127
     isset($SETTINGS['enable_http_request_login']) === true
129 128
     && (int) $SETTINGS['enable_http_request_login'] === 1
130 129
     && $request->getUser() !== null
131
-    && ! (isset($SETTINGS['maintenance_mode']) === true
130
+    && !(isset($SETTINGS['maintenance_mode']) === true
132 131
         && (int) $SETTINGS['maintenance_mode'] === 1)
133 132
 ) {
134 133
     if (strpos($request->getUser(), '@') !== false) {
@@ -142,42 +141,42 @@  discard block
 block discarded – undo
142 141
             <input type="text" id="login" class="form-control" placeholder="', filter_var($username, FILTER_SANITIZE_FULL_SPECIAL_CHARS), '" readonly>';
143 142
 } else {
144 143
     echo '
145
-            <input type="text" id="login" class="form-control" placeholder="' . $lang->get('index_login') . '" value="'.(null !== $session->get('user-login') && empty($session->get('user-login')) === false ? filter_var($session->get('user-login'), FILTER_SANITIZE_FULL_SPECIAL_CHARS) : '').'">';
144
+            <input type="text" id="login" class="form-control" placeholder="' . $lang->get('index_login').'" value="'.(null !== $session->get('user-login') && empty($session->get('user-login')) === false ? filter_var($session->get('user-login'), FILTER_SANITIZE_FULL_SPECIAL_CHARS) : '').'">';
146 145
 }
147 146
 
148 147
 echo '
149 148
         </div>';
150
-if (! (isset($SETTINGS['enable_http_request_login']) === true
149
+if (!(isset($SETTINGS['enable_http_request_login']) === true
151 150
     && (int) $SETTINGS['enable_http_request_login'] === 1
152 151
     && $request->getUser() !== null
153
-    && ! (isset($SETTINGS['maintenance_mode']) === true
152
+    && !(isset($SETTINGS['maintenance_mode']) === true
154 153
         && (int) $SETTINGS['maintenance_mode'] === 1))) {
155 154
     echo '
156 155
         <div class="input-group has-feedback mb-2">
157
-            <div class="input-group-prepend infotip" title="' . $lang->get('password') . '">
156
+            <div class="input-group-prepend infotip" title="' . $lang->get('password').'">
158 157
                 <span class="input-group-text"><i class="fa-solid fa-lock fa-fw"></i></span>
159 158
             </div>
160
-            <input type="password" id="pw" class="form-control submit-button" placeholder="' . $lang->get('index_password') . '">
159
+            <input type="password" id="pw" class="form-control submit-button" placeholder="' . $lang->get('index_password').'">
161 160
         </div>';
162 161
 }
163 162
 
164 163
 echo '
165 164
         <div class="input-group has-feedback mb-2">
166
-            <div class="input-group-prepend infotip" title="' . $lang->get('session_expiration_in_minutes') . '">
165
+            <div class="input-group-prepend infotip" title="' . $lang->get('session_expiration_in_minutes').'">
167 166
                 <span class="input-group-text"><i class="fa-solid fa-clock fa-fw"></i></span>
168 167
             </div>
169 168
             <input type="text" id="session_duration" class="form-control submit-button" 
170
-            placeholder="' . $lang->get('index_session_duration') .'&nbsp;(' . $lang->get('minutes') . ')" 
169
+            placeholder="' . $lang->get('index_session_duration').'&nbsp;('.$lang->get('minutes').')" 
171 170
             value="', isset($SETTINGS['default_session_expiration_time']) === true ? $SETTINGS['default_session_expiration_time'] : '', '">
172 171
         </div>';
173 172
 // 2FA auth selector
174 173
 $mfaHtmlPart = '
175
-        <input type="hidden" id="2fa_user_selection" value="'.htmlspecialchars((isset($get['post_type']) === true && $get['post_type'] === 'duo') ? 'duo' : ''). '">
176
-        <input type="hidden" id="duo_code" value="'.htmlspecialchars(isset($get['duo_code']) === true && is_null($get['duo_code']) === false ? $get['duo_code'] : ''). '">
177
-        <input type="hidden" id="duo_state" value="'.htmlspecialchars(isset($get['duo_state']) === true && is_null($get['duo_state']) === false ? $get['duo_state'] : ''). '">
174
+        <input type="hidden" id="2fa_user_selection" value="'.htmlspecialchars((isset($get['post_type']) === true && $get['post_type'] === 'duo') ? 'duo' : '').'">
175
+        <input type="hidden" id="duo_code" value="'.htmlspecialchars(isset($get['duo_code']) === true && is_null($get['duo_code']) === false ? $get['duo_code'] : '').'">
176
+        <input type="hidden" id="duo_state" value="'.htmlspecialchars(isset($get['duo_state']) === true && is_null($get['duo_state']) === false ? $get['duo_state'] : '').'">
178 177
         <div class="row mb-3 hidden" id="2fa_methods_selector">
179 178
             <div class="col-12">
180
-                <h8 class="login-box-msg">' . $lang->get('2fa_authentication_selector') . '</h8>
179
+                <h8 class="login-box-msg">' . $lang->get('2fa_authentication_selector').'</h8>
181 180
                 <div class="2fa-methods text-center mt-2">'.
182 181
                 (isset($SETTINGS['google_authentication']) === true && (int) $SETTINGS['google_authentication'] === 1 ?
183 182
         '
@@ -210,14 +209,14 @@  discard block
 block discarded – undo
210 209
     echo '
211 210
         <div id="div-2fa-google" class="mb-3 div-2fa-method hidden">
212 211
             <div class="input-group has-feedback mb-2">
213
-                <div class="input-group-prepend infotip" title="' . $lang->get('mfa_unique_code') . '">
212
+                <div class="input-group-prepend infotip" title="' . $lang->get('mfa_unique_code').'">
214 213
                     <span class="input-group-text"><i class="fa-solid fa-key fa-fw"></i></span>
215 214
                 </div>
216
-                <input type="text" id="ga_code" class="form-control submit-button" placeholder="' . $lang->get('ga_identification_code') . '" />
215
+                <input type="text" id="ga_code" class="form-control submit-button" placeholder="' . $lang->get('ga_identification_code').'" />
217 216
                 <span class="input-group-append">
218 217
                     <button type="button" class="btn btn-info btn-flat" onclick="send_user_new_temporary_ga_code()">
219 218
                         <i class="fa-solid fa-envelope form-control-feedback pointer infotip" 
220
-                    title="' . $lang->get('i_need_to_generate_new_ga_code') . '"></i>
219
+                    title="' . $lang->get('i_need_to_generate_new_ga_code').'"></i>
221 220
                     </button>
222 221
                 </span>
223 222
             </div>
@@ -235,7 +234,7 @@  discard block
 block discarded – undo
235 234
 <script>
236 235
 var seconds = 1;
237 236
 function updateLogonButton(timeToGo){
238
-    document.getElementById("but_identify_user").value = "' . $lang->get('duration_login_attempt') . ' " + timeToGo;
237
+    document.getElementById("but_identify_user").value = "' . $lang->get('duration_login_attempt').' " + timeToGo;
239 238
 }
240 239
 $( window ).on( "load", function() {
241 240
     updateLogonButton(seconds);
@@ -244,7 +243,7 @@  discard block
 block discarded – undo
244 243
         if (seconds >= 0) {
245 244
             updateLogonButton(seconds);
246 245
         } else if(seconds === 0) {
247
-            launchIdentify("", "' . $nextUrl . '");
246
+            launchIdentify("", "' . $nextUrl.'");
248 247
         }
249 248
         updateLogonButton(seconds);
250 249
     },
@@ -265,15 +264,15 @@  discard block
 block discarded – undo
265 264
             <div class="col-8">
266 265
                 <div id="yubiko-new-key" class="alert alert-info hidden">
267 266
                     <p>
268
-                        <input type="text" size="10" id="yubico_user_id" class="form-control" placeholder="' . $lang->get('yubico_user_id') . '">
267
+                        <input type="text" size="10" id="yubico_user_id" class="form-control" placeholder="' . $lang->get('yubico_user_id').'">
269 268
                     </p>
270 269
                     <p>
271
-                    <input type="text" size="10" id="yubico_user_key" class="form-control" placeholder="' . $lang->get('yubico_user_key') . '">
270
+                    <input type="text" size="10" id="yubico_user_key" class="form-control" placeholder="' . $lang->get('yubico_user_key').'">
272 271
                     </p>
273 272
                 </div>
274
-                <input autocomplete="off" type="text" id="yubico_key" class="form-control submit-button" placeholder="' . $lang->get('press_your_yubico_key') . '">
273
+                <input autocomplete="off" type="text" id="yubico_key" class="form-control submit-button" placeholder="' . $lang->get('press_your_yubico_key').'">
275 274
                 <div class="row">
276
-                    <span class="ml-2 mt-1 font-weight-light small pointer" id="register-yubiko-key">' . $lang->get('register_new_yubiko_key') . '</span>
275
+                    <span class="ml-2 mt-1 font-weight-light small pointer" id="register-yubiko-key">' . $lang->get('register_new_yubiko_key').'</span>
277 276
                 </div>
278 277
             </div>
279 278
         </div>';
@@ -282,22 +281,22 @@  discard block
 block discarded – undo
282 281
 echo '
283 282
         <div class="row mt-5">
284 283
             <div class="col-12">
285
-                <button id="but_identify_user" class="btn btn-primary btn-block">' . $lang->get('log_in') . '</button>
284
+                <button id="but_identify_user" class="btn btn-primary btn-block">' . $lang->get('log_in').'</button>
286 285
                 
287 286
                 <!-- In case of upgrade, the user has to provide his One Time Code -->
288 287
                 <div class="card-body user-one-time-code-card-body hidden">
289
-                    <h5 class="login-box-msg">' . $lang->get('provide_personal_one_time_code') . '</h5>
288
+                    <h5 class="login-box-msg">' . $lang->get('provide_personal_one_time_code').'</h5>
290 289
 
291 290
                     <div class="input-group has-feedback mb-2 mt-4">
292 291
                         <div class="input-group-prepend">
293 292
                             <span class="input-group-text"><i class="fa-solid fa-unlock-alt"></i></span>
294 293
                         </div>
295
-                        <input type="password" id="user-one-time-code" class="form-control" placeholder="' . $lang->get('one_time_code') . '">
294
+                        <input type="password" id="user-one-time-code" class="form-control" placeholder="' . $lang->get('one_time_code').'">
296 295
                     </div>
297 296
 
298 297
                     <div class="row mb-3">
299 298
                         <div class="col-12">
300
-                            <button id="but_confirm_otc" class="btn btn-primary btn-block">' . $lang->get('confirm') . '</button>
299
+                            <button id="but_confirm_otc" class="btn btn-primary btn-block">' . $lang->get('confirm').'</button>
301 300
                         </div>
302 301
                     </div>
303 302
                 </div>
@@ -312,7 +311,7 @@  discard block
 block discarded – undo
312 311
         <hr class="mt-3 mb-3"/>
313 312
         <div class="row mb-2">
314 313
             <div class="col-12">
315
-                <button id="but_login_with_oauth2" class="btn btn-primary btn-block">' . $SETTINGS['oauth2_client_appname'] . '</button>
314
+                <button id="but_login_with_oauth2" class="btn btn-primary btn-block">' . $SETTINGS['oauth2_client_appname'].'</button>
316 315
             </div>
317 316
         </div>';
318 317
 }
@@ -325,10 +324,10 @@  discard block
 block discarded – undo
325 324
 // In case of password change
326 325
 echo '
327 326
     <div class="card-body confirm-password-card-body hidden">
328
-        <h5 class="login-box-msg">' . $lang->get('new_password_required') . '</h5>
327
+        <h5 class="login-box-msg">' . $lang->get('new_password_required').'</h5>
329 328
 
330 329
         <div class="alert alert-info">
331
-            <div class="text-center"><i class="icon fa fa-info"></i>' . $lang->get('password_strength') . '
330
+            <div class="text-center"><i class="icon fa fa-info"></i>' . $lang->get('password_strength').'
332 331
             <span id="confirm-password-level" class="ml-2 font-weight-bold"></span></div>
333 332
         </div>
334 333
 
@@ -338,20 +337,20 @@  discard block
 block discarded – undo
338 337
                     <div class="input-group-prepend">
339 338
                         <span class="input-group-text"><i class="fas fa-key"></i></span>
340 339
                     </div>
341
-                    <input type="password" id="current-user-password" class="form-control" placeholder="' . $lang->get('current_password') . '">
340
+                    <input type="password" id="current-user-password" class="form-control" placeholder="' . $lang->get('current_password').'">
342 341
                 </div>
343 342
             </div>
344 343
             <div class="input-group has-feedback mb-2 mt-4">
345 344
                 <div class="input-group-prepend">
346 345
                     <span class="input-group-text"><i class="fas fa-key"></i></span>
347 346
                 </div>
348
-                <input type="password" id="new-user-password" class="form-control" placeholder="' . $lang->get('index_new_pw') . '">
347
+                <input type="password" id="new-user-password" class="form-control" placeholder="' . $lang->get('index_new_pw').'">
349 348
             </div>
350 349
             <div class="input-group has-feedback mb-2">
351 350
                 <div class="input-group-prepend">
352 351
                     <span class="input-group-text"><i class="fas fa-key"></i></span>
353 352
                 </div>
354
-                <input type="password" id="new-user-password-confirm" class="form-control" placeholder="' . $lang->get('index_change_pw_confirmation') . '">
353
+                <input type="password" id="new-user-password-confirm" class="form-control" placeholder="' . $lang->get('index_change_pw_confirmation').'">
355 354
             </div>
356 355
             <div class="row mb-3">
357 356
                 <div class="col-md-12 offset-sm-4 text-center">
@@ -362,7 +361,7 @@  discard block
 block discarded – undo
362 361
             </div>
363 362
             <div class="row mb-3">
364 363
                 <div class="col-12">
365
-                    <button id="but_confirm_new_password" class="btn btn-primary btn-block">' . $lang->get('confirm') . '</button>
364
+                    <button id="but_confirm_new_password" class="btn btn-primary btn-block">' . $lang->get('confirm').'</button>
366 365
                 </div>
367 366
             </div>
368 367
         </div>
@@ -370,20 +369,20 @@  discard block
 block discarded – undo
370 369
 
371 370
     <div class="card-body hidden" id="card-user-treat-psk">
372 371
         <div class="alert alert-info">
373
-            <div class="text-center"><i class="icon fa fa-info"></i>' . $lang->get('user_has_psk_info') . '</div>
372
+            <div class="text-center"><i class="icon fa fa-info"></i>' . $lang->get('user_has_psk_info').'</div>
374 373
         </div>
375 374
         <div class="input-group has-feedback mb-2">
376 375
             <div class="input-group-prepend">
377 376
                 <span class="input-group-text"><i class="fas fa-key"></i></span>
378 377
             </div>
379
-            <input type="password" id="user-old-defuse-psk" class="form-control" placeholder="' . $lang->get('home_personal_saltkey') . '">
378
+            <input type="password" id="user-old-defuse-psk" class="form-control" placeholder="' . $lang->get('home_personal_saltkey').'">
380 379
         </div>
381 380
         <div class="row mb-3 mt-4">
382 381
             <div class="col-12">
383
-                <button id="but_confirm_defuse_psk" class="btn btn-primary btn-block">' . $lang->get('launch') . '</button>
382
+                <button id="but_confirm_defuse_psk" class="btn btn-primary btn-block">' . $lang->get('launch').'</button>
384 383
             </div>
385 384
             <div class="col-12 mt-3">
386
-                <button id="but_confirm_forgot_defuse_psk" class="btn btn-danger btn-block text-bold">' . $lang->get('i_cannot_remember') . '</button>
385
+                <button id="but_confirm_forgot_defuse_psk" class="btn btn-danger btn-block text-bold">' . $lang->get('i_cannot_remember').'</button>
387 386
             </div>
388 387
         </div>
389 388
     </div>
Please login to merge, or discard this patch.
sources/ldap.queries.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 ) {
81 81
     // Not allowed page
82 82
     $session->set('system-error_code', ERR_NOT_ALLOWED);
83
-    include $SETTINGS['cpassman_dir'] . '/error.php';
83
+    include $SETTINGS['cpassman_dir'].'/error.php';
84 84
     exit;
85 85
 }
86 86
 
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
                     $openLdapExtra = new OpenLdapExtra();
155 155
                     break;
156 156
                 default:
157
-                    throw new Exception("Unsupported LDAP type: " . $SETTINGS['ldap_type']);
157
+                    throw new Exception("Unsupported LDAP type: ".$SETTINGS['ldap_type']);
158 158
             }
159 159
         } catch (Exception $e) {
160 160
             if (defined('LOG_TO_SERVER') && LOG_TO_SERVER === true) {
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
             // 2- Get user info from AD
174 174
             // We want to isolate attribute ldap_user_attribute or mostly samAccountName
175 175
             $userADInfos = $ldapConnection->query()
176
-                ->where((isset($SETTINGS['ldap_user_attribute']) ===true && empty($SETTINGS['ldap_user_attribute']) === false) ? $SETTINGS['ldap_user_attribute'] : 'samaccountname', '=', $post_username)
176
+                ->where((isset($SETTINGS['ldap_user_attribute']) === true && empty($SETTINGS['ldap_user_attribute']) === false) ? $SETTINGS['ldap_user_attribute'] : 'samaccountname', '=', $post_username)
177 177
                 ->firstOrFail();
178 178
 
179 179
             // Is user enabled? Only ActiveDirectory
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
         } catch (\LdapRecord\Query\ObjectNotFoundException $e) {
195 195
             $error = $e->getDetailedError();
196 196
             if ($error && defined('LOG_TO_SERVER') && LOG_TO_SERVER === true) {
197
-                error_log('TEAMPASS Error - LDAP - '.$error->getErrorCode()." - ".$error->getErrorMessage(). " - ".$error->getDiagnosticMessage());
197
+                error_log('TEAMPASS Error - LDAP - '.$error->getErrorCode()." - ".$error->getErrorMessage()." - ".$error->getDiagnosticMessage());
198 198
             } 
199 199
             // deepcode ignore ServerLeak: No important data is sent and is encrypted before being sent
200 200
             echo prepareExchangedData(
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
             // For OpenLDAP and others, we use attribute dn
214 214
             $userAuthAttempt = $ldapConnection->auth()->attempt(
215 215
                 $SETTINGS['ldap_type'] === 'ActiveDirectory' ?
216
-                    $userADInfos['userprincipalname'][0] :  // refering to https://ldaprecord.com/docs/core/v2/authentication#basic-authentication
216
+                    $userADInfos['userprincipalname'][0] : // refering to https://ldaprecord.com/docs/core/v2/authentication#basic-authentication
217 217
                     $userADInfos['dn'],
218 218
                 $post_password
219 219
             );
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
         } catch (\LdapRecord\Query\ObjectNotFoundException $e) {
233 233
             $error = $e->getDetailedError();
234 234
             if ($error && defined('LOG_TO_SERVER') && LOG_TO_SERVER === true) {
235
-                error_log('TEAMPASS Error - LDAP - '.$error->getErrorCode()." - ".$error->getErrorMessage(). " - ".$error->getDiagnosticMessage());
235
+                error_log('TEAMPASS Error - LDAP - '.$error->getErrorCode()." - ".$error->getErrorMessage()." - ".$error->getDiagnosticMessage());
236 236
             }
237 237
             // deepcode ignore ServerLeak: No important data is sent and is encrypted before being sent
238 238
             echo prepareExchangedData(
Please login to merge, or discard this patch.
scripts/background_tasks___functions.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -102,11 +102,11 @@  discard block
 block discarded – undo
102 102
 function provideLog(string $message, array $SETTINGS)
103 103
 {
104 104
     if (defined('LOG_TO_SERVER') && LOG_TO_SERVER === true) {
105
-        error_log((string) date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], time()) . ' - '.$message);
105
+        error_log((string) date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], time()).' - '.$message);
106 106
     }
107 107
 }
108 108
 
109
-function performVisibleFoldersHtmlUpdate (int $user_id)
109
+function performVisibleFoldersHtmlUpdate(int $user_id)
110 110
 {
111 111
     $html = [];
112 112
 
@@ -116,10 +116,10 @@  discard block
 block discarded – undo
116 116
 
117 117
     // get current folders visible for user
118 118
     $cache_tree = DB::queryFirstRow(
119
-        'SELECT increment_id, data FROM ' . prefixTable('cache_tree') . ' WHERE user_id = %i',
119
+        'SELECT increment_id, data FROM '.prefixTable('cache_tree').' WHERE user_id = %i',
120 120
         $user_id
121 121
     );
122
-    $folders = json_decode($cache_tree['data'], true);//print_r($folders);
122
+    $folders = json_decode($cache_tree['data'], true); //print_r($folders);
123 123
     foreach ($folders as $folder) {
124 124
         $idFolder = (int) explode("li_", $folder['id'])[1];
125 125
 
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 
133 133
         // get folder info
134 134
         $folder = DB::queryFirstRow(
135
-            'SELECT title, parent_id, personal_folder FROM ' . prefixTable('nested_tree') . ' WHERE id = %i',
135
+            'SELECT title, parent_id, personal_folder FROM '.prefixTable('nested_tree').' WHERE id = %i',
136 136
             $idFolder
137 137
         );
138 138
 
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 function subTaskStatus($taskId)
168 168
 {
169 169
     $subTasks = DB::query(
170
-        'SELECT * FROM ' . prefixTable('background_subtasks') . ' WHERE task_id = %i',
170
+        'SELECT * FROM '.prefixTable('background_subtasks').' WHERE task_id = %i',
171 171
         $taskId
172 172
     );
173 173
 
Please login to merge, or discard this patch.
pages/admin.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('admin') === false) {
69 69
     // Not allowed page
70 70
     $session->set('system-error_code', ERR_NOT_ALLOWED);
71
-    include $SETTINGS['cpassman_dir'] . '/error.php';
71
+    include $SETTINGS['cpassman_dir'].'/error.php';
72 72
     exit;
73 73
 }
74 74
 
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
     // Get last cron execution timestamp
200 200
     DB::query(
201 201
         'SELECT valeur
202
-        FROM ' . prefixTable('misc') . '
202
+        FROM ' . prefixTable('misc').'
203 203
         WHERE type = %s AND intitule = %s and valeur >= %d',
204 204
         'admin',
205 205
         'last_cron_exec',
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
                     <div class="card-body">
271 271
                         <?php
272 272
                         // Display information about server
273
-                        $dbSize = DB::queryFirstRow("SELECT ROUND(SUM(data_length + index_length) / 1024 / 1024, 2) AS 'size' FROM information_schema.TABLES WHERE table_schema = '" . DB_NAME . "'");
273
+                        $dbSize = DB::queryFirstRow("SELECT ROUND(SUM(data_length + index_length) / 1024 / 1024, 2) AS 'size' FROM information_schema.TABLES WHERE table_schema = '".DB_NAME."'");
274 274
 
275 275
                         // Get OS
276 276
                         $uname = php_uname('s');
@@ -326,17 +326,17 @@  discard block
 block discarded – undo
326 326
                         }
327 327
 
328 328
                         echo 
329
-                        '<p>' . $os.
329
+                        '<p>'.$os.
330 330
                             '<br><span class="ml-4"></span>'.
331 331
                         '</p>'.
332 332
                         $internetAccess.
333
-                        '<p><i class="fa-brands fa-php mr-2"></i>PHP version: ' . phpversion().
333
+                        '<p><i class="fa-brands fa-php mr-2"></i>PHP version: '.phpversion().
334 334
                             '<br><span class="ml-4">Memory limit: '.(ini_get('memory_limit')).'</span>'.
335 335
                             '<br><span class="ml-4">Memory usage: '.formatSizeUnits(memory_get_usage()).'</span>'.
336 336
                             '<br><span class="ml-4">Maximum time execution: '.ini_get('max_execution_time').'</span>'.
337 337
                             '<br><span class="ml-4">Maximum file size upload: '.ini_get('upload_max_filesize').'</span>'.
338 338
                         '</p>'.
339
-                        '<p><i class="fa-solid fa-server mr-2"></i>Server version: ' . DB::serverVersion().
339
+                        '<p><i class="fa-solid fa-server mr-2"></i>Server version: '.DB::serverVersion().
340 340
                             '<br><span class="ml-4">Database size: '.($dbSize['size']).'MB</span>'.
341 341
                         '</p>';
342 342
 
@@ -344,11 +344,11 @@  discard block
 block discarded – undo
344 344
                         $serverTime = localtime(time(), true);
345 345
                         echo '<div class="row">'.
346 346
                             '<div class="col-6"><i class="fa-solid fa-clock mr-2"></i>Server time:</div>'.
347
-                            '<div class="col-6"><span class="badge badge-info">' . 
348
-                            str_pad(strval($serverTime['tm_hour']), 2, "0", STR_PAD_LEFT) . ':' .
349
-                            str_pad(strval($serverTime['tm_min']), 2, "0", STR_PAD_LEFT) . ':' .
350
-                            str_pad(strval($serverTime['tm_sec']), 2, "0", STR_PAD_LEFT) .
351
-                            '</span></div>' .
347
+                            '<div class="col-6"><span class="badge badge-info">'. 
348
+                            str_pad(strval($serverTime['tm_hour']), 2, "0", STR_PAD_LEFT).':'.
349
+                            str_pad(strval($serverTime['tm_min']), 2, "0", STR_PAD_LEFT).':'.
350
+                            str_pad(strval($serverTime['tm_sec']), 2, "0", STR_PAD_LEFT).
351
+                            '</span></div>'.
352 352
                         '</div>'.
353 353
                         '<div class="row">'.
354 354
                             '<div class="col-6"><span class="ml-4">Timezone:</span></div>'.
Please login to merge, or discard this patch.
sources/oauth.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 use TeampassClasses\OAuth2Controller\OAuth2Controller;
3 3
 use TeampassClasses\SessionManager\SessionManager;
4 4
 
5
-require_once __DIR__. '/../includes/config/include.php';
5
+require_once __DIR__.'/../includes/config/include.php';
6 6
 require_once __DIR__.'/../sources/main.functions.php';
7 7
 
8 8
 // init
Please login to merge, or discard this patch.
pages/2fa.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('mfa') === false) {
70 70
     // Not allowed page
71 71
     $session->set('system-error_code', ERR_NOT_ALLOWED);
72
-    include $SETTINGS['cpassman_dir'] . '/error.php';
72
+    include $SETTINGS['cpassman_dir'].'/error.php';
73 73
     exit;
74 74
 }
75 75
 
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
                                     $roles = getRolesTitles();
142 142
                                     foreach ($roles as $role) {
143 143
                                         echo '
144
-                                    <option value="' . $role['id'] . '"', in_array($role['id'], $arrRolesMFA) === true ? ' selected' : '', '>' . addslashes($role['title']) . '</option>';
144
+                                    <option value="' . $role['id'].'"', in_array($role['id'], $arrRolesMFA) === true ? ' selected' : '', '>'.addslashes($role['title']).'</option>';
145 145
                                     }
146 146
                                     ?>
147 147
                                 </select>
Please login to merge, or discard this patch.
self-unlock.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 use Symfony\Component\HttpFoundation\Request as SymfonyRequest;
34 34
 
35 35
 // Load functions
36
-require_once __DIR__. '/includes/config/include.php';
36
+require_once __DIR__.'/includes/config/include.php';
37 37
 require_once __DIR__.'/sources/main.functions.php';
38 38
 
39 39
 // init
@@ -53,10 +53,10 @@  discard block
 block discarded – undo
53 53
 // Check for existing lock
54 54
 $result = DB::queryFirstField(
55 55
     'SELECT 1
56
-     FROM ' . prefixTable('auth_failures') . '
56
+     FROM ' . prefixTable('auth_failures').'
57 57
      WHERE unlock_at = (
58 58
         SELECT MAX(unlock_at)
59
-        FROM ' . prefixTable('auth_failures') . '
59
+        FROM ' . prefixTable('auth_failures').'
60 60
         WHERE unlock_at > %s
61 61
         AND source = %s AND value = %s)
62 62
      AND unlock_code = %s',
Please login to merge, or discard this patch.
sources/upload.files.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 ) {
77 77
     // Not allowed page
78 78
     $session->set('system-error_code', ERR_NOT_ALLOWED);
79
-    include $SETTINGS['cpassman_dir'] . '/error.php';
79
+    include $SETTINGS['cpassman_dir'].'/error.php';
80 80
     exit;
81 81
 }
82 82
 
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
     } else {
131 131
         // check if token is expired
132 132
         $data = DB::queryFirstRow(
133
-            'SELECT end_timestamp FROM ' . prefixTable('tokens') . ' WHERE user_id = %i AND token = %s',
133
+            'SELECT end_timestamp FROM '.prefixTable('tokens').' WHERE user_id = %i AND token = %s',
134 134
             $session->get('user-id'),
135 135
             $post_user_token
136 136
         );
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 
155 155
 // HTTP headers for no cache etc
156 156
 header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
157
-header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
157
+header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
158 158
 header('Cache-Control: no-store, no-cache, must-revalidate');
159 159
 header('Cache-Control: post-check=0, pre-check=0', false);
160 160
 
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
     }
167 167
 
168 168
     // Set directory used to store file
169
-    $targetDir = realpath($SETTINGS['cpassman_dir'] . '/includes/avatars');
169
+    $targetDir = realpath($SETTINGS['cpassman_dir'].'/includes/avatars');
170 170
 } else {
171 171
     $targetDir = realpath($SETTINGS['path_to_files_folder']);
172 172
 }
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
     $file_name = preg_replace('/[^a-zA-Z0-9-_\.]/', '', strtolower(basename($file->getClientOriginalName())));
220 220
     
221 221
     if (strlen($file_name) == 0 || strlen($file_name) > $MAX_FILENAME_LENGTH) {
222
-        error_log('Invalid file name: ' . $file_name . '.');
222
+        error_log('Invalid file name: '.$file_name.'.');
223 223
         echo handleUploadError('Invalid file name provided.');
224 224
         return false;
225 225
     }
@@ -233,13 +233,13 @@  discard block
 block discarded – undo
233 233
             $ext = strtolower($ext);
234 234
         } else {
235 235
             // Case where the file extension is not a string
236
-            error_log('Invalid file name: ' . $file_name . '.');
236
+            error_log('Invalid file name: '.$file_name.'.');
237 237
             echo handleUploadError('Invalid file extension.');
238 238
             return false;
239 239
         }
240 240
     } else {
241 241
         // Case where the file name is not a string
242
-        error_log('Invalid file name: ' . $file_name . '.');
242
+        error_log('Invalid file name: '.$file_name.'.');
243 243
         echo handleUploadError('Invalid file.');
244 244
         return false;
245 245
     }
@@ -247,8 +247,8 @@  discard block
 block discarded – undo
247 247
     // Validate against a list of allowed extensions
248 248
     $allowed_extensions = explode(
249 249
         ',',
250
-        $SETTINGS['upload_docext'] . ',' . $SETTINGS['upload_imagesext'] .
251
-            ',' . $SETTINGS['upload_pkgext'] . ',' . $SETTINGS['upload_otherext']
250
+        $SETTINGS['upload_docext'].','.$SETTINGS['upload_imagesext'].
251
+            ','.$SETTINGS['upload_pkgext'].','.$SETTINGS['upload_otherext']
252 252
     );
253 253
     if (
254 254
         !in_array($ext, $allowed_extensions) 
@@ -267,25 +267,25 @@  discard block
 block discarded – undo
267 267
 
268 268
 // is destination folder writable
269 269
 if (is_writable($SETTINGS['path_to_files_folder']) === false) {
270
-    echo handleUploadError('Not enough permissions on folder ' . $SETTINGS['path_to_files_folder'] . '.');
270
+    echo handleUploadError('Not enough permissions on folder '.$SETTINGS['path_to_files_folder'].'.');
271 271
     return false;
272 272
 }
273 273
 
274 274
 // Make sure the fileName is unique but only if chunking is disabled
275
-if ($chunks < 2 && file_exists($targetDir . DIRECTORY_SEPARATOR . $fileName)) {
275
+if ($chunks < 2 && file_exists($targetDir.DIRECTORY_SEPARATOR.$fileName)) {
276 276
     // $ext is guaranteed to be a string due to prior checks
277 277
     $fileNameA = substr($fileName, 0, strlen(/** @scrutinizer ignore-type */$ext));
278 278
     $fileNameB = substr($fileName, strlen(/** @scrutinizer ignore-type */$ext));
279 279
 
280 280
     $count = 1;
281
-    while (file_exists($targetDir . DIRECTORY_SEPARATOR . $fileNameA . '_' . $count . $fileNameB)) {
281
+    while (file_exists($targetDir.DIRECTORY_SEPARATOR.$fileNameA.'_'.$count.$fileNameB)) {
282 282
         ++$count;
283 283
     }
284 284
 
285
-    $fileName = $fileNameA . '_' . $count . $fileNameB;
285
+    $fileName = $fileNameA.'_'.$count.$fileNameB;
286 286
 }
287 287
 
288
-$filePath = $targetDir . DIRECTORY_SEPARATOR . $fileName;
288
+$filePath = $targetDir.DIRECTORY_SEPARATOR.$fileName;
289 289
 
290 290
 // Create target dir
291 291
 if (!file_exists($targetDir)) {
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
 // Remove old temp files
300 300
 if ($cleanupTargetDir && is_dir($targetDir) && ($dir = opendir($targetDir))) {
301 301
     while (($fileClean = readdir($dir)) !== false) {
302
-        $tmpfilePath = $targetDir . DIRECTORY_SEPARATOR . $fileClean;
302
+        $tmpfilePath = $targetDir.DIRECTORY_SEPARATOR.$fileClean;
303 303
 
304 304
         // Remove temp file if it is older than the max age and is not the current file
305 305
         if (
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
 
314 314
     closedir($dir);
315 315
 } else {
316
-    echo handleUploadError('Not enough permissions on folder ' . $SETTINGS['path_to_files_folder'] . '.');
316
+    echo handleUploadError('Not enough permissions on folder '.$SETTINGS['path_to_files_folder'].'.');
317 317
     return false;
318 318
 }
319 319
 
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
 
354 354
                 // Safe destination folder
355 355
                 $uploadDir = realpath($SETTINGS['path_to_upload_folder']);
356
-                $destinationPath = $uploadDir . DIRECTORY_SEPARATOR . $fileName;
356
+                $destinationPath = $uploadDir.DIRECTORY_SEPARATOR.$fileName;
357 357
                 
358 358
                 if (move_uploaded_file($tmpFilePath, $destinationPath)) {
359 359
                     // Open the moved file in read mode
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
             return false;
395 395
         }
396 396
     } else {
397
-        echo handleUploadError('Failed to move uploaded file to ' . $SETTINGS['path_to_files_folder'] . '.');
397
+        echo handleUploadError('Failed to move uploaded file to '.$SETTINGS['path_to_files_folder'].'.');
398 398
         return false;
399 399
     }
400 400
 } else {
@@ -410,14 +410,14 @@  discard block
 block discarded – undo
410 410
                 fwrite($out, $buff);
411 411
             }
412 412
         } else {
413
-            echo handleUploadError('Failed to open input stream ' . $SETTINGS['path_to_files_folder'] . '.');
413
+            echo handleUploadError('Failed to open input stream '.$SETTINGS['path_to_files_folder'].'.');
414 414
             return false;
415 415
         }
416 416
 
417 417
         fclose($in);
418 418
         fclose($out);
419 419
     } else {
420
-        echo handleUploadError('Failed to open output stream ' . $SETTINGS['path_to_files_folder'] . '.');
420
+        echo handleUploadError('Failed to open output stream '.$SETTINGS['path_to_files_folder'].'.');
421 421
         return false;
422 422
     }
423 423
 }
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
 ) {
451 451
     rename(
452 452
         $filePath,
453
-        $targetDir . DIRECTORY_SEPARATOR . $newFileName
453
+        $targetDir.DIRECTORY_SEPARATOR.$newFileName
454 454
     );
455 455
 
456 456
     // Add in DB
@@ -479,7 +479,7 @@  discard block
 block discarded – undo
479 479
 ) {
480 480
     rename(
481 481
         $filePath,
482
-        $targetDir . DIRECTORY_SEPARATOR . $newFileName
482
+        $targetDir.DIRECTORY_SEPARATOR.$newFileName
483 483
     );
484 484
 
485 485
     // Add in DB
@@ -512,13 +512,13 @@  discard block
 block discarded – undo
512 512
     // rename the file
513 513
     rename(
514 514
         $filePath,
515
-        $targetDir . DIRECTORY_SEPARATOR . $newFileName . '.' . $ext
515
+        $targetDir.DIRECTORY_SEPARATOR.$newFileName.'.'.$ext
516 516
     );
517 517
 
518 518
     // make thumbnail
519 519
     $ret = makeThumbnail(
520
-        $targetDir . DIRECTORY_SEPARATOR . $newFileName . '.' . $ext,
521
-        $targetDir . DIRECTORY_SEPARATOR . $newFileName . '_thumb' . '.' . $ext,
520
+        $targetDir.DIRECTORY_SEPARATOR.$newFileName.'.'.$ext,
521
+        $targetDir.DIRECTORY_SEPARATOR.$newFileName.'_thumb'.'.'.$ext,
522 522
         40
523 523
     );
524 524
 
@@ -530,21 +530,21 @@  discard block
 block discarded – undo
530 530
     }
531 531
 
532 532
     // get current avatar and delete it
533
-    $data = DB::queryFirstRow('SELECT avatar, avatar_thumb FROM ' . prefixTable('users') . ' WHERE id=%i', $session->get('user-id'));
534
-    fileDelete($targetDir . DIRECTORY_SEPARATOR . $data['avatar'], $SETTINGS);
535
-    fileDelete($targetDir . DIRECTORY_SEPARATOR . $data['avatar_thumb'], $SETTINGS);
533
+    $data = DB::queryFirstRow('SELECT avatar, avatar_thumb FROM '.prefixTable('users').' WHERE id=%i', $session->get('user-id'));
534
+    fileDelete($targetDir.DIRECTORY_SEPARATOR.$data['avatar'], $SETTINGS);
535
+    fileDelete($targetDir.DIRECTORY_SEPARATOR.$data['avatar_thumb'], $SETTINGS);
536 536
 
537 537
     // store in DB the new avatar
538 538
     DB::query(
539
-        'UPDATE ' . prefixTable('users') . "
540
-        SET avatar='" . $newFileName . '.' . $ext . "', avatar_thumb='" . $newFileName . '_thumb' . '.' . $ext . "'
539
+        'UPDATE '.prefixTable('users')."
540
+        SET avatar='" . $newFileName.'.'.$ext."', avatar_thumb='".$newFileName.'_thumb'.'.'.$ext."'
541 541
         WHERE id=%i",
542 542
         $session->get('user-id')
543 543
     );
544 544
 
545 545
     // store in session
546
-    $session->set('user-avatar', $newFileName . '.' . $ext);
547
-    $session->set('user-avatar_thumb', $newFileName . '_thumb' . '.' . $ext);
546
+    $session->set('user-avatar', $newFileName.'.'.$ext);
547
+    $session->set('user-avatar_thumb', $newFileName.'_thumb'.'.'.$ext);
548 548
 
549 549
     // return info
550 550
     echo prepareExchangedData(
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
 ) {
564 564
     rename(
565 565
         $filePath,
566
-        $targetDir . DIRECTORY_SEPARATOR . $newFileName
566
+        $targetDir.DIRECTORY_SEPARATOR.$newFileName
567 567
     );
568 568
 
569 569
     // Add in DB
Please login to merge, or discard this patch.
pages/profile.js.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('profile') === false) {
74 74
     // Not allowed page
75 75
     $session->set('system-error_code', ERR_NOT_ALLOWED);
76
-    include $SETTINGS['cpassman_dir'] . '/error.php';
76
+    include $SETTINGS['cpassman_dir'].'/error.php';
77 77
     exit;
78 78
 }
79 79
 ?>
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     })
98 98
 
99 99
     // Select user properties
100
-    $('#profile-user-language option[value=<?php echo $session->get('user-language');?>').attr('selected','selected');
100
+    $('#profile-user-language option[value=<?php echo $session->get('user-language'); ?>').attr('selected','selected');
101 101
 
102 102
 
103 103
     // AVATAR IMPORT
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 
296 296
                     // reload page in case of language change
297 297
                     if ($('#profile-user-language').val()
298
-                        && $('#profile-user-language').val().toLowerCase() !== '<?php echo $session->get('user-language');?>') {
298
+                        && $('#profile-user-language').val().toLowerCase() !== '<?php echo $session->get('user-language'); ?>') {
299 299
                         // prepare reload
300 300
                         $(this).delay(3000).queue(function() {
301 301
                             document.location.href = "index.php?page=profile";
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
                         // Inform user
307 307
                         toastr.remove();
308 308
                         toastr.info(
309
-                            '<?php echo $lang->get('alert_page_will_reload') . ' ... ' . $lang->get('please_wait'); ?>',
309
+                            '<?php echo $lang->get('alert_page_will_reload').' ... '.$lang->get('please_wait'); ?>',
310 310
                             '', {
311 311
                                 timeOut: 3000,
312 312
                                 progressBar: true
@@ -410,27 +410,27 @@  discard block
 block discarded – undo
410 410
         "defaultText": "<?php echo $lang->get('index_pw_level_txt'); ?>",
411 411
         "ratings": [
412 412
             {
413
-                "minScore": <?php echo TP_PW_STRENGTH_1;?>,
413
+                "minScore": <?php echo TP_PW_STRENGTH_1; ?>,
414 414
                 "className": "meterWarn",
415 415
                 "text": "<?php echo $lang->get('complex_level1'); ?>"
416 416
             },
417 417
             {
418
-                "minScore": <?php echo TP_PW_STRENGTH_2;?>,
418
+                "minScore": <?php echo TP_PW_STRENGTH_2; ?>,
419 419
                 "className": "meterWarn",
420 420
                 "text": "<?php echo $lang->get('complex_level2'); ?>"
421 421
             },
422 422
             {
423
-                "minScore": <?php echo TP_PW_STRENGTH_3;?>,
423
+                "minScore": <?php echo TP_PW_STRENGTH_3; ?>,
424 424
                 "className": "meterGood",
425 425
                 "text": "<?php echo $lang->get('complex_level3'); ?>"
426 426
             },
427 427
             {
428
-                "minScore": <?php echo TP_PW_STRENGTH_4;?>,
428
+                "minScore": <?php echo TP_PW_STRENGTH_4; ?>,
429 429
                 "className": "meterGood",
430 430
                 "text": "<?php echo $lang->get('complex_level4'); ?>"
431 431
             },
432 432
             {
433
-                "minScore": <?php echo TP_PW_STRENGTH_5;?>,
433
+                "minScore": <?php echo TP_PW_STRENGTH_5; ?>,
434 434
                 "className": "meterExcel",
435 435
                 "text": "<?php echo $lang->get('complex_level5'); ?>"
436 436
             }
@@ -523,27 +523,27 @@  discard block
 block discarded – undo
523 523
         "defaultText": "<?php echo $lang->get('index_pw_level_txt'); ?>",
524 524
         "ratings": [
525 525
             {
526
-                "minScore": <?php echo TP_PW_STRENGTH_1;?>,
526
+                "minScore": <?php echo TP_PW_STRENGTH_1; ?>,
527 527
                 "className": "meterWarn",
528 528
                 "text": "<?php echo $lang->get('complex_level1'); ?>"
529 529
             },
530 530
             {
531
-                "minScore": <?php echo TP_PW_STRENGTH_2;?>,
531
+                "minScore": <?php echo TP_PW_STRENGTH_2; ?>,
532 532
                 "className": "meterWarn",
533 533
                 "text": "<?php echo $lang->get('complex_level2'); ?>"
534 534
             },
535 535
             {
536
-                "minScore": <?php echo TP_PW_STRENGTH_3;?>,
536
+                "minScore": <?php echo TP_PW_STRENGTH_3; ?>,
537 537
                 "className": "meterGood",
538 538
                 "text": "<?php echo $lang->get('complex_level3'); ?>"
539 539
             },
540 540
             {
541
-                "minScore": <?php echo TP_PW_STRENGTH_4;?>,
541
+                "minScore": <?php echo TP_PW_STRENGTH_4; ?>,
542 542
                 "className": "meterGood",
543 543
                 "text": "<?php echo $lang->get('complex_level4'); ?>"
544 544
             },
545 545
             {
546
-                "minScore": <?php echo TP_PW_STRENGTH_5;?>,
546
+                "minScore": <?php echo TP_PW_STRENGTH_5; ?>,
547 547
                 "className": "meterExcel",
548 548
                 "text": "<?php echo $lang->get('complex_level5'); ?>"
549 549
             }
@@ -559,7 +559,7 @@  discard block
 block discarded – undo
559 559
         }
560 560
     });
561 561
 
562
-    $('#profile-keys_download-date').text('<?php echo null === $session->get('user-keys_recovery_time') ? $lang->get('none') : date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) $session->get('user-keys_recovery_time')); ?>');
562
+    $('#profile-keys_download-date').text('<?php echo null === $session->get('user-keys_recovery_time') ? $lang->get('none') : date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) $session->get('user-keys_recovery_time')); ?>');
563 563
 
564 564
     $("#open-dialog-keys-download").on('click', function(event) {
565 565
         event.preventDefault();
Please login to merge, or discard this patch.