mirror of
https://github.com/grocy/grocy.git
synced 2025-08-14 17:54:40 +00:00
Use absolute URLs everywhere, this should fix #3
This commit is contained in:
@@ -9,8 +9,6 @@ use \Grocy\Services\LocalizationService;
|
||||
class BaseController
|
||||
{
|
||||
public function __construct(\Slim\Container $container) {
|
||||
$this->AppContainer = $container;
|
||||
|
||||
$databaseService = new DatabaseService();
|
||||
$this->Database = $databaseService->GetDbConnection();
|
||||
|
||||
@@ -23,6 +21,12 @@ class BaseController
|
||||
{
|
||||
return $localizationService->Localize($text, ...$placeholderValues);
|
||||
});
|
||||
$container->view->set('U', function($relativePath) use($container)
|
||||
{
|
||||
return $container->UrlManager->ConstructUrl($relativePath);
|
||||
});
|
||||
|
||||
$this->AppContainer = $container;
|
||||
}
|
||||
|
||||
protected $AppContainer;
|
||||
|
Reference in New Issue
Block a user