This commit is contained in:
Dennis Eichhorn 2018-02-03 13:09:09 +01:00
parent 2c2cf60d91
commit a3b5a5d973
5 changed files with 6 additions and 8 deletions

View File

@ -19,7 +19,6 @@ use phpOMS\Module\UpdateAbstract;
use phpOMS\System\File\Directory; use phpOMS\System\File\Directory;
use phpOMS\Module\InfoManager; use phpOMS\Module\InfoManager;
/** /**
* Navigation class. * Navigation class.
* *

View File

@ -6,13 +6,13 @@
jsOMS.Modules.Editor = function(app) jsOMS.Modules.Editor = function(app)
{ {
this.app = app; this.app = app;
this.editors = {}; this.editors = {};
}; };
jsOMS.Modules.Editor.prototype.bind = function(id) 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; length = e.length;
for(let i = 0; i < length; i++) { for(let i = 0; i < length; i++) {

View File

@ -183,7 +183,7 @@ class Controller extends ModuleAbstract implements WebInterface
{ {
$view = new View($this->app, $request, $response); $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(); $accountId = $request->getHeader()->getAccount();
if ($doc->getCreatedBy()->getId() !== $accountId if ($doc->getCreatedBy()->getId() !== $accountId
@ -205,8 +205,7 @@ class Controller extends ModuleAbstract implements WebInterface
private function validateEditorCreate(RequestAbstract $request) : array private function validateEditorCreate(RequestAbstract $request) : array
{ {
$val = []; $val = [];
if ( if (($val['title'] = empty($request->getData('title')))
($val['title'] = empty($request->getData('title')))
|| ($val['plain'] = empty($request->getData('plain'))) || ($val['plain'] = empty($request->getData('plain')))
) { ) {
return $val; return $val;

View File

@ -42,4 +42,4 @@ class BaseView extends View
$this->id = $data[0]; $this->id = $data[0];
return parent::render(); return parent::render();
} }
} }

View File

@ -39,4 +39,4 @@ class TextView extends View
$this->id = $data[0]; $this->id = $data[0];
return parent::render(); return parent::render();
} }
} }