mirror of
https://github.com/Karaka-Management/oms-Editor.git
synced 2026-02-04 20:58:41 +00:00
phpcbf
This commit is contained in:
parent
2c2cf60d91
commit
a3b5a5d973
|
|
@ -19,7 +19,6 @@ use phpOMS\Module\UpdateAbstract;
|
|||
use phpOMS\System\File\Directory;
|
||||
use phpOMS\Module\InfoManager;
|
||||
|
||||
|
||||
/**
|
||||
* Navigation class.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -6,13 +6,13 @@
|
|||
|
||||
jsOMS.Modules.Editor = function(app)
|
||||
{
|
||||
this.app = app;
|
||||
this.app = app;
|
||||
this.editors = {};
|
||||
};
|
||||
|
||||
jsOMS.Modules.Editor.prototype.bind = function(id)
|
||||
{
|
||||
const e = typeof id === 'undefined' ? document.getElementsByClassName('m-editor') : [document.getElementById(id)],
|
||||
const e = typeof id === 'undefined' ? document.getElementsByClassName('m-editor') : [document.getElementById(id)],
|
||||
length = e.length;
|
||||
|
||||
for(let i = 0; i < length; i++) {
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ class Controller extends ModuleAbstract implements WebInterface
|
|||
{
|
||||
$view = new View($this->app, $request, $response);
|
||||
|
||||
$doc = EditorDocMapper::get((int) $request->getData('id'));
|
||||
$doc = EditorDocMapper::get((int) $request->getData('id'));
|
||||
$accountId = $request->getHeader()->getAccount();
|
||||
|
||||
if ($doc->getCreatedBy()->getId() !== $accountId
|
||||
|
|
@ -205,8 +205,7 @@ class Controller extends ModuleAbstract implements WebInterface
|
|||
private function validateEditorCreate(RequestAbstract $request) : array
|
||||
{
|
||||
$val = [];
|
||||
if (
|
||||
($val['title'] = empty($request->getData('title')))
|
||||
if (($val['title'] = empty($request->getData('title')))
|
||||
|| ($val['plain'] = empty($request->getData('plain')))
|
||||
) {
|
||||
return $val;
|
||||
|
|
|
|||
|
|
@ -42,4 +42,4 @@ class BaseView extends View
|
|||
$this->id = $data[0];
|
||||
return parent::render();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,4 +39,4 @@ class TextView extends View
|
|||
$this->id = $data[0];
|
||||
return parent::render();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user