Compare commits

...

4 commits

4 changed files with 6 additions and 6 deletions

View file

@ -19,12 +19,12 @@ class Notes implements Handler
{
$note = $this->notes->get($noteId);
if(!$note || $note->isDeleted())
$reject("Note is gone");
$reject(83, "Note is gone");
$noteOwner = $note->getOwner();
assert($noteOwner instanceof User);
if(!$noteOwner->getPrivacyPermission("notes.read", $this->user))
$reject("You don't have permission to access this note");
$reject(160, "You don't have permission to access this note");
$resolve([
"title" => $note->getName(),
@ -38,4 +38,4 @@ class Notes implements Handler
],
]);
}
}
}

View file

@ -50,7 +50,7 @@
<div class="dimmer"></div>
<div class="articleView">
<a id="articleCloseButton" class="button" href="javascript:u('body').removeClass('article');">{_close}</a>
<a id="articleCloseButton" class="button" href="javascript:void(u('body').removeClass('article'));">{_close}</a>
<div class="articleView_container">
<div class="articleView_info">
<div class="articleView_author">

View file

@ -47,7 +47,7 @@
window._preview = undefined;
}
window._preview = window.open("data:text/html,", "_blank", { popup: true });
window._preview = window.open("about:blank", "_blank", { popup: true });
window._preview.document.write(`<style>form { display: none; }</style><form action="${ location.origin }/notes/prerender" method="POST" enctype="multipart/form-data"><input name="title" /><input name="html" /><input name="hash" /></form>`);
window._preview.document.querySelector("input[name=title]").value = document.querySelector("input[name=name]").value;
window._preview.document.querySelector("input[name=html]").value = window._editor.getValue();

View file

@ -33,7 +33,7 @@
<div class="attachment_note">
<img class="attachment_note_icon" src="/assets/packages/static/openvk/img/note.svg">
<span class="attachment_note_text">{_note}</span>
<span class="attachment_note_name"><a href="javascript:showArticle({$attachment->getId()});">{ovk_proc_strtr($attachment->getName(), 66)}</a></span>
<span class="attachment_note_name"><a href="javascript:void(showArticle({$attachment->getId()}));">{ovk_proc_strtr($attachment->getName(), 66)}</a></span>
</div>
{else}
<div class="attachment_note">