More ROOT_PATH fixes

This commit is contained in:
Dennis Eichhorn 2017-04-03 22:47:32 +02:00
parent 04bef943b2
commit 430557d2a5
3 changed files with 3 additions and 7 deletions

View File

@ -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';

View File

@ -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);
}

View File

@ -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);
}