diff --git a/VKAPI/Handlers/Wall.php b/VKAPI/Handlers/Wall.php index a906596b..798aa5a3 100644 --- a/VKAPI/Handlers/Wall.php +++ b/VKAPI/Handlers/Wall.php @@ -722,7 +722,7 @@ final class Wall extends VKAPIRequestHandler $post->attach($attachment); } - if ($owner_id > 0 && $owner_id !== $this->user->identity->getId()) { + if ($owner_id > 0 && $owner_id !== $this->getUser()->getId()) { (new WallPostNotification($wallOwner, $post, $this->user->identity))->emit(); } @@ -1176,8 +1176,9 @@ final class Wall extends VKAPIRequestHandler if ($from_group == 1 && $wallOwner instanceof Club && $wallOwner->canBeModifiedBy($this->getUser())) { $flags |= 0b10000000; } - /*if($signed == 1) - $flags |= 0b01000000;*/ + if ($post->isSigned() && $from_group == 1) { + $flags |= 0b01000000; + } $post->setFlags($flags); $post->save(true); diff --git a/Web/Models/Entities/Audio.php b/Web/Models/Entities/Audio.php index 7e742db7..9676d6cd 100644 --- a/Web/Models/Entities/Audio.php +++ b/Web/Models/Entities/Audio.php @@ -435,6 +435,10 @@ class Audio extends Media $obj->keys = $this->getKeys(); } + if ($obj->editable) { + $obj->listens = $this->getListens(); + } + return $obj; } diff --git a/Web/Models/Entities/Notifications/Notification.php b/Web/Models/Entities/Notifications/Notification.php index 6a6866c1..8b39c380 100644 --- a/Web/Models/Entities/Notifications/Notification.php +++ b/Web/Models/Entities/Notifications/Notification.php @@ -168,14 +168,13 @@ class Notification case 19: $info["type"] = "comment_video"; $info["parent"] = $this->getModel(0)->toNotifApiStruct(); - $info["feedback"] = null; # айди коммента не сохраняется в бд( ну пиздец блять + $info["feedback"] = null; # comment id is not saving at db break; case 13: $info["type"] = "comment_photo"; $info["parent"] = $this->getModel(0)->toNotifApiStruct(); $info["feedback"] = null; break; - # unstandart (vk forgor about notes) case 10: $info["type"] = "comment_note"; $info["parent"] = $this->getModel(0)->toVkApiStruct(); diff --git a/Web/Presenters/AudioPresenter.php b/Web/Presenters/AudioPresenter.php index 61b0edbb..c5c1eecc 100644 --- a/Web/Presenters/AudioPresenter.php +++ b/Web/Presenters/AudioPresenter.php @@ -508,7 +508,7 @@ final class AudioPresenter extends OpenVKPresenter $title = $this->postParam("title"); $description = $this->postParam("description"); $is_unlisted = (int) $this->postParam('is_unlisted'); - $new_audios = !empty($this->postParam("audios")) ? explode(",", rtrim($this->postParam("audios"), ",")) : []; + $new_audios = !empty($this->postParam("audios")) ? explode(",", rtrim($this->postParam("audios"), ",")) : null; if (empty($title) || iconv_strlen($title) < 1) { $this->flashFail("err", tr("error"), tr("set_playlist_name")); @@ -538,13 +538,15 @@ final class AudioPresenter extends OpenVKPresenter "collection" => $playlist->getId(), ])->delete(); - foreach ($new_audios as $new_audio) { - $audio = (new Audios())->get((int) $new_audio); - if (!$audio || $audio->isDeleted()) { - continue; - } + if (!is_null($new_audios)) { + foreach ($new_audios as $new_audio) { + $audio = (new Audios())->get((int) $new_audio); + if (!$audio || $audio->isDeleted()) { + continue; + } - $playlist->add($audio); + $playlist->add($audio); + } } if ($is_ajax) { diff --git a/Web/Presenters/InternalAPIPresenter.php b/Web/Presenters/InternalAPIPresenter.php index b33f159c..2e3a33ca 100644 --- a/Web/Presenters/InternalAPIPresenter.php +++ b/Web/Presenters/InternalAPIPresenter.php @@ -165,7 +165,7 @@ final class InternalAPIPresenter extends OpenVKPresenter if ($type == 'post') { $this->template->_template = 'components/post.xml'; $this->template->post = $post; - $this->template->commentSection = false; + $this->template->commentSection = true; } elseif ($type == 'comment') { $this->template->_template = 'components/comment.xml'; $this->template->comment = $post; diff --git a/Web/Presenters/PhotosPresenter.php b/Web/Presenters/PhotosPresenter.php index ebff8f7e..6c294fdd 100644 --- a/Web/Presenters/PhotosPresenter.php +++ b/Web/Presenters/PhotosPresenter.php @@ -321,7 +321,7 @@ final class PhotosPresenter extends OpenVKPresenter $photos = []; if ((int) $this->postParam("count") > 10) { - $this->flashFail("err", tr("no_photo"), "ты еблан", 500, true); + $this->flashFail("err", tr("no_photo"), "Too many photos (max is 7-8)", 500, true); } for ($i = 0; $i < $this->postParam("count"); $i++) { diff --git a/Web/Presenters/SearchPresenter.php b/Web/Presenters/SearchPresenter.php index ee1b62a0..bd79b08d 100644 --- a/Web/Presenters/SearchPresenter.php +++ b/Web/Presenters/SearchPresenter.php @@ -42,7 +42,6 @@ final class SearchPresenter extends OpenVKPresenter $page = (int) ($this->queryParam("p") ?? 1); # https://youtu.be/pSAWM5YuXx8 - # https://youtu.be/FfNZRhIn2Vk $repos = [ "groups" => "clubs", diff --git a/Web/Presenters/WallPresenter.php b/Web/Presenters/WallPresenter.php index 79b36c2e..f4a8e898 100644 --- a/Web/Presenters/WallPresenter.php +++ b/Web/Presenters/WallPresenter.php @@ -409,7 +409,12 @@ final class WallPresenter extends OpenVKPresenter } if ($wall > 0 && $wall !== $this->user->identity->getId()) { - (new WallPostNotification($wallOwner, $post, $this->user->identity))->emit(); + $disturber = $this->user->identity; + if ($anon) { + $disturber = $post->getOwner(); + } + + (new WallPostNotification($wallOwner, $post, $disturber))->emit(); } $excludeMentions = [$this->user->identity->getId()]; diff --git a/Web/Presenters/templates/@layout.xml b/Web/Presenters/templates/@layout.xml index 7a55a8b0..9e6475fe 100644 --- a/Web/Presenters/templates/@layout.xml +++ b/Web/Presenters/templates/@layout.xml @@ -198,11 +198,11 @@ {_my_settings} - {if $thisUser->getLeftMenuItemStatus('docs') || $thisUser->getLeftMenuItemStatus('apps') || $thisUser->getLeftMenuItemStatus('fave')} + {if $thisUser->getLeftMenuItemStatus('docs') || $thisUser->getLeftMenuItemStatus('apps')} {_apps} {_my_documents} - {_bookmarks_tab} + {*{_bookmarks_tab}*} {/if} {var $canAccessAdminPanel = $thisUser->getChandlerUser()->can("access")->model("admin")->whichBelongsTo(NULL)} diff --git a/Web/Presenters/templates/User/Settings.xml b/Web/Presenters/templates/User/Settings.xml index 306cd774..10e0cd1e 100644 --- a/Web/Presenters/templates/User/Settings.xml +++ b/Web/Presenters/templates/User/Settings.xml @@ -120,6 +120,10 @@
+ {_bookmarks_tab} + • + {_s_posts} +

