aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorz0rglub <z0rglub@piwigo.org>2004-10-02 23:12:50 +0000
committerz0rglub <z0rglub@piwigo.org>2004-10-02 23:12:50 +0000
commit3c8309a7e621ede168cf7f6dfd8c8d55144525ea (patch)
tree8b13443d84b3eae9ddead399bea404a981b2bc60 /admin
parentda836ea95fce9a8b5711366253832d298e3c4a6e (diff)
- 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 git-svn-id: http://piwigo.org/svn/trunk@541 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin')
-rw-r--r--admin/configuration.php50
1 files changed, 19 insertions, 31 deletions
diff --git a/admin/configuration.php b/admin/configuration.php
index 3b15c0771..1c8c206f0 100644
--- a/admin/configuration.php
+++ b/admin/configuration.php
@@ -120,24 +120,6 @@ if (isset($_POST['submit']))
}
break;
}
- case 'session' :
- {
- // session_id size must be an integer between 4 and 50
- if (!preg_match($int_pattern, $_POST['session_id_size'])
- or $_POST['session_id_size'] < 4
- or $_POST['session_id_size'] > 50)
- {
- array_push($errors, $lang['conf_session_size_error']);
- }
- // session_time must be an integer between 5 and 60, in minutes
- if (!preg_match($int_pattern, $_POST['session_time'])
- or $_POST['session_time'] < 5
- or $_POST['session_time'] > 60)
- {
- array_push($errors, $lang['conf_session_time_error']);
- }
- break;
- }
}
// updating configuration if no error found
@@ -172,6 +154,8 @@ $template->assign_vars(
'L_NO'=>$lang['no'],
'L_SUBMIT'=>$lang['submit'],
'L_RESET'=>$lang['reset'],
+ 'L_URI'=>$lang['URI'],
+ 'L_COOKIE'=>$lang['cookie'],
'F_ACTION'=>add_session_id($action)
));
@@ -320,24 +304,28 @@ switch ($page['section'])
}
case 'session' :
{
- $cookie_yes = ($conf['upload_available']=='true')?'checked="checked"':'';
- $cookie_no = ($conf['upload_available']=='false')?'checked="checked"':'';
+ $auth_method_URI = ($conf['auth_method']=='URI')?'checked="checked"':'';
+ $auth_method_cookie =
+ ($conf['auth_method']=='cookie')?'checked="checked"':'';
+ $authorize_remembering_yes =
+ ($conf['authorize_remembering']=='true')?'checked="checked"':'';
+ $authorize_remembering_no =
+ ($conf['authorize_remembering']=='false')?'checked="checked"':'';
$template->assign_block_vars(
'session',
array(
'L_CONF_TITLE'=>$lang['conf_session_title'],
- 'L_CONF_COOKIE'=>$lang['conf_cookies'],
- 'L_CONF_COOKIE_INFO'=>$lang['conf_cookies_info'],
- 'L_SESSION_LENGTH'=>$lang['conf_session_time'],
- 'L_SESSION_LENGTH_INFO'=>$lang['conf_session_time_info'],
- 'L_SESSION_ID_SIZE'=>$lang['conf_session_size'],
- 'L_SESSION_ID_SIZE_INFO'=>$lang['conf_session_size_info'],
-
- 'SESSION_LENGTH'=>$conf['session_time'],
- 'SESSION_ID_SIZE'=>$conf['session_id_size'],
- 'COOKIE_YES'=>$cookie_yes,
- 'COOKIE_NO'=>$cookie_no
+ 'L_CONF_AUTH_METHOD'=>$lang['conf_auth_method'],
+ 'L_CONF_AUTH_METHOD_INFO'=>$lang['conf_auth_method_info'],
+ 'L_CONF_AUTHORIZE_REMEMBERING'=>$lang['conf_authorize_remembering'],
+ 'L_CONF_AUTHORIZE_REMEMBERING_INFO' =>
+ $lang['conf_authorize_remembering_info'],
+
+ 'AUTH_METHOD_URI'=>$auth_method_URI,
+ 'AUTH_METHOD_COOKIE'=>$auth_method_cookie,
+ 'AUTHORIZE_REMEMBERING_YES'=>$authorize_remembering_yes,
+ 'AUTHORIZE_REMEMBERING_NO'=>$authorize_remembering_no
));
break;
}