Compare commits

..

No commits in common. "1d06a41b399d60d0285bcb23045959942eb2eef4" and "b7fc23bb52239cbae1834e5c6cb04fe961d84e8c" have entirely different histories.

17 changed files with 25 additions and 50 deletions

View file

@ -7,7 +7,7 @@ on:
jobs:
phpstan:
name: PHPStan
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
# 'push' runs on inner branches, 'pull_request' will run only on outer PRs
if: >

View file

@ -6,7 +6,7 @@ on:
jobs:
lint:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
# 'push' runs on inner branches, 'pull_request' will run only on outer PRs
if: >

View file

@ -722,7 +722,7 @@ final class Wall extends VKAPIRequestHandler
$post->attach($attachment);
}
if ($owner_id > 0 && $owner_id !== $this->getUser()->getId()) {
if ($owner_id > 0 && $owner_id !== $this->user->identity->getId()) {
(new WallPostNotification($wallOwner, $post, $this->user->identity))->emit();
}
@ -1176,9 +1176,8 @@ final class Wall extends VKAPIRequestHandler
if ($from_group == 1 && $wallOwner instanceof Club && $wallOwner->canBeModifiedBy($this->getUser())) {
$flags |= 0b10000000;
}
if ($post->isSigned() && $from_group == 1) {
$flags |= 0b01000000;
}
/*if($signed == 1)
$flags |= 0b01000000;*/
$post->setFlags($flags);
$post->save(true);

View file

@ -435,10 +435,6 @@ class Audio extends Media
$obj->keys = $this->getKeys();
}
if ($obj->editable) {
$obj->listens = $this->getListens();
}
return $obj;
}

View file

@ -168,13 +168,14 @@ class Notification
case 19:
$info["type"] = "comment_video";
$info["parent"] = $this->getModel(0)->toNotifApiStruct();
$info["feedback"] = null; # comment id is not saving at db
$info["feedback"] = null; # айди коммента не сохраняется в бд( ну пиздец блять
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();

View file

@ -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"), ",")) : null;
$new_audios = !empty($this->postParam("audios")) ? explode(",", rtrim($this->postParam("audios"), ",")) : [];
if (empty($title) || iconv_strlen($title) < 1) {
$this->flashFail("err", tr("error"), tr("set_playlist_name"));
@ -538,15 +538,13 @@ final class AudioPresenter extends OpenVKPresenter
"collection" => $playlist->getId(),
])->delete();
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);
foreach ($new_audios as $new_audio) {
$audio = (new Audios())->get((int) $new_audio);
if (!$audio || $audio->isDeleted()) {
continue;
}
$playlist->add($audio);
}
if ($is_ajax) {

View file

@ -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 = true;
$this->template->commentSection = false;
} elseif ($type == 'comment') {
$this->template->_template = 'components/comment.xml';
$this->template->comment = $post;

View file

@ -321,7 +321,7 @@ final class PhotosPresenter extends OpenVKPresenter
$photos = [];
if ((int) $this->postParam("count") > 10) {
$this->flashFail("err", tr("no_photo"), "Too many photos (max is 7-8)", 500, true);
$this->flashFail("err", tr("no_photo"), "ты еблан", 500, true);
}
for ($i = 0; $i < $this->postParam("count"); $i++) {

View file

@ -42,6 +42,7 @@ final class SearchPresenter extends OpenVKPresenter
$page = (int) ($this->queryParam("p") ?? 1);
# https://youtu.be/pSAWM5YuXx8
# https://youtu.be/FfNZRhIn2Vk
$repos = [
"groups" => "clubs",

View file

@ -409,12 +409,7 @@ final class WallPresenter extends OpenVKPresenter
}
if ($wall > 0 && $wall !== $this->user->identity->getId()) {
$disturber = $this->user->identity;
if ($anon) {
$disturber = $post->getOwner();
}
(new WallPostNotification($wallOwner, $post, $disturber))->emit();
(new WallPostNotification($wallOwner, $post, $this->user->identity))->emit();
}
$excludeMentions = [$this->user->identity->getId()];

View file

@ -198,11 +198,11 @@
</a>
<a href="/settings" class="link">{_my_settings}</a>
{if $thisUser->getLeftMenuItemStatus('docs') || $thisUser->getLeftMenuItemStatus('apps')}
{if $thisUser->getLeftMenuItemStatus('docs') || $thisUser->getLeftMenuItemStatus('apps') || $thisUser->getLeftMenuItemStatus('fave')}
<div class="menu_divider"></div>
<a n:if="$thisUser->getLeftMenuItemStatus('apps')" href="/apps?act=installed" class="link">{_apps}</a>
<a n:if="$thisUser->getLeftMenuItemStatus('docs')" href="/docs" class="link">{_my_documents}</a>
{*<a n:if="$thisUser->getLeftMenuItemStatus('fave')" href="/fave" class="link">{_bookmarks_tab}</a>*}
<a n:if="$thisUser->getLeftMenuItemStatus('fave')" href="/fave" class="link">{_bookmarks_tab}</a>
{/if}
{var $canAccessAdminPanel = $thisUser->getChandlerUser()->can("access")->model("admin")->whichBelongsTo(NULL)}

View file

@ -120,10 +120,6 @@
<br/>
<div class="settings_delete">
<a href="/fave">{_bookmarks_tab}</a>
<a href="/search?section=posts&from_me=1">{_s_posts}</a>
<br><br>
{_you_can_also} <a onClick="showProfileDeactivateDialog({$csrfToken})">{_delete_your_page}</a>.
</div>
@ -711,7 +707,7 @@
<span class="nobold">{_my_documents}</span>
</td>
</tr>
<tr style="display:none;">
<tr>
<td width="120" valign="top" align="right" align="right">
<input
n:attr="checked => $user->getLeftMenuItemStatus('fave')"

View file

@ -2,7 +2,7 @@
{if !$attachment->isDeleted()}
{var $link = "/photo" . ($attachment->isAnonymous() ? ("s/" . base_convert((string) $attachment->getId(), 10, 32)) : $attachment->getPrettyId())}
<a href="{$link}" onclick="OpenMiniature(event, {$attachment->getURLBySizeId('larger')}, {$parent->getPrettyId()}, {$attachment->getPrettyId()}, {$parentType})">
<img n:class="media, $tilesCount > 1 ? media_makima" src="{$attachment->getURLBySizeId('normal')}" alt="{$attachment->getDescription()}" loading=lazy />
<img class="media media_makima" src="{$attachment->getURLBySizeId('normal')}" alt="{$attachment->getDescription()}" loading=lazy />
</a>
{else}
<a href="javascript:alert('{_attach_no_longer_available}');">

View file

@ -11,7 +11,6 @@ body {
font-size: 11px;
word-break: break-word;
word-wrap: break-word;
line-height: 1.19;
}
body, .ovk-fullscreen-dimmer, .ovk-photo-view-dimmer {

View file

@ -330,9 +330,7 @@ window.player = new class {
this.__updateFace()
u(this.audioPlayer).trigger('volumechange')
if(this.isAtAudiosPage()) {
document.title = ovk_proc_strtr(escapeHtml(`${window.player.currentTrack.performer}${window.player.currentTrack.name}`), 255)
}
document.title = ovk_proc_strtr(escapeHtml(`${window.player.currentTrack.performer}${window.player.currentTrack.name}`), 255)
}
hasContext() {

View file

@ -2471,6 +2471,7 @@ u(document).on('click', '#__sourceAttacher', (e) => {
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) {

View file

@ -674,12 +674,3 @@ 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;
}