mirror of
https://github.com/Karaka-Management/oms-Editor.git
synced 2026-02-08 06:38:39 +00:00
update
This commit is contained in:
parent
ace50dd276
commit
23307c6116
|
|
@ -255,7 +255,7 @@ final class ApiController extends Controller
|
|||
$doc->isVersioned = $request->getDataBool('versioned') ?? false;
|
||||
$doc->createdBy = new NullAccount($request->header->account);
|
||||
$doc->version = $request->getDataString('version') ?? '';
|
||||
$doc->setVirtualPath((string) ($request->getData('virtualpath') ?? '/'));
|
||||
$doc->setVirtualPath($request->getDataString('virtualpath') ?? '/');
|
||||
|
||||
if (!empty($tags = $request->getDataJson('tags'))) {
|
||||
foreach ($tags as $tag) {
|
||||
|
|
@ -344,11 +344,11 @@ final class ApiController extends Controller
|
|||
{
|
||||
/** @var \Modules\Editor\Models\EditorDoc $doc */
|
||||
$doc = EditorDocMapper::get()->where('id', (int) $request->getData('id'))->execute();
|
||||
$doc->isVersioned = (bool) ($request->getData('versioned') ?? $doc->isVersioned);
|
||||
$doc->title = (string) ($request->getData('title') ?? $doc->title);
|
||||
$doc->plain = (string) ($request->getData('plain') ?? $doc->plain);
|
||||
$doc->content = Markdown::parse((string) ($request->getData('plain') ?? $doc->plain));
|
||||
$doc->version = (string) ($request->getData('version') ?? $doc->version);
|
||||
$doc->isVersioned = $request->getDataBool('versioned') ?? $doc->isVersioned;
|
||||
$doc->title = $request->getDataString('title') ?? $doc->title;
|
||||
$doc->plain = $request->getDataString('plain') ?? $doc->plain;
|
||||
$doc->content = Markdown::parse($request->getDataString('plain') ?? $doc->plain);
|
||||
$doc->version = $request->getDataString('version') ?? $doc->version;
|
||||
|
||||
return $doc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ final class BackendController extends Controller
|
|||
$view->setTemplate('/Modules/Editor/Theme/Backend/editor-list');
|
||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1005301001, $request, $response);
|
||||
|
||||
$path = \str_replace('+', ' ', (string) ($request->getData('path') ?? '/'));
|
||||
$path = \strtr($request->getDataString('path') ?? '/', '+', ' ');
|
||||
$docs = EditorDocMapper::getByVirtualPath($path, $request->header->account)->where('tags/title/language', $response->header->l11n->language)->execute();
|
||||
|
||||
list($collection, $parent) = CollectionMapper::getCollectionsByPath($path);
|
||||
|
|
|
|||
|
|
@ -71,14 +71,12 @@ final class Autoloader
|
|||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws AutoloadException Throws this exception if the class to autoload doesn't exist. This could also be related to a wrong namespace/file path correlation.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function defaultAutoloader(string $class) : void
|
||||
{
|
||||
$class = \ltrim($class, '\\');
|
||||
$class = \str_replace(['_', '\\'], '/', $class);
|
||||
$class = \strtr($class, '_\\', '//');
|
||||
|
||||
foreach (self::$paths as $path) {
|
||||
$file = $path . $class . '.php';
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user