mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
Update ap helpers, fix album order bug by setting media order
This commit is contained in:
parent
00aa5cf30f
commit
871f798cc9
1 changed files with 2 additions and 1 deletions
|
@ -665,7 +665,7 @@ class Helpers {
|
|||
$storagePath = MediaPathService::get($user, 2);
|
||||
$allowed = explode(',', config_cache('pixelfed.media_types'));
|
||||
|
||||
foreach($attachments as $media) {
|
||||
foreach($attachments as $key => $media) {
|
||||
$type = $media['mediaType'];
|
||||
$url = $media['url'];
|
||||
$valid = self::validateUrl($url);
|
||||
|
@ -685,6 +685,7 @@ class Helpers {
|
|||
$media->media_path = $url;
|
||||
$media->remote_url = $url;
|
||||
$media->caption = $caption;
|
||||
$media->order = $key + 1;
|
||||
if($license) {
|
||||
$media->license = $license;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue