- 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
This commit is contained in:
rvelices
2007-02-21 05:46:56 +00:00
parent f579b7bef4
commit 57278c2960
3 changed files with 14 additions and 5 deletions
+7 -1
View File
@@ -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 );
?>
+4 -1
View File
@@ -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);
}
+3 -3
View File
@@ -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>