Inject ROOT_PATH in plugin instead of regenerating it everywhere

This commit is contained in:
ArthurHoaro 2020-10-16 13:06:06 +02:00
parent 7f5250421b
commit 3adbdc2a83
7 changed files with 14 additions and 9 deletions
application/front/controller/visitor

View file

@ -106,6 +106,7 @@ abstract class ShaarliVisitorController
'target' => $template,
'loggedin' => $this->container->loginManager->isLoggedIn(),
'basePath' => $this->container->basePath,
'rootPath' => preg_replace('#/index\.php$#', '', $this->container->basePath),
'bookmarkService' => $this->container->bookmarkService
];
}