mirror of
https://github.com/Karaka-Management/oms-Help.git
synced 2026-02-10 02:18:41 +00:00
Fix Path bugs after move
This commit is contained in:
parent
0cb2d7b0b3
commit
54ba3f2bc9
|
|
@ -103,7 +103,7 @@ class BackendController extends Controller
|
||||||
$path = \realpath(__DIR__ . '/../../../Documentation/README.md');
|
$path = \realpath(__DIR__ . '/../../../Documentation/README.md');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $path;
|
return $path === false ? '' : $path;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -139,14 +139,17 @@ class BackendController extends Controller
|
||||||
$active = $this->app->moduleManager->getActiveModules();
|
$active = $this->app->moduleManager->getActiveModules();
|
||||||
|
|
||||||
if ($request->getData('id') === null || !isset($active[$request->getData('id')])) {
|
if ($request->getData('id') === null || !isset($active[$request->getData('id')])) {
|
||||||
return $this->viewHelpModuleList();
|
return $this->viewHelpModuleList($request, $response, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
$view = new View($this->app, $request, $response);
|
$view = new View($this->app, $request, $response);
|
||||||
$path = $this->getHelpModulePath($request);
|
$path = $this->getHelpModulePath($request);
|
||||||
|
|
||||||
$content = Markdown::parse(\file_get_contents($path));
|
$toParse = \file_get_contents($path);
|
||||||
$navigation = Markdown::parse(\file_get_contents(\realpath(__DIR__ . '/../../' . $request->getData('id') . '/Docs/Help/en/SUMMARY.md')));
|
$summary = \file_get_contents(\realpath(__DIR__ . '/../../' . $request->getData('id') . '/Docs/Help/en/SUMMARY.md'));
|
||||||
|
|
||||||
|
$content = Markdown::parse($toParse === false ? '' : $toParse);
|
||||||
|
$navigation = Markdown::parse($summary === false ? '' : $summary);
|
||||||
|
|
||||||
$view->setTemplate('/Modules/Help/Theme/Backend/help-module');
|
$view->setTemplate('/Modules/Help/Theme/Backend/help-module');
|
||||||
$view->setData('content', $content);
|
$view->setData('content', $content);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user