mirror of
https://github.com/Karaka-Management/oms-Editor.git
synced 2026-02-16 02:08:40 +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\System\File\Directory;
|
||||||
use phpOMS\Module\InfoManager;
|
use phpOMS\Module\InfoManager;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Navigation class.
|
* Navigation class.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -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++) {
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user