Skip to content

Commit

Permalink
Merge branch 'release/5.5.14'
Browse files Browse the repository at this point in the history
  • Loading branch information
mahagr committed Jun 15, 2022
2 parents d0d6173 + 6e3165b commit 271e3ff
Show file tree
Hide file tree
Showing 15 changed files with 214 additions and 192 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# 5.5.14
## 06/15/2022

1. [Common](#common)
1. [](#new)
- Implemented possibility to replace `gantry/theme.yaml` with your own in `custom/` folder (#782, #904, #2578, #3032)
2. [](#bugfix)
- Fixed `Config::flatten()` when the value is not defined or isn't an array
2. [Joomla](#joomla)
1. [](#bugfix)
- Helium / Hydrogen: Fixed deprecated message in PHP 8.1 when `moduleclass_sfx` is not defined in a module

# 5.5.13
## 04/29/2022

Expand Down
261 changes: 134 additions & 127 deletions bin/builder/composer.lock

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions platforms/grav/gantry5/compat/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions platforms/joomla/lib_gantry5/compat/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions platforms/joomla/lib_gantry5/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions platforms/wordpress/gantry5/compat/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 18 additions & 18 deletions platforms/wordpress/gantry5/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/classes/Gantry/Component/Config/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,12 @@ public function setDefaults(array $data)
public function flatten($name = null, $separator = '.', $prefix = '')
{
$element = $name ? $this->offsetGet($name) : $this->items;
if (null === $element) {
return [];
}

if (!is_array($element)) {
return [$name, $element];
return [$name => $element];
}

if (strlen($separator) === 2 && in_array($separator, ['][', ')(', '}{'])) {
Expand Down
2 changes: 1 addition & 1 deletion src/classes/Gantry/Component/Theme/ThemeDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function __construct($theme)
/** @var UniformResourceLocator $locator */
$locator = $gantry['locator'];

$filename = $locator->findResource("gantry-themes://{$theme}/gantry/theme.yaml");
$filename = $locator->findResource("gantry-themes://{$theme}/custom/gantry/theme.yaml") ?: $locator->findResource("gantry-themes://{$theme}/gantry/theme.yaml");
if (!$filename) {
throw new \RuntimeException(sprintf('Theme %s not found', $theme), 404);
}
Expand Down
2 changes: 1 addition & 1 deletion themes/base/joomla/html/layouts/chromes/gantry.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

$moduleTag = $params->get('module_tag', 'div');
$moduleAttribs = [];
$moduleAttribs['class'] = $module->position . ' moduletable ' . htmlspecialchars($params->get('moduleclass_sfx'), ENT_QUOTES, 'UTF-8');
$moduleAttribs['class'] = $module->position . ' moduletable ' . htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_QUOTES, 'UTF-8');
$headerTag = htmlspecialchars($params->get('header_tag', 'h3'), ENT_QUOTES, 'UTF-8');
$headerClass = htmlspecialchars($params->get('header_class', 'g-title'), ENT_QUOTES, 'UTF-8');
$headerAttribs = [];
Expand Down
2 changes: 1 addition & 1 deletion themes/base/joomla/html/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function modChrome_gantry($module, &$params, &$attribs)
$headerClass = ($headerClass) ? ' class="' . htmlspecialchars($headerClass, ENT_COMPAT|ENT_SUBSTITUTE, 'UTF-8') . '"' : '';

if (!empty ($module->content)) : ?>
<<?php echo $moduleTag; ?> class="moduletable <?php echo htmlspecialchars($params->get('moduleclass_sfx'), ENT_COMPAT|ENT_SUBSTITUTE, 'UTF-8') . $moduleClass; ?>">
<<?php echo $moduleTag; ?> class="moduletable <?php echo htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT|ENT_SUBSTITUTE, 'UTF-8') . $moduleClass; ?>">
<?php if ((bool) $module->showtitle) : ?>
<<?php echo $headerTag . $headerClass . '>' . $module->title; ?></<?php echo $headerTag; ?>>
<?php endif; ?>
Expand Down
2 changes: 1 addition & 1 deletion themes/helium/joomla/html/layouts/chromes/gantry.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

$moduleTag = $params->get('module_tag', 'div');
$moduleAttribs = [];
$moduleAttribs['class'] = $module->position . ' moduletable ' . htmlspecialchars($params->get('moduleclass_sfx'), ENT_QUOTES, 'UTF-8');
$moduleAttribs['class'] = $module->position . ' moduletable ' . htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_QUOTES, 'UTF-8');
$headerTag = htmlspecialchars($params->get('header_tag', 'h3'), ENT_QUOTES, 'UTF-8');
$headerClass = htmlspecialchars($params->get('header_class', 'g-title'), ENT_QUOTES, 'UTF-8');
$headerAttribs = [];
Expand Down
2 changes: 1 addition & 1 deletion themes/helium/joomla/html/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function modChrome_gantry($module, &$params, &$attribs)
$headerClass = ($headerClass) ? ' class="' . htmlspecialchars($headerClass, ENT_COMPAT|ENT_SUBSTITUTE, 'UTF-8') . '"' : '';

if (!empty ($module->content)) : ?>
<<?php echo $moduleTag; ?> class="moduletable <?php echo htmlspecialchars($params->get('moduleclass_sfx'), ENT_COMPAT|ENT_SUBSTITUTE, 'UTF-8') . $moduleClass; ?>">
<<?php echo $moduleTag; ?> class="moduletable <?php echo htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT|ENT_SUBSTITUTE, 'UTF-8') . $moduleClass; ?>">
<?php if ((bool) $module->showtitle) : ?>
<<?php echo $headerTag . $headerClass . '>' . $module->title; ?></<?php echo $headerTag; ?>>
<?php endif; ?>
Expand Down
Loading

0 comments on commit 271e3ff

Please sign in to comment.