From 57278c296076ca1c7764ece6764e79c088a5bd5d Mon Sep 17 00:00:00 2001 From: rvelices Date: Wed, 21 Feb 2007 05:46:56 +0000 Subject: [PATCH] - added check in redirect to see if headers have been sent before doing a redirect_http - old category.php uses redirect_http whenever possible - replaced some old {L_xxx} in picture.tpl git-svn-id: http://piwigo.org/svn/trunk@1846 68402e56-0260-453c-a942-63ccdbb3a9ee --- category.php | 8 +++++++- include/functions.inc.php | 5 ++++- template/yoga/picture.tpl | 6 +++--- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/category.php b/category.php index f0a5161f7..8b0ade406 100644 --- a/category.php +++ b/category.php @@ -56,6 +56,12 @@ if ( isset($_GET['cat']) ) } } -redirect ( make_index_url($url_params) ); +$url = make_index_url($url_params); +if (!headers_sent()) +{ + set_status_header(302); + redirect_http( $url ); +} +redirect ( $url ); ?> \ No newline at end of file diff --git a/include/functions.inc.php b/include/functions.inc.php index e09339982..4666c0fcb 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -689,7 +689,10 @@ function redirect( $url , $msg = '', $refresh_time = 0) global $conf; // with RefeshTime <> 0, only html must be used - if (($conf['default_redirect_method'] == 'http') and ($refresh_time == 0)) + if ($conf['default_redirect_method']=='http' + and $refresh_time==0 + and !headers_sent() + ) { redirect_http($url); } diff --git a/template/yoga/picture.tpl b/template/yoga/picture.tpl index c82571830..8d6f4ba1e 100644 --- a/template/yoga/picture.tpl +++ b/template/yoga/picture.tpl @@ -44,14 +44,14 @@ - + - {L_UP_ALT} + {lang:thumbnails} - +