mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 09:48:40 +00:00
array loading changed
This commit is contained in:
parent
3f5d562af9
commit
0b77a3811b
|
|
@ -53,12 +53,12 @@ class InstallerAbstract
|
|||
private static function installRoutes(string $appRoutePath, string $moduleRoutePath)
|
||||
{
|
||||
if(file_exists($appRoutePath) && file_exists($moduleRoutePath)) {
|
||||
include $appRoutePath;
|
||||
include $moduleRoutePath;
|
||||
$appRoutes = include $appRoutePath;
|
||||
$moduleRoutes = include $moduleRoutePath;
|
||||
$appRoutes = array_merge_recursive($appRoutes, $moduleRoutes);
|
||||
|
||||
if(is_writable($appRoutePath)) {
|
||||
file_put_contents(ArrayParser::createFile('moduleRoutes', $appRoutes), $appRoutePath);
|
||||
file_put_contents('<?php return ' . ArrayParser::serializeArray($appRoutes), $appRoutePath);
|
||||
} else {
|
||||
throw new PermissionException($appRoutePath);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,8 +52,7 @@ class Router
|
|||
|
||||
public function importFromFile(string $path)
|
||||
{
|
||||
include $path;
|
||||
$this->routes = $appRoutes;
|
||||
$this->routes = include $path;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user