added album functions. fixes #16

This commit is contained in:
Christian Haschek
2016-10-22 20:14:38 +02:00
parent 5765f3c0e4
commit f830d6266b
4 changed files with 88 additions and 0 deletions

View File

@@ -70,11 +70,25 @@ class PictshareModel extends Model
$data['changecode'] = substr($el,11);
if($this->isImage($el))
{
//if there are mor than one hashes in url
//make an album from them
if($data['hash'])
{
if(!$data['album'])
$data['album'][] = $data['hash'];
$data['album'][] = $el;
}
$data['hash']=$el;
}
else if($el=='mp4' || $el=='raw' || $el=='preview' || $el=='webm' || $el=='ogg')
$data[$el] = 1;
else if($this->isSize($el))
$data['size'] = $el;
else if($el=='embed')
$data['embed'] = true;
else if($el=='responsive')
$data['responsive'] = true;
else if($this->isRotation($el))
$data['rotate'] = $el;
else if($this->isFilter($el))