mirror of
https://github.com/Karaka-Management/oms-Help.git
synced 2026-02-14 12:08:40 +00:00
Fix Path bugs after move
This commit is contained in:
parent
54ba3f2bc9
commit
4a36b725b9
|
|
@ -146,7 +146,7 @@ class BackendController extends Controller
|
||||||
$path = $this->getHelpModulePath($request);
|
$path = $this->getHelpModulePath($request);
|
||||||
|
|
||||||
$toParse = \file_get_contents($path);
|
$toParse = \file_get_contents($path);
|
||||||
$summary = \file_get_contents(\realpath(__DIR__ . '/../../' . $request->getData('id') . '/Docs/Help/en/SUMMARY.md'));
|
$summary = \file_get_contents(__DIR__ . '/../../' . $request->getData('id') . '/Docs/Help/en/SUMMARY.md');
|
||||||
|
|
||||||
$content = Markdown::parse($toParse === false ? '' : $toParse);
|
$content = Markdown::parse($toParse === false ? '' : $toParse);
|
||||||
$navigation = Markdown::parse($summary === false ? '' : $summary);
|
$navigation = Markdown::parse($summary === false ? '' : $summary);
|
||||||
|
|
@ -180,7 +180,7 @@ class BackendController extends Controller
|
||||||
$path = \realpath(__DIR__ . '/../../' . $request->getData('id') . '/Docs/introduction.md');
|
$path = \realpath(__DIR__ . '/../../' . $request->getData('id') . '/Docs/introduction.md');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $path;
|
return $path === false ? '' : $path;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -198,8 +198,11 @@ class BackendController extends Controller
|
||||||
$view = new View($this->app, $request, $response);
|
$view = new View($this->app, $request, $response);
|
||||||
$path = $this->getHelpDeveloperPath($request);
|
$path = $this->getHelpDeveloperPath($request);
|
||||||
|
|
||||||
$content = Markdown::parse(\file_get_contents($path));
|
$toParse = \file_get_contents($path);
|
||||||
$navigation = Markdown::parse(\file_get_contents(__DIR__ . '/../../../Developer-Guide/SUMMARY.md'));
|
$summary = \file_get_contents(__DIR__ . '/../../../Developer-Guide/SUMMARY.md');
|
||||||
|
|
||||||
|
$content = Markdown::parse($toParse === false ? '' : $toParse);
|
||||||
|
$navigation = Markdown::parse($summary === false ? '' : $summary);
|
||||||
|
|
||||||
$view->setTemplate('/Modules/Help/Theme/Backend/help-developer');
|
$view->setTemplate('/Modules/Help/Theme/Backend/help-developer');
|
||||||
$view->setData('content', $content);
|
$view->setData('content', $content);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user