mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-12 04:23:19 +00:00
Fix issue of plugins autoload at bootstrap.
This commit is contained in:
@@ -330,7 +330,9 @@ class Application extends SilexApplication
|
|||||||
public function loadPlugins()
|
public function loadPlugins()
|
||||||
{
|
{
|
||||||
call_user_func(function ($app) {
|
call_user_func(function ($app) {
|
||||||
|
if (file_exists($app['plugin.path'] . '/services.php')) {
|
||||||
require $app['plugin.path'] . '/services.php';
|
require $app['plugin.path'] . '/services.php';
|
||||||
|
}
|
||||||
}, $this);
|
}, $this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -385,7 +387,10 @@ class Application extends SilexApplication
|
|||||||
$this->extend('twig', function (\Twig_Environment $twig, $app) {
|
$this->extend('twig', function (\Twig_Environment $twig, $app) {
|
||||||
$twig->setCache($app['cache.path'].'/twig');
|
$twig->setCache($app['cache.path'].'/twig');
|
||||||
|
|
||||||
|
$paths = [];
|
||||||
|
if (file_exists($app['plugin.path'] . '/twig-paths.php')) {
|
||||||
$paths = require $app['plugin.path'] . '/twig-paths.php';
|
$paths = require $app['plugin.path'] . '/twig-paths.php';
|
||||||
|
}
|
||||||
|
|
||||||
if ($app['browser']->isTablet() || $app['browser']->isMobile()) {
|
if ($app['browser']->isTablet() || $app['browser']->isMobile()) {
|
||||||
$paths[] = $app['root.path'] . '/config/templates/mobile';
|
$paths[] = $app['root.path'] . '/config/templates/mobile';
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
return require __DIR__ . '/../plugins/autoload.php';
|
require __DIR__ . '/../vendor/autoload.php';
|
||||||
|
if (file_exists(__DIR__ . '/../plugins/autoload.php')) {
|
||||||
|
require __DIR__ . '/../plugins/autoload.php';
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user