From 8d4cda5620e2adf30a0cfef8f0380db6e8d72e7d Mon Sep 17 00:00:00 2001 From: nikrou Date: Wed, 3 May 2006 17:22:15 +0000 Subject: bug 331 fixed: html generated contains the code in header.tpl twice when we use the function redirect git-svn-id: http://piwigo.org/svn/branches/branch-1_6@1297 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions.inc.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/functions.inc.php b/include/functions.inc.php index 1a71112f7..f8f65c031 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -526,6 +526,13 @@ function redirect( $url , $msg = '', $refreh_time = 0) { global $user, $template, $lang_info, $conf, $lang, $t2, $page, $debug; + unset($template); + $template = new Template(PHPWG_ROOT_PATH.'template/'.$user['template']); + if (!isset($page['body_id'])) + { + $page['body_id'] = 'adminPage'; + } + // $redirect_msg, $refresh, $url_link and $title are required for creating an automated // refresh page in header.tpl if (!isset($msg) or ($msg == '')) -- cgit v1.2.3