Ignore:
Timestamp:
Oct 3, 2004, 1:12:50 AM (20 years ago)
Author:
z0rglub
Message:
  • deletion of session_time and session_id_size as config parameter
  • new feature : "remember me" creates a long time cookie
  • possibility to set the default authentication method to URI or cookie
  • really technical parameters (session identifier size, session duration) are set in the config file and not in database + configuration.php
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/configuration.php

    r528 r541  
    121121      break;
    122122    }
    123     case 'session' :
    124     {
    125       // session_id size must be an integer between 4 and 50
    126       if (!preg_match($int_pattern, $_POST['session_id_size'])
    127           or $_POST['session_id_size'] < 4
    128           or $_POST['session_id_size'] > 50)
    129       {
    130         array_push($errors, $lang['conf_session_size_error']);
    131       }
    132       // session_time must be an integer between 5 and 60, in minutes
    133       if (!preg_match($int_pattern, $_POST['session_time'])
    134           or $_POST['session_time'] < 5
    135           or $_POST['session_time'] > 60)
    136       {
    137         array_push($errors, $lang['conf_session_time_error']);
    138       }
    139       break;
    140     }
    141123  }
    142124 
     
    173155    'L_SUBMIT'=>$lang['submit'],
    174156    'L_RESET'=>$lang['reset'],
     157    'L_URI'=>$lang['URI'],
     158    'L_COOKIE'=>$lang['cookie'],
    175159   
    176160    'F_ACTION'=>add_session_id($action)
     
    321305  case 'session' :
    322306  {
    323     $cookie_yes = ($conf['upload_available']=='true')?'checked="checked"':'';
    324     $cookie_no = ($conf['upload_available']=='false')?'checked="checked"':'';
     307    $auth_method_URI = ($conf['auth_method']=='URI')?'checked="checked"':'';
     308    $auth_method_cookie =
     309      ($conf['auth_method']=='cookie')?'checked="checked"':'';
     310    $authorize_remembering_yes =
     311      ($conf['authorize_remembering']=='true')?'checked="checked"':'';
     312    $authorize_remembering_no =
     313      ($conf['authorize_remembering']=='false')?'checked="checked"':'';
    325314     
    326315    $template->assign_block_vars(
     
    328317      array(
    329318        'L_CONF_TITLE'=>$lang['conf_session_title'],
    330         'L_CONF_COOKIE'=>$lang['conf_cookies'],
    331         'L_CONF_COOKIE_INFO'=>$lang['conf_cookies_info'],
    332         'L_SESSION_LENGTH'=>$lang['conf_session_time'],
    333         'L_SESSION_LENGTH_INFO'=>$lang['conf_session_time_info'],
    334         'L_SESSION_ID_SIZE'=>$lang['conf_session_size'],
    335         'L_SESSION_ID_SIZE_INFO'=>$lang['conf_session_size_info'],
    336          
    337         'SESSION_LENGTH'=>$conf['session_time'],
    338         'SESSION_ID_SIZE'=>$conf['session_id_size'],
    339         'COOKIE_YES'=>$cookie_yes,
    340         'COOKIE_NO'=>$cookie_no
     319        'L_CONF_AUTH_METHOD'=>$lang['conf_auth_method'],
     320        'L_CONF_AUTH_METHOD_INFO'=>$lang['conf_auth_method_info'],
     321        'L_CONF_AUTHORIZE_REMEMBERING'=>$lang['conf_authorize_remembering'],
     322        'L_CONF_AUTHORIZE_REMEMBERING_INFO' =>
     323        $lang['conf_authorize_remembering_info'],
     324
     325        'AUTH_METHOD_URI'=>$auth_method_URI,
     326        'AUTH_METHOD_COOKIE'=>$auth_method_cookie,
     327        'AUTHORIZE_REMEMBERING_YES'=>$authorize_remembering_yes,
     328        'AUTHORIZE_REMEMBERING_NO'=>$authorize_remembering_no
    341329        ));
    342330    break;
Note: See TracChangeset for help on using the changeset viewer.