mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-24 14:08:00 +01:00
Added getOriginalFiles() to Image
This commit is contained in:
parent
7ae95fa46f
commit
249b98311e
1 changed files with 15 additions and 0 deletions
|
@ -154,6 +154,21 @@ class Image extends Model
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the names of all the original-sized images uploaded to the server
|
||||
* @return string[]
|
||||
*/
|
||||
public static function getOriginalFiles() {
|
||||
$rv = array();
|
||||
|
||||
//We use a cursor to cut down on memory
|
||||
foreach (Image::cursor() as $image) {
|
||||
$rv[] = $image->getFile(Image::ORIGINAL);
|
||||
}
|
||||
|
||||
return $rv;
|
||||
}
|
||||
|
||||
protected $table = 'images';
|
||||
|
||||
public function getUrl($type = self::NORMAL)
|
||||
|
|
Loading…
Reference in a new issue