diff --git a/config/packages/twig.yaml b/config/packages/twig.yaml deleted file mode 100644 index 05ee15f67e..0000000000 --- a/config/packages/twig.yaml +++ /dev/null @@ -1,4 +0,0 @@ -twig: - paths: - '%kernel.project_dir%/templates': default_path - "%kernel.project_dir%/public": public_path \ No newline at end of file diff --git a/src/Core/Modules/Module.php b/src/Core/Modules/Module.php index aac565c4c9..a75a1894d9 100644 --- a/src/Core/Modules/Module.php +++ b/src/Core/Modules/Module.php @@ -62,7 +62,7 @@ abstract class Module if (!$note->isVisibleTo($user)) { // ^ Ensure user isn't trying to trip us up Log::error('Suspicious activity: user ' . $user->getNickname() . - ' tried to repeat note ' . $note->getId() . + ' tried to interact with note ' . $note->getId() . ', but they shouldn\'t have access to it'); throw new NoSuchNoteException(); } else { diff --git a/src/Kernel.php b/src/Kernel.php index b4ebc57e6c..5341933eac 100644 --- a/src/Kernel.php +++ b/src/Kernel.php @@ -112,6 +112,13 @@ class Kernel extends BaseKernel $loader->load($confDir . '/{services}' . self::CONFIG_EXTS, 'glob'); $loader->load($confDir . '/{services}_' . $this->environment . self::CONFIG_EXTS, 'glob'); + $module_templates = array_merge(glob(INSTALLDIR . '/components/*/templates'), glob(INSTALLDIR . '/plugins/*/templates')); + $templates = ['%kernel.project_dir%/templates' => 'default_path', '%kernel.project_dir%/public' => 'public_path']; + foreach ($module_templates as $t) { + $templates[$t] = null; + } + $container->loadFromExtension('twig', ['paths' => $templates]); + // Overriding doesn't work as we want, overrides the top-most key, do it manually $local_file = INSTALLDIR . '/social.local.yaml'; if (!file_exists($local_file)) {