Browse Source

Fix attachement duplicate issues in Post

pull/1191/head
Timothée Jaussoin 3 years ago
parent
commit
e5821618f0
  1. 12
      app/Post.php
  2. 1
      app/widgets/Login/login.css

12
app/Post.php

@ -611,6 +611,18 @@ class Post extends Model
unset($this->attachments[$key]);
}
}
// Remove duplicates...
foreach ($this->attachments as $key => $attachment) {
foreach($this->attachments as $keyCheck => $attachmentCheck) {
if ($key != $keyCheck
&& $attachment->href == $attachmentCheck->href
&& $attachment->category == $attachmentCheck->category
&& $attachment->rel == $attachmentCheck->rel) {
unset($this->attachments[$key]);
}
}
}
}
public function getUUID()

1
app/widgets/Login/login.css

@ -37,6 +37,7 @@ body main {
#login_widget .dialog.more > section {
overflow: hidden;
margin-bottom: 0.5rem;
}
@media screen and (max-width: 600px) {

Loading…
Cancel
Save