Replaced check with hardwired path
This commit is contained in:
parent
f220e26f00
commit
e3692c0105
4 changed files with 23 additions and 9 deletions
|
|
@ -710,6 +710,18 @@ class Photo
|
|||
return $image_uri;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the given URL is a local photo.
|
||||
* Since it is meant for time critical occasions, the check is done without any database requests.
|
||||
*
|
||||
* @param string $url
|
||||
* @return boolean
|
||||
*/
|
||||
public static function isPhotoURI(string $url): bool
|
||||
{
|
||||
return !empty(self::ridFromURI($url));
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes photo permissions that had been embedded in a post
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue