mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 00:45:14 +02:00
Remove resourceid parameter from Photo::exists()
This commit is contained in:
parent
e7fbe04b11
commit
55292c954b
3 changed files with 6 additions and 14 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue