Dotclear


Ignore:
Timestamp:
04/29/11 10:08:59 (14 years ago)
Author:
kozlika
Branch:
userprefs
Children:
48:0891631a2623, 52:9a388f5e4e3a
Parents:
45:282249d3b55d (diff), 43:bd53e32fe98b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/auth.php

    r45 r46  
    3232$login_data = !empty($_POST['login_data']) ? $_POST['login_data'] : null; 
    3333$recover = $core->auth->allowPassChange() && !empty($_REQUEST['recover']); 
     34$safe_mode = !empty($_REQUEST['safe_mode']); 
    3435$akey = $core->auth->allowPassChange() && !empty($_GET['akey']) ? $_GET['akey'] : null; 
    3536$user_id = $user_pwd = $user_key = $user_email = null; 
     
    205206          } 
    206207     } 
     208     elseif ($check_user && !empty($_POST['safe_mode']) && !$core->auth->isSuperAdmin())  
     209     { 
     210          $err = __('Safe Mode can only be used for super administrators.'); 
     211     } 
    207212     elseif ($check_user) 
    208213     { 
     
    213218          if (!empty($_POST['blog'])) { 
    214219               $_SESSION['sess_blog_id'] = $_POST['blog']; 
     220          } 
     221           
     222          if (!empty($_POST['safe_mode']) && $core->auth->isSuperAdmin()) { 
     223               $_SESSION['sess_safe_mode'] = true; 
    215224          } 
    216225           
     
    284293      return true; 
    285294    }; 
     295     
     296    $('a#safe_mode_link_help').click(function() { 
     297      $(this).parent().next().slideToggle(); 
     298    }); 
    286299  }); 
    287300  //]]> 
     
    346359          echo 
    347360          '<fieldset>'; 
     361          if ($safe_mode) { 
     362               echo '<legend>'.__('Safe mode login').'</legend>'; 
     363          } 
    348364          echo 
    349365          '<p><label for="user_id">'.__('Username:').' '. 
     
    362378               echo form::hidden('blog',html::escapeHTML($_REQUEST['blog'])); 
    363379          } 
     380          if($safe_mode) { 
     381               echo form::hidden('safe_mode',1); 
     382          } 
    364383           
    365384          echo 
     
    367386           
    368387          '<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').'&nbsp;'. 
     398                    __('Disable or delete any plugin suspected to cause trouble, then log out and log back in normally.'). 
     399               '</em></p>'; 
     400          } 
    369401           
    370402          if ($core->auth->allowPassChange()) { 
Note: See TracChangeset for help on using the changeset viewer.

Sites map