Fix version display in AboutController and improve log output in CacheCommand; update routing for constant PROJECT_ROOT
This commit is contained in:
@@ -124,7 +124,7 @@ $router->group('', function(Router $router) use ($app, $session, $config) {
|
||||
|
||||
// handle Cache css & js for application
|
||||
$router->get('/cache/@filename', function($filename) use ($app) {
|
||||
$rootdir = (defined('PROJECT_ROOT')) ? PROJECT_ROOT : $app->get('app.project_root');
|
||||
$rootdir = (defined('PROJECT_ROOT')) ? constant('PROJECT_ROOT') : $app->get('app.project_root');
|
||||
$filePath = $rootdir . '/temp/cache/' . $filename;
|
||||
if (file_exists($filePath) && !str_contains($filename, '..')) {
|
||||
$mimeType = 'application/octet-stream';
|
||||
|
||||
Reference in New Issue
Block a user