Skip to content

Commit 4db71ec

Browse files
committed
Merge branch '4.3-dev' into 4.4-dev
2 parents fa103ee + 17585ed commit 4db71ec

File tree

20 files changed

+175
-35
lines changed

20 files changed

+175
-35
lines changed

administrator/components/com_categories/src/Dispatcher/Dispatcher.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ class Dispatcher extends ComponentDispatcher
3131
*/
3232
protected function checkAccess()
3333
{
34-
$extension = $this->getApplication()->getInput()->getCmd('extension');
34+
$extension = empty($this->getApplication()->getInput()->getCmd('extension'))
35+
? ''
36+
: $this->getApplication()->getInput()->getCmd('extension');
3537

3638
$parts = explode('.', $extension);
3739

administrator/components/com_finder/src/Indexer/Adapter.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ protected function getListQuery($query = null)
633633
*
634634
* @param integer $id The plugin ID
635635
*
636-
* @return string The plugin type
636+
* @return string|null The plugin type
637637
*
638638
* @since 2.5
639639
*/
@@ -643,6 +643,7 @@ protected function getPluginType($id)
643643
$query = $this->db->getQuery(true)
644644
->select($this->db->quoteName('element'))
645645
->from($this->db->quoteName('#__extensions'))
646+
->where($this->db->quoteName('folder') . ' = ' . $this->db->quote('finder'))
646647
->where($this->db->quoteName('extension_id') . ' = ' . (int) $id);
647648
$this->db->setQuery($query);
648649

@@ -877,6 +878,8 @@ protected function pluginDisable($pks)
877878
foreach ($items as $item) {
878879
$this->remove($item);
879880
}
881+
// Stop processing plugins
882+
break;
880883
}
881884
}
882885
}

administrator/components/com_finder/src/Indexer/Query.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ protected function processStaticTaxonomy($filterId)
553553
$query->clear()
554554
->select('t1.id, t1.title, t2.title AS branch')
555555
->from($db->quoteName('#__finder_taxonomy') . ' AS t1')
556-
->join('INNER', $db->quoteName('#__finder_taxonomy') . ' AS t2 ON t2.id = t1.parent_id')
556+
->leftJoin($db->quoteName('#__finder_taxonomy') . ' AS t2 ON t2.lft < t1.lft AND t1.rgt < t2.rgt AND t2.level = 1')
557557
->where('t1.state = 1')
558558
->where('t1.access IN (' . $groups . ')')
559559
->where('t1.id IN (' . implode(',', $filters) . ')')
@@ -617,7 +617,7 @@ protected function processDynamicTaxonomy($filters)
617617
*/
618618
$query->select('t1.id, t1.title, t2.title AS branch')
619619
->from($db->quoteName('#__finder_taxonomy') . ' AS t1')
620-
->join('INNER', $db->quoteName('#__finder_taxonomy') . ' AS t2 ON t2.id = t1.parent_id')
620+
->leftJoin($db->quoteName('#__finder_taxonomy') . ' AS t2 ON t2.lft < t1.lft AND t1.rgt < t2.rgt AND t2.level = 1')
621621
->where('t1.state = 1')
622622
->where('t1.access IN (' . $groups . ')')
623623
->where('t1.id IN (' . implode(',', $filters) . ')')

