This commit is contained in:
lalka2016 2023-07-03 13:10:49 +03:00
parent b198a98506
commit 3b50c6d4f8
4 changed files with 5 additions and 4 deletions

View file

@ -81,7 +81,7 @@ class Wall implements Handler
$arr = [
"count" => sizeof($myNotes),
"closed" => $this->user->getPrivacySetting("notes.read"),
"items" => []
"items" => [],
];
foreach($myNotes as $note) {

View file

@ -477,7 +477,7 @@ final class Wall extends VKAPIRequestHandler
} elseif($attachmentType == "note") {
$attacc = (new NotesRepo)->getNoteById($attachmentOwner, $attachmentId);
if(!$attacc || $attacc->isDeleted())
$this->fail(100, "Note does not exists");
$this->fail(100, "Note does not exist");
if($attacc->getOwner()->getId() != $this->getUser()->getId())
$this->fail(43, "You do not have access to this note");

View file

@ -2540,6 +2540,7 @@ a.poll-retract-vote {
.attachment_note_text {
color: #605F63;
margin-left: 2px;
}
.attachment_note {

View file

@ -196,7 +196,7 @@ function addNote(textareaId, id, name)
let nortd = document.querySelector("#post-buttons"+textareaId+" .post-has-note");
nortd.style.display = "block"
nortd.innerHTML = `${tr("note")} ${name}`
nortd.innerHTML = `${tr("note")} ${escapeHtml(name)}`
u("body").removeClass("dimmed");
u(".ovk-diag-cont").remove();
@ -220,7 +220,7 @@ async function attachNote(id)
for(const note of notes.items) {
body += `
<div class="ntSelect" onclick="addNote(${id}, ${note.id}, '${escapeHtml(note.name)}')">
<div class="ntSelect" onclick="addNote(${id}, ${note.id}, '${note.name}')">
<span>${escapeHtml(note.name)}</span>
</div>
`