aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2007-02-21 05:46:56 +0000
committerrvelices <rv-github@modusoptimus.com>2007-02-21 05:46:56 +0000
commit57278c296076ca1c7764ece6764e79c088a5bd5d (patch)
treeca54c19f8b1b5ce92ab06bcc8c76a3751dfa4291
parentf579b7bef4684cdaf58a4ea00883c70d75e401d6 (diff)
- 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
Diffstat (limited to '')
-rw-r--r--category.php8
-rw-r--r--include/functions.inc.php5
-rw-r--r--template/yoga/picture.tpl6
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 @@
<a class="navButton prev"><img src="{pwg_root}{themeconf:icon_dir}/last_unactive.png" class="button" alt="{lang:last_page}"></a>
<!-- END last_unactive -->
<!-- BEGIN next -->
- <a class="navButton next" href="{next.U_IMG}" title="{L_NEXT_IMG}{next.TITLE_IMG}" rel="next"><img src="{pwg_root}{themeconf:icon_dir}/right.png" class="button" alt="{lang:next_page}"></a>
+ <a class="navButton next" href="{next.U_IMG}" title="{lang:next_page} : {next.TITLE_IMG}" rel="next"><img src="{pwg_root}{themeconf:icon_dir}/right.png" class="button" alt="{lang:next_page}"></a>
<!-- END next -->
<!-- BEGIN next_unactive -->
<a class="navButton next"><img src="{pwg_root}{themeconf:icon_dir}/right_unactive.png" class="button" alt="{lang:next_page}"></a>
<!-- END next_unactive -->
- <a class="navButton up" href="{U_UP}" title="{lang:thumbnails}" rel="up"><img src="{pwg_root}{themeconf:icon_dir}/up.png" class="button" alt="{L_UP_ALT}"></a>
+ <a class="navButton up" href="{U_UP}" title="{lang:thumbnails}" rel="up"><img src="{pwg_root}{themeconf:icon_dir}/up.png" class="button" alt="{lang:thumbnails}"></a>
<!-- BEGIN previous -->
- <a class="navButton prev" href="{previous.U_IMG}" title="{L_PREV_IMG}{previous.TITLE_IMG}" rel="prev"><img src="{pwg_root}{themeconf:icon_dir}/left.png" class="button" alt="{lang:previous_page}"></a>
+ <a class="navButton prev" href="{previous.U_IMG}" title="{lang:previous_page} : {previous.TITLE_IMG}" rel="prev"><img src="{pwg_root}{themeconf:icon_dir}/left.png" class="button" alt="{lang:previous_page}"></a>
<!-- END previous -->
<!-- BEGIN previous_unactive -->
<a class="navButton prev"><img src="{pwg_root}{themeconf:icon_dir}/left_unactive.png" class="button" alt="{lang:previous_page}"></a>