]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - app/AppKernel.php
Remove fixed relative path for assets
[github/wallabag/wallabag.git] / app / AppKernel.php
index 45f6b795905ea8145357da4f714e01bc402442e6..c065d282ccbce430118a31f42d87c3157c6b53fc 100644 (file)
@@ -58,11 +58,6 @@ class AppKernel extends Kernel
         return $bundles;
     }
 
-    public function getRootDir()
-    {
-        return __DIR__;
-    }
-
     public function getCacheDir()
     {
         return dirname(__DIR__) . '/var/cache/' . $this->getEnvironment();
@@ -75,7 +70,7 @@ class AppKernel extends Kernel
 
     public function registerContainerConfiguration(LoaderInterface $loader)
     {
-        $loader->load($this->getRootDir() . '/config/config_' . $this->getEnvironment() . '.yml');
+        $loader->load($this->getProjectDir() . '/app/config/config_' . $this->getEnvironment() . '.yml');
         $loader->load(function ($container) {
             if ($container->getParameter('use_webpack_dev_server')) {
                 $container->loadFromExtension('framework', [
@@ -84,6 +79,14 @@ class AppKernel extends Kernel
                    ],
                ]);
             }
+            else
+            {
+                $container->loadFromExtension('framework', [
+                    'assets' => [
+                        'base_url' => $container->getParameter('domain_name'),
+                    ]
+                ]);
+            }
         });
     }
 }