diff --git a/VKAPI/Handlers/Wall.php b/VKAPI/Handlers/Wall.php index dad7f883..400e15da 100644 --- a/VKAPI/Handlers/Wall.php +++ b/VKAPI/Handlers/Wall.php @@ -1003,7 +1003,12 @@ final class Wall extends VKAPIRequestHandler $post->save(true); if($attachments == 'remove' || sizeof($final_attachments) > 0) { - $post->unwire(); + foreach($post->getChildren() as $att) { + if(!($att instanceof Post)) { + $post->detach($att); + } + } + foreach($final_attachments as $attachment) { $post->attach($attachment); } diff --git a/Web/Presenters/templates/components/post/microblogpost.xml b/Web/Presenters/templates/components/post/microblogpost.xml index 6377516e..9635f417 100644 --- a/Web/Presenters/templates/components/post/microblogpost.xml +++ b/Web/Presenters/templates/components/post/microblogpost.xml @@ -109,7 +109,7 @@ -
+
{$post->getPublicationTime()} ({_edited_short}) diff --git a/Web/Presenters/templates/components/post/oldpost.xml b/Web/Presenters/templates/components/post/oldpost.xml index b8d569a6..5b1a087a 100644 --- a/Web/Presenters/templates/components/post/oldpost.xml +++ b/Web/Presenters/templates/components/post/oldpost.xml @@ -111,7 +111,7 @@
-
+
{if is_null($thisUser)} {var $forceNoDeleteLink = true} diff --git a/Web/static/js/al_wall.js b/Web/static/js/al_wall.js index 324ec3cb..5504bd3b 100644 --- a/Web/static/js/al_wall.js +++ b/Web/static/js/al_wall.js @@ -630,6 +630,7 @@ u(document).on("click", "#editPost", async (e) => {
+
@@ -695,6 +696,13 @@ u(document).on("click", "#editPost", async (e) => { edit_place.find(`input[name='source']`).attr('value', 'remove') }) } + + if(api_post.copy_history && api_post.copy_history.length > 0) { + edit_place.find('.post-repost').html(` + ${tr('has_repost')}. + `) + } + // horizontal attachments api_post.attachments.forEach(att => { const type = att.type diff --git a/locales/en.strings b/locales/en.strings index 93482b44..9ad22671 100644 --- a/locales/en.strings +++ b/locales/en.strings @@ -257,6 +257,7 @@ "others_posts" = "Others posts"; "show_more" = "Show more"; +"has_repost" = "Has repost"; /* Friends */ diff --git a/locales/ru.strings b/locales/ru.strings index 4ddc7a91..8f0cd950 100644 --- a/locales/ru.strings +++ b/locales/ru.strings @@ -236,6 +236,7 @@ "clubs_posts" = "Записи сообщества"; "others_posts" = "Чужие записи"; "show_more" = "Показать больше"; +"has_repost" = "Содержит репост"; /* Friends */