mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-20 00:23:40 +02:00
- 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:
+11
-23
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user