administrator/components/com_templates/src/Controller/TemplateController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ public function createFile()
479479
$this->setMessage(Text::_('COM_TEMPLATES_INVALID_FILE_TYPE'), 'error');
480480
$url = 'index.php?option=com_templates&view=template&id=' . $id . '&file=' . $file . '&isMedia=' . $this->input->getInt('isMedia', 0);
481481
$this->setRedirect(Route::_($url, false));
482-
} elseif (!preg_match('/^(?!\.)(?!.*\.$)(?!.*\.\.)[a-zA-Z0-9_.]+$/', $name)) {
482+
} elseif (!preg_match('/^(?!\.)(?!.*\.$)(?!.*\.\.)[a-zA-Z0-9_.-]+$/', $name)) {
483483
$this->setMessage(Text::_('COM_TEMPLATES_INVALID_FILE_NAME'), 'error');
484484
$url = 'index.php?option=com_templates&view=template&id=' . $id . '&file=' . $file . '&isMedia=' . $this->input->getInt('isMedia', 0);
485485
$this->setRedirect(Route::_($url, false));
@@ -672,7 +672,7 @@ public function renameFile()
672672
$this->setMessage(Text::_('COM_TEMPLATES_ERROR_RENAME_ASSET_FILE'), 'warning');
673673
$url = 'index.php?option=com_templates&view=template&id=' . $id . '&file=' . $file . '&isMedia=' . $isMedia;
674674
$this->setRedirect(Route::_($url, false));
675-
} elseif (!preg_match('/^(?!\.)(?!.*\.$)(?!.*\.\.)[a-zA-Z0-9_.]+$/', $newName)) {
675+
} elseif (!preg_match('/^(?!\.)(?!.*\.$)(?!.*\.\.)[a-zA-Z0-9_.-]+$/', $newName)) {
676676
$this->setMessage(Text::_('COM_TEMPLATES_INVALID_FILE_NAME'), 'error');
677677
$url = 'index.php?option=com_templates&view=template&id=' . $id . '&file=' . $file . '&isMedia=' . $isMedia;
678678
$this->setRedirect(Route::_($url, false));

administrator/components/com_templates/src/Model/StyleModel.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,9 +395,12 @@ protected function preprocessForm(Form $form, $data, $group = 'content')
395395
$formFile = Path::clean($client->path . '/templates/' . $template . '/templateDetails.xml');
396396

397397
// Load the core and/or local language file(s).
398+
// Default to using parent template language constants
399+
$lang->load('tpl_' . $data->parent, $client->path)
400+
|| $lang->load('tpl_' . $data->parent, $client->path . '/templates/' . $data->parent);
401+
402+
// Apply any, optional, overrides for child template language constants
398403
$lang->load('tpl_' . $template, $client->path)
399-
|| (!empty($data->parent) && $lang->load('tpl_' . $data->parent, $client->path))
400-
|| (!empty($data->parent) && $lang->load('tpl_' . $data->parent, $client->path . '/templates/' . $data->parent))
401404
|| $lang->load('tpl_' . $template, $client->path . '/templates/' . $template);
402405

403406
if (file_exists($formFile)) {

build/media_source/system/js/fields/calendar.es5.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,9 @@
296296

297297
if (window.innerHeight < containerTmp.getBoundingClientRect().bottom + 20) {
298298
containerTmp.style.marginTop = - (containerTmp.getBoundingClientRect().height + this.inputField.getBoundingClientRect().height) + "px";
299-
}
299+
} else {
300+
containerTmp.style.marginTop = 'initial';
301+
}
300302

301303
this.processCalendar();
302304
};

build/media_source/system/js/fields/joomla-field-media.w-c.es6.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ class JoomlaFieldMedia extends HTMLElement {
302302
let type;
303303
this.buttonClearEl.style.display = '';
304304
this.previewElement.innerHTML = '';
305-
const ext = getExtension(value);
305+
const ext = getExtension(value).toLowerCase();
306306

307307
if (supportedExtensions.images.includes(ext)) type = 'images';
308308
if (supportedExtensions.audios.includes(ext)) type = 'audios';

build/media_source/system/js/fields/modal-fields.es5.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,11 @@
143143
iframeDocument = this.contentDocument;
144144

145145
// Validate the child form and update parent form.
146-
if (iframeDocument.getElementById(idFieldId) && iframeDocument.getElementById(idFieldId).value != '0')
147-
{
146+
if (
147+
iframeDocument.getElementById(idFieldId)
148+
&& iframeDocument.getElementById(idFieldId).value != '0'
149+
&& [].slice.call(iframeDocument.querySelectorAll('joomla-alert[type="danger"]')).length == 0
150+
) {
148151
window.processModalParent(fieldPrefix, iframeDocument.getElementById(idFieldId).value, iframeDocument.getElementById(titleFieldId).value);
149152

150153
// If Save & Close (save task), submit the edit close action (so we don't have checked out items).

build/media_source/templates/administrator/atum/scss/vendor/joomla-custom-elements/joomla-alert.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
flex-direction: column;
2222
justify-content: center;
2323
padding: .8rem;
24+
line-height: normal;
2425
color: var(--white);
2526
background: var(--alert-accent-color, var(--template-bg-dark));
2627
align-content: center;

components/com_contact/src/Controller/ContactController.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,23 @@ public function submit()
171171
// Validation succeeded, continue with custom handlers
172172
$results = $this->app->triggerEvent('onValidateContact', [&$contact, &$data]);
173173

174+
$passValidation = true;
175+
174176
foreach ($results as $result) {
175177
if ($result instanceof \Exception) {
176-
return false;
178+
$passValidation = false;
179+
$app->enqueueMessage($result->getMessage(), 'error');
177180
}
178181
}
179182

183+
if (!$passValidation) {
184+
$app->setUserState('com_contact.contact.data', $data);
185+
186+
$this->setRedirect(Route::_('index.php?option=com_contact&view=contact&id=' . $id . '&catid=' . $contact->catid, false));
187+
188+
return false;
189+
}
190+
180191
// Passed Validation: Process the contact plugins to integrate with other applications
181192
$this->app->triggerEvent('onSubmitContact', [&$contact, &$data]);
182193

0 commit comments

Comments
 (0)