Actions
Anomalie #1615
ferméUndefined constant GALETTE_TPL_SUBDIR in update mode
Début:
11/01/2022
Echéance:
% réalisé:
100%
Temps estimé:
Version utilisée:
Vote:
Description
When Galette switchs to update mode, some constants are not defined.
All was fixed on a recent demo update using the following patch:
diff --git a/galette/includes/dependencies.php b/galette/includes/dependencies.php
index 7c4aefd3..a7ce0e07 100644
--- a/galette/includes/dependencies.php
+++ b/galette/includes/dependencies.php
@@ -67,6 +67,28 @@ $container->set(
DI\get('Slim\Views\Smarty')
);
$container->set('Slim\Views\Smarty', function (ContainerInterface $c) {
+
+ if (!defined('GALETTE_TPL_SUBDIR')) {
+ define(
+ 'GALETTE_TPL_SUBDIR',
+ 'templates/default/'
+ );
+ }
+
+ if (!defined('_CURRENT_THEME_PATH')) {
+ define(
+ '_CURRENT_THEME_PATH',
+ GALETTE_THEMES_PATH . 'default/'
+ );
+ }
+
+ if (!defined('GALETTE_THEME')) {
+ define(
+ 'GALETTE_THEME',
+ 'themes/default/'
+ );
+ }
+
$view = new \Slim\Views\Smarty(
rtrim(GALETTE_ROOT . GALETTE_TPL_SUBDIR, DIRECTORY_SEPARATOR),
[
Fichiers
Actions