Dotclear

Changeset 46:36f4421937ed for admin


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

Location:
admin
Files:
3 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()) { 
  • admin/style/default.css

    r42 r46  
    10941094     font-size: 1.3em; 
    10951095} 
    1096 /* à supprimer quand tous les formulaires auront été corrigés */ 
    1097 label.required:before { 
    1098      content: '* '; 
    1099      color: #c00; 
    1100 } 
    1101  
     1096label.inline { 
     1097     display: inline; 
     1098} 
    11021099p.field { 
    11031100     position: relative; 
  • admin/style/default.css

    r45 r46  
    11521152     width: 100%; 
    11531153} 
     1154 
     1155#login-screen #safe_mode_help { 
     1156     display : none; 
     1157     margin : 0 0 1em 0; 
     1158     padding: 5px 10px 5px 30px; 
     1159     background: #fbfbfb url(msg-std.png) no-repeat 5px 5px; 
     1160     border: 1px solid #999; 
     1161     -moz-border-radius: 4px; 
     1162     -webkit-border-radius: 4px; 
     1163} 
     1164 
    11541165 
    11551166/* ------------------  Tous les boutons -------------------- */ 
Note: See TracChangeset for help on using the changeset viewer.

Sites map