diff options
author | rvelices <rv-github@modusoptimus.com> | 2008-09-05 01:24:01 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2008-09-05 01:24:01 +0000 |
commit | b8a5fde84629cdc4885016b76c90d9836c4f65b0 (patch) | |
tree | 0120912c4862214944e2689c49c44c095f112810 /include/functions_url.inc.php | |
parent | 116f1bc4fb9c2825a87d7fab9dbfdde78434431a (diff) |
- better management of fatal errors (instead of die or trigger_error rather use fatal_error ...)
git-svn-id: http://piwigo.org/svn/trunk@2502 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | include/functions_url.inc.php | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/include/functions_url.inc.php b/include/functions_url.inc.php index fa7114dea..9921237a6 100644 --- a/include/functions_url.inc.php +++ b/include/functions_url.inc.php @@ -219,10 +219,8 @@ function duplicate_picture_url($redefined = array(), $removed = array()) function make_picture_url($params) { global $conf; - if (!isset($params['image_id'])) - { - die('make_picture_url: image_id is a required parameter'); - } + + isset($params['image_id']) or fatal_error('make_picture_url: image_id is a required parameter'); $url = get_root_url().'picture'; if ($conf['php_extension_in_urls']) @@ -375,7 +373,7 @@ function make_section_in_url($params) { if (!isset($params['tags']) or count($params['tags']) == 0) { - die('make_section_in_url: require at least one tag'); + fatal_error('make_section_in_url: require at least one tag'); } $section_string.= '/tags'; @@ -406,24 +404,14 @@ function make_section_in_url($params) } case 'search' : { - if (!isset($params['search'])) - { - die('make_section_in_url: require a search identifier'); - } - + isset($params['search']) or fatal_error('make_section_in_url: require a search identifier'); $section_string.= '/search/'.$params['search']; - break; } case 'list' : { - if (!isset($params['list'])) - { - die('make_section_in_url: require a list of items'); - } - + isset($params['list']) or fatal_error('make_section_in_url: require a list of items'); $section_string.= '/list/'.implode(',', $params['list']); - break; } case 'none' : |