Changes in admin/auth.php [27:3bde88e1fff6:42:aba6d23140fc]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/auth.php
r27 r42 32 32 $login_data = !empty($_POST['login_data']) ? $_POST['login_data'] : null; 33 33 $recover = $core->auth->allowPassChange() && !empty($_REQUEST['recover']); 34 $safe_mode = !empty($_REQUEST['safe_mode']); 34 35 $akey = $core->auth->allowPassChange() && !empty($_GET['akey']) ? $_GET['akey'] : null; 35 36 $user_id = $user_pwd = $user_key = $user_email = null; … … 205 206 } 206 207 } 208 elseif ($check_user && !empty($_POST['safe_mode']) && !$core->auth->isSuperAdmin()) 209 { 210 $err = __('Safe Mode can only be used for super administrators.'); 211 } 207 212 elseif ($check_user) 208 213 { … … 213 218 if (!empty($_POST['blog'])) { 214 219 $_SESSION['sess_blog_id'] = $_POST['blog']; 220 } 221 222 if (!empty($_POST['safe_mode']) && $core->auth->isSuperAdmin()) { 223 $_SESSION['sess_safe_mode'] = true; 215 224 } 216 225 … … 284 293 return true; 285 294 }; 295 296 $('a#safe_mode_link_help').click(function() { 297 $(this).parent().next().slideToggle(); 298 }); 286 299 }); 287 300 //]]> … … 346 359 echo 347 360 '<fieldset>'; 361 if ($safe_mode) { 362 echo '<legend>'.__('Safe mode login').'</legend>'; 363 } 348 364 echo 349 365 '<p><label for="user_id">'.__('Username:').' '. … … 353 369 form::password(array('user_pwd','user_pwd'),20,255,'','',2).'</label></p>'. 354 370 355 '<p><label class="classic">'.356 371 '<p><label for="user_remember" class="classic">'. 357 372 form::checkbox(array('user_remember','user_remember'),1,'','',3).' '. … … 363 378 echo form::hidden('blog',html::escapeHTML($_REQUEST['blog'])); 364 379 } 380 if($safe_mode) { 381 echo form::hidden('safe_mode',1); 382 } 365 383 366 384 echo … … 368 386 369 387 '<p>'.__('You must accept cookies in order to use the private area.').'</p>'; 388 389 if ($safe_mode) { 390 echo 391 '<p><a href="auth.php" id="normal_mode_link">'.__('Get back to normal authentication').'</a></p>'; 392 } else { 393 echo 394 '<p><a href="auth.php?safe_mode=1" id="safe_mode_link">'.__('I want to log in in safe mode').'</a></p>'. 395 '<p class="form-note"><a href="#" id="safe_mode_link_help">'.__('What is dotclear safe mode ?').'</a></p>'. 396 '<p id="safe_mode_help"><em>'. 397 __('This mode allows you to login without activating any of your plugins. This may be useful to solve compatibility problems').' '. 398 __('Disable or delete any plugin suspected to cause trouble, then log out and log back in normally.'). 399 '</em></p>'; 400 } 370 401 371 402 if ($core->auth->allowPassChange()) {
Note: See TracChangeset
for help on using the changeset viewer.