Compare commits

..

6 commits

Author SHA1 Message Date
rxu
a0ce1503ae
Merge 063f0aec45 into 03031e846d 2025-06-17 13:43:59 +02:00
Marc Alexander
03031e846d Merge branch '3.3.x' 2025-06-17 09:39:08 +00:00
Marc Alexander
9219c03b36
Merge pull request #6831 from rxu/ticket/17527
[ticket/17527] Add Twig extensions existence check while registering
2025-06-17 11:30:52 +02:00
rxu
579b4a8287
[ticket/17527] Add Twig extensions existence check while registering
PHPBB-17527
2025-06-16 22:25:59 +07:00
Marc Alexander
b8c49f9711
Merge branch '3.3.x' 2025-06-16 10:37:08 +02:00
Marc Alexander
2f43c1facd
[ticket/17399] Fix docblock and use space-ship operator
PHPBB-17399
2025-06-16 10:34:38 +02:00
2 changed files with 5 additions and 13 deletions

View file

@ -135,17 +135,6 @@ class language_file_helper
*/ */
private static function sort_by_local_name(mixed $a, mixed $b): int private static function sort_by_local_name(mixed $a, mixed $b): int
{ {
if ($a['local_name'] > $b['local_name']) return $a['local_name'] <=> $b['local_name'];
{
return 1;
}
else if ($a['local_name'] < $b['local_name'])
{
return -1;
}
else
{
return 0;
}
} }
} }

View file

@ -87,9 +87,12 @@ class twig extends \phpbb\template\base
$this->loader = $twig_environment->getLoader(); $this->loader = $twig_environment->getLoader();
foreach ($extensions as $extension) foreach ($extensions as $extension)
{
if (!$this->twig->hasExtension(get_class($extension)))
{ {
$this->twig->addExtension($extension); $this->twig->addExtension($extension);
} }
}
// Add admin namespace // Add admin namespace
if ($this->path_helper->get_adm_relative_path() !== null if ($this->path_helper->get_adm_relative_path() !== null