Skip to content

Commit

Permalink
Merge branch 'release/5.4.37'
Browse files Browse the repository at this point in the history
  • Loading branch information
mahagr committed Jan 25, 2021
2 parents ffdbb7c + a701c11 commit 8cc5908
Show file tree
Hide file tree
Showing 13 changed files with 481 additions and 105 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# 5.4.37
## 01/25/2020

1. [Joomla](#joomla)
1. [](#bugfix)
- Regression: Fixed FormField issues with Fabrik (#2721)
1. [WordPress](#wordpress)
1. [](#improved)
- Hydrogen/Helium: Load `functions.php` from custom folder (#2723, thanks @Chrissi2812)
- Added options for comments on pages
1. [](#bugfix)
- Fixed WordPress 5.6 `add_theme_support('post-formats')` Notice (#2731)

# 5.4.36
## 10/16/2020

Expand Down
1 change: 1 addition & 0 deletions platforms/grav/gantry5/admin/css-compiled/grav-g-admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
body #admin-main .admin-block { padding: 0; }

#g5-container { font-family: inherit; font-weight: inherit; }
#g5-container .g-colorpicker input { flex-basis: auto; }
#g5-container .button i { margin-right: 0 !important; }
#g5-container .inner-container { margin: 0; box-shadow: none; color: inherit; }
#g5-container form select { -webkit-appearance: menulist; -moz-appearance: menulist; appearance: menulist; }
Expand Down
6 changes: 6 additions & 0 deletions platforms/grav/gantry5/admin/scss/grav-admin/_core.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ body #admin-main .admin-block {
font-family: inherit;
font-weight: inherit;

.g-colorpicker {
input {
flex-basis: auto;
}
}

.button i {
margin-right: 0 !important;
}
Expand Down
47 changes: 23 additions & 24 deletions platforms/joomla/plg_system_gantry5/gantry5.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ public function __construct(&$subject, $config = array())
return;
}

JLoader::register('JFormFieldWarning', __DIR__ . '/fields/warning.php');
if ($this->app->isAdmin()) {
class_exists(JFormFieldWarning::class, true);
}

parent::__construct($subject, $config);
}

Expand Down Expand Up @@ -268,26 +263,30 @@ private function onAfterRouteAdmin()
$option = $input->getCmd('option');
$task = $input->getCmd('task');

$useAssignments = $this->params->get('use_assignments', true);
if ($useAssignments && in_array($option, array('com_templates', 'com_advancedtemplates')) && $task && strpos($task, 'style') === 0) {
// Get all ids.
$cid = $input->post->get('cid', (array) $input->getInt('id'), 'array');

if ($cid) {
$styles = $this->getStyles();
$selected = array_intersect_key($styles, array_flip($cid));

// If no Gantry templates were selected, just let com_templates deal with the request.
if (!$selected) {
return;
}
if (in_array($option, array('com_templates', 'com_advancedtemplates'))) {
JLoader::register('JFormFieldWarning', __DIR__ . '/fields/warning.php');
class_exists(JFormFieldWarning::class, true);

// Special handling for tasks coming from com_template.
if ($task === 'style.edit') {
$theme = reset($selected);
$id = key($selected);
$token = JSession::getFormToken();
$this->app->redirect("index.php?option=com_gantry5&view=configurations/{$id}/styles&theme={$theme}&{$token}=1");
if ($task && strpos($task, 'style') === 0 && $this->params->get('use_assignments', true)) {
// Get all ids.
$cid = $input->post->get('cid', (array)$input->getInt('id'), 'array');

if ($cid) {
$styles = $this->getStyles();
$selected = array_intersect_key($styles, array_flip($cid));

// If no Gantry templates were selected, just let com_templates deal with the request.
if (!$selected) {
return;
}

// Special handling for tasks coming from com_template.
if ($task === 'style.edit') {
$theme = reset($selected);
$id = key($selected);
$token = JSession::getFormToken();
$this->app->redirect("index.php?option=com_gantry5&view=configurations/{$id}/styles&theme={$theme}&{$token}=1");
}
}
}
}
Expand Down

0 comments on commit 8cc5908

Please sign in to comment.