From aaea0a1653e42bfa2db8e5be2e36f5e22be16631 Mon Sep 17 00:00:00 2001 From: rvelices Date: Fri, 28 Apr 2006 05:12:25 +0000 Subject: 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 --- category.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'category.php') 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) ); -- cgit v1.2.3