mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-23 08:14:10 +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);
|
$storagePath = MediaPathService::get($user, 2);
|
||||||
$allowed = explode(',', config_cache('pixelfed.media_types'));
|
$allowed = explode(',', config_cache('pixelfed.media_types'));
|
||||||
|
|
||||||
foreach($attachments as $media) {
|
foreach($attachments as $key => $media) {
|
||||||
$type = $media['mediaType'];
|
$type = $media['mediaType'];
|
||||||
$url = $media['url'];
|
$url = $media['url'];
|
||||||
$valid = self::validateUrl($url);
|
$valid = self::validateUrl($url);
|
||||||
|
@ -685,6 +685,7 @@ class Helpers {
|
||||||
$media->media_path = $url;
|
$media->media_path = $url;
|
||||||
$media->remote_url = $url;
|
$media->remote_url = $url;
|
||||||
$media->caption = $caption;
|
$media->caption = $caption;
|
||||||
|
$media->order = $key + 1;
|
||||||
if($license) {
|
if($license) {
|
||||||
$media->license = $license;
|
$media->license = $license;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue