- put back config['session_length'] disappeared in r1493 but has always been

used in the code (generates mysql errors on session garbage collector)
- fix auto_login (die mysql when session timed out, but user has remember)
- when a user reconnects from identification.php, the remember cookie was not
deleted
- fix all redirect warnings/errors (many changes - mainly in common.inc.php
and user.inc.php)
- reduced $conf['remember_me_length'] to 60 days, because now at each auto 
login the 60 days countdown restarts

git-svn-id: http://piwigo.org/svn/trunk@1568 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rvelices
2006-10-20 02:17:53 +00:00
parent dbadd4defb
commit eaacbc7b2d
7 changed files with 192 additions and 172 deletions
+11 -23
View File
@@ -584,8 +584,16 @@ function redirect( $url , $msg = '', $refresh_time = 0)
{
global $user, $template, $lang_info, $conf, $lang, $t2, $page, $debug;
if (!isset($lang_info)) {
if (!isset($lang_info))
{
$user = build_user( $conf['guest_id'], true);
include_once(get_language_filepath('common.lang.php'));
list($tmpl, $thm) = explode('/', $conf['default_template']);
$template = new Template(PHPWG_ROOT_PATH.'template/'.$tmpl, $thm);
}
else
{
$template = new Template(PHPWG_ROOT_PATH.'template/'.$user['template'], $user['theme']);
}
if (empty($msg))
@@ -602,26 +610,6 @@ function redirect( $url , $msg = '', $refresh_time = 0)
$url_link = $url;
$title = 'redirection';
unset($template);
if ( isset($user['template']) )
{
$template = new Template(PHPWG_ROOT_PATH.'template/'.$user['template']);
}
else
{
list($tmpl, $thm) = explode('/', $conf['default_template']);
global $themeconf;
include(
PHPWG_ROOT_PATH
.'template/'.$tmpl
.'/theme/'.$thm
.'/themeconf.inc.php'
);
$template = new Template(PHPWG_ROOT_PATH.'template/'.$tmpl);
$user['is_the_guest']=true;
$user['id']=$conf['guest_id'];
}
$template->set_filenames( array( 'redirect' => 'redirect.tpl' ) );
include( PHPWG_ROOT_PATH.'include/page_header.php' );
@@ -921,9 +909,9 @@ function str_translate_to_ascii7bits($str)
*/
function get_themeconf($key)
{
global $themeconf;
global $template;
return isset($themeconf[$key]) ? $themeconf[$key] : '';
return $template->get_themeconf($key);
}
/**