new function to get image name depending on name and filename
git-svn-id: http://piwigo.org/svn/trunk@9366 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
be797aa3da
commit
bf4d7dca14
1 changed files with 19 additions and 0 deletions
|
|
@ -65,6 +65,25 @@ function get_element_location($element_info)
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* Returns the name of a photo according to its name and its filename.
|
||||
* @param name string
|
||||
* @param filename string
|
||||
* @return string
|
||||
*/
|
||||
function get_image_name($name, $filename)
|
||||
{
|
||||
if (!empty($name))
|
||||
{
|
||||
return $name;
|
||||
}
|
||||
else
|
||||
{
|
||||
return get_name_from_file($filename);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the PATH to the image to be displayed in the picture page. If the
|
||||
* element is not a picture, then the representative image or the default
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue