mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 09:48:40 +00:00
More ROOT_PATH fixes
This commit is contained in:
parent
04bef943b2
commit
430557d2a5
|
|
@ -108,10 +108,6 @@ class FileLogger implements LoggerInterface
|
|||
$path = realpath($lpath);
|
||||
$this->verbose = $verbose;
|
||||
|
||||
if ($path === false) {
|
||||
throw new PathException($lpath);
|
||||
}
|
||||
|
||||
if (is_dir($lpath) || strpos($lpath, '.') === false) {
|
||||
$path = $path . '/' . date('Y-m-d') . '.log';
|
||||
} else {
|
||||
|
|
@ -266,7 +262,7 @@ class FileLogger implements LoggerInterface
|
|||
|
||||
$backtrace = json_encode($backtrace);
|
||||
|
||||
$replace['{backtrace}'] = str_replace(str_replace('\\', '\\\\'), '', $backtrace);
|
||||
$replace['{backtrace}'] = $backtrace;
|
||||
$replace['{datetime}'] = sprintf('%--19s', (new \DateTime('NOW'))->format('Y-m-d H:i:s'));
|
||||
$replace['{level}'] = sprintf('%--12s', $level);
|
||||
$replace['{path}'] = $_SERVER['REQUEST_URI'] ?? 'REQUEST_URI';
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class ActivateAbstract
|
|||
*/
|
||||
public static function activate(DatabasePool $dbPool, InfoManager $info) /* : void */
|
||||
{
|
||||
self::activateRoutes(ROOT_PATH . '/Web/Routes.php', ROOT_PATH . '/Modules/' . $info->getDirectory() . '/Admin/Routes/http.php');
|
||||
self::activateRoutes(__DIR__ . '/../../Web/Routes.php', __DIR__ . '/../../Modules/' . $info->getDirectory() . '/Admin/Routes/http.php');
|
||||
self::activateInDatabase($dbPool, $info);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class DeactivateAbstract
|
|||
*/
|
||||
public static function deactivate(DatabasePool $dbPool, InfoManager $info) /* : void */
|
||||
{
|
||||
self::deactivateRoutes(ROOT_PATH . '/Web/Routes.php', ROOT_PATH . '/Modules/' . $info->getDirectory() . '/Admin/Routes/http.php');
|
||||
self::deactivateRoutes(__DIR__ . '/../../Web/Routes.php', __DIR__ . '/../../Modules/' . $info->getDirectory() . '/Admin/Routes/http.php');
|
||||
self::deactivateInDatabase($dbPool, $info);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user