mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-05-03 20:12:44 +02:00
merge -r1287 from branch-1_6 to trunk
bug 349: Nicer display messages instead of "die" when urls cannot be solved (also set 404 status code for bots) git-svn-id: http://piwigo.org/svn/trunk@1288 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -197,7 +197,7 @@ SELECT name, url_name, id
|
||||
}
|
||||
if ( empty($page['tags']) )
|
||||
{
|
||||
die('Fatal: no existing tag');
|
||||
page_not_found('Requested tag does not exist', get_root_url().'tags.php' );
|
||||
}
|
||||
}
|
||||
else if (0 === strpos($tokens[$next_token], 'fav'))
|
||||
@@ -316,6 +316,10 @@ if ('categories' == $page['section'])
|
||||
if (isset($page['category']))
|
||||
{
|
||||
$result = get_cat_info($page['category']);
|
||||
if (empty($result))
|
||||
{
|
||||
page_not_found('Requested category does not exist' );
|
||||
}
|
||||
|
||||
$page = array_merge(
|
||||
$page,
|
||||
|
||||
Reference in New Issue
Block a user