mirror of
https://github.com/openvk/openvk
synced 2025-01-03 22:31:59 +03:00
Compare commits
4 commits
49e449e478
...
ef7b4b6c3e
Author | SHA1 | Date | |
---|---|---|---|
|
ef7b4b6c3e | ||
|
a4454ab7a0 | ||
|
3a1acaeeeb | ||
|
c53dce2bea |
4 changed files with 6 additions and 6 deletions
|
@ -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
|
|||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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">
|
||||
|
|
Loading…
Reference in a new issue