{_you_can_also} {_delete_your_page}.
@@ -707,7 +711,7 @@ {_my_documents} - + isDeleted()} {var $link = "/photo" . ($attachment->isAnonymous() ? ("s/" . base_convert((string) $attachment->getId(), 10, 32)) : $attachment->getPrettyId())} - {$attachment->getDescription()} + {$attachment->getDescription()} {else} diff --git a/Web/static/css/main.css b/Web/static/css/main.css index 01ef6284..0332d278 100644 --- a/Web/static/css/main.css +++ b/Web/static/css/main.css @@ -11,6 +11,7 @@ body { font-size: 11px; word-break: break-word; word-wrap: break-word; + line-height: 1.19; } body, .ovk-fullscreen-dimmer, .ovk-photo-view-dimmer { diff --git a/Web/static/js/al_music.js b/Web/static/js/al_music.js index 94ba615f..9f3247a7 100644 --- a/Web/static/js/al_music.js +++ b/Web/static/js/al_music.js @@ -330,7 +330,9 @@ window.player = new class { this.__updateFace() u(this.audioPlayer).trigger('volumechange') - document.title = ovk_proc_strtr(escapeHtml(`${window.player.currentTrack.performer} — ${window.player.currentTrack.name}`), 255) + if(this.isAtAudiosPage()) { + document.title = ovk_proc_strtr(escapeHtml(`${window.player.currentTrack.performer} — ${window.player.currentTrack.name}`), 255) + } } hasContext() { diff --git a/Web/static/js/al_wall.js b/Web/static/js/al_wall.js index 7423c656..6568ba51 100644 --- a/Web/static/js/al_wall.js +++ b/Web/static/js/al_wall.js @@ -2470,8 +2470,7 @@ u(document).on('click', '#__sourceAttacher', (e) => { // Checking link const __checkCopyrightLinkRes = await fetch(`/method/wall.checkCopyrightLink?auth_mechanism=roaming&link=${encodeURIComponent(source_value)}`) const checkCopyrightLink = await __checkCopyrightLinkRes.json() - - // todo переписать блять мессенджбоксы чтоб они классами были + if(checkCopyrightLink.error_code) { __removeDialog() switch(checkCopyrightLink.error_code) { diff --git a/themepacks/midnight/stylesheet.css b/themepacks/midnight/stylesheet.css index 4635d34e..88f04d91 100644 --- a/themepacks/midnight/stylesheet.css +++ b/themepacks/midnight/stylesheet.css @@ -674,3 +674,12 @@ ul { .ovk-modal-player-window #ovk-player-info { background: #0e0b1a; } + +.header_navigation #search_box #searchBoxFastTips { + background: #181826; + border-color: #2c2640; +} + +.header_navigation #search_box #searchBoxFastTips a:hover, .header_navigation #search_box #searchBoxFastTips a:focus { + background: #111322; +}