mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 09:13:02 +02:00
- 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
This commit is contained in:
@@ -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' :
|
||||
|
||||
Reference in New Issue
Block a user