aboutsummaryrefslogtreecommitdiffstats
path: root/category.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2006-04-28 05:11:46 +0000
committerrvelices <rv-github@modusoptimus.com>2006-04-28 05:11:46 +0000
commite827e05429469912c450d2a1ee6750fffc82dbde (patch)
treef0d3af7ece4569d21491dbd3ac7901e0f41e3f84 /category.php
parent1cc593f7606c34428271a4beee5755a301988e4e (diff)
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/branches/branch-1_6@1287 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'category.php')
-rw-r--r--category.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/category.php b/category.php
index f91ad942c..f0a5161f7 100644
--- a/category.php
+++ b/category.php
@@ -39,6 +39,9 @@ if ( isset($_GET['cat']) )
{
$url_params['section'] = 'categories';
$url_params['category'] = $_GET['cat'];
+ $result = get_cat_info($url_params['category']);
+ if ( !empty($result) )
+ $url_params['cat_name'] = $result['name'];
}
elseif ( in_array($_GET['cat'],
array('best_rated','most_visited','recent_pics','recent_cats')
@@ -47,6 +50,10 @@ if ( isset($_GET['cat']) )
{
$url_params['section'] = $_GET['cat'];
}
+ else
+ {
+ page_not_found('');
+ }
}
redirect ( make_index_url($url_params) );