Remove resourceid parameter from Photo::exists()

This commit is contained in:
fabrixxm 2018-12-12 08:12:34 +01:00 committed by Hypolite Petovan
parent e7fbe04b11
commit 55292c954b
3 changed files with 6 additions and 14 deletions

View file

@ -147,20 +147,12 @@ class Photo extends BaseObject
/**
* @brief Check if photo with given resource id exists
*
* @param string $resourceid Resource ID of the photo
* @param array $conditions Array of extra conditions. Optional
*
* @return boolean
*/
public static function exists($resourceid, array $conditions = [])
public static function exists(array $conditions = [])
{
if (!is_null($resourceid)) {
$conditions["resource-id"] = $resourceid;
}
if (count($conditions) == 0) {
// no conditions defined. return false
return false;
}
return DBA::count("photo", $conditions) > 0;
}