Skip to content

Commit 3fe66e6

Browse files
laoneoMagnus Singerdgrammatikocrystalenkaheelc29
authored
[5.0] Upmerge (#41584)
* fix calendar positioning (#41477) * Update joomla-field-media.w-c.es6.js (#41361) * Fixing md5 Deprecation in document.php (#39880) * modal field check for danger alert (#39173) * fix (#41138) * [4.x] Cassiopeia Install SQL (#37389) * Fix/showon (#37451) * Bugfix for Issue #38599 - Smart Search indexing macros from articles (#38998) * [4,3] joomla alert icons (#39312) * Update StyleModel.php (#40665) * Update Query.php (#40687) * remove hitcount variable from uri after voting (#41474) * Fix deprecated message in categories when extension is empty (#40604) * Re-add minus to allowed filenames in com_templates (#41369) * Invalid delete of all content articles from smart search index (#41288) * [4][cli] schema update check (#40468) * Tags: Don't put NULL into trim() (#41509) Co-authored-by: Quy <[email protected]> * [4] Add multilanguage filter taxonomy rows in com_finder advanced filters (#41470) * Fix taxonomy filter options * refactor rest of query to prepared statements --------- Co-authored-by: Quy <[email protected]> * Check if the pre update check box actually exists (#41467) * Allow onValidateContact plugin to show error message (#37540) * [4.4] Backward compatibility handling for plugins that setting the result directly (#41525) * Backward compatibility handling for plugins that setting the result directly. * Update libraries/src/Event/AbstractImmutableEvent.php Co-authored-by: Brian Teeman <[email protected]> --------- * Tests for com_privacy consent on user site (#41529) * Tests for com_privacy consent on user site * Allow ability to enable extension in tests to prevent errors * remove paramater not needed * Added fixes to stop errors in drone build * Added fixes to stop errors in drone build * Added fixes to stop errors in drone build * [4.4] system test for com_installer (#41483) * system test for com_installer * cs * Missing System Tests in #41362 (#41479) * Update Categories.cy.js * Update Categories.cy.js * Update Categories.cy.js * Update Categories.cy.js * Update Categories.cy.js * Update Categories.cy.js added spaces and semicolons * Update Categories.cy.js Missing spaces and semicolons * Update Categories.cy.js Missing spaces and semicolons * Update Categories.cy.js Missing spaces and semicolons * Update Categories.cy.js removed tabs * Update Categories.cy.js Removed tabs * Update Categories.cy.js Removed tabs * Update Categories.cy.js Removed tabs * Update Language.php (#41353) * Filter for special characters that fail sending test mail (#41469) * Backporting event changes (#41484) Co-authored-by: Allon Moritz <[email protected]> * api tests for endpoints for com_privacy consent (#41544) * Show the plugin name in the update screen (#41537) * Show the plugin name in the update screen * cs --------- * Replace the special characters in site name for mail templates (#41582) * Updates the dependencies (#41538) * Updating dependencies * Major update cypress * Thanks for the reminder @brianteeman * Composer * weekend updates * Update dependencies * Update incompatible HTML file --------- Co-authored-by: Magnus Singer <[email protected]> Co-authored-by: Dimitris Grammatikogiannis <[email protected]> Co-authored-by: Crystal Dionysopoulos <[email protected]> Co-authored-by: heelc29 <[email protected]> Co-authored-by: Denitz <[email protected]> Co-authored-by: Brian Teeman <[email protected]> Co-authored-by: toroworx <[email protected]> Co-authored-by: Martin Carl Kopp <[email protected]> Co-authored-by: Jonathan Brain <[email protected]> Co-authored-by: Olivier Buisard <[email protected]> Co-authored-by: Christiane Maier-Stadtherr <[email protected]> Co-authored-by: Manuel Huber <[email protected]> Co-authored-by: Nicola Galgano <[email protected]> Co-authored-by: Hannes Papenberg <[email protected]> Co-authored-by: Quy <[email protected]> Co-authored-by: David Jardin <[email protected]> Co-authored-by: beefcakefu <[email protected]> Co-authored-by: Fedir Zinchuk <[email protected]> Co-authored-by: andyforrest <[email protected]>
1 parent 872e7a8 commit 3fe66e6

File tree

37 files changed

+912
-8278
lines changed

37 files changed

+912
-8278
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_config/src/Model/ApplicationModel.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1216,7 +1216,8 @@ public function sendTestMail()
12161216
$mailer = new MailTemplate('com_config.test_mail', $user->getParam('language', $app->get('language')), $mail);
12171217
$mailer->addTemplateData(
12181218
[
1219-
'sitename' => $app->get('sitename'),
1219+
// Replace the occurrences of "@" and "|" in the site name
1220+
'sitename' => str_replace(['@', '|'], '', $app->get('sitename')),
12201221
'method' => Text::_('COM_CONFIG_SENDMAIL_METHOD_' . strtoupper($mail->Mailer)),
12211222
]
12221223
);

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ protected function getListQuery($query = null)
651651
*
652652
* @param integer $id The plugin ID
653653
*
654-
* @return string The plugin type
654+
* @return string|null The plugin type
655655
*
656656
* @since 2.5
657657
*/
@@ -661,6 +661,7 @@ protected function getPluginType($id)
661661
$query = $this->db->getQuery(true)
662662
->select($this->db->quoteName('element'))
663663
->from($this->db->quoteName('#__extensions'))
664+
->where($this->db->quoteName('folder') . ' = ' . $this->db->quote('finder'))
664665
->where($this->db->quoteName('extension_id') . ' = ' . (int) $id);
665666
$this->db->setQuery($query);
666667

@@ -895,6 +896,8 @@ protected function pluginDisable($pks)
895896
foreach ($items as $item) {
896897
$this->remove($item);
897898
}
899+
// Stop processing plugins
900+
break;
898901
}
899902
}
900903
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public function tokenise($input)
137137
*
138138
* Regexes:
139139
* 1. Remove everything except letters, numbers, quotes, apostrophe, plus, dash, period, and comma.
140-
* 2. Remove plus, dash, period, and comma characters located before letter characters.
140+
* 2. Remove plus, dash, and comma characters located before letter characters.
141141
* 3. Remove plus, dash, period, and comma characters located after other characters.
142142
* 4. Remove plus, period, and comma characters enclosed in alphabetical characters. Ungreedy.
143143
* 5. Remove orphaned apostrophe, plus, dash, period, and comma characters.
@@ -147,7 +147,7 @@ public function tokenise($input)
147147
*/
148148
$input = StringHelper::strtolower($input);
149149
$input = preg_replace('#[^\pL\pM\pN\p{Pi}\p{Pf}\'+-.,]+#mui', ' ', $input);
150-
$input = preg_replace('#(^|\s)[+-.,]+([\pL\pM]+)#mui', ' $1', $input);
150+
$input = preg_replace('#(^|\s)[+-,]+([\pL\pM]+)#mui', ' $1', $input);
151151
$input = preg_replace('#([\pL\pM\pN]+)[+-.,]+(\s|$)#mui', '$1 ', $input);
152152
$input = preg_replace('#([\pL\pM]+)[+.,]+([\pL\pM]+)#muiU', '$1 $2', $input);
153153
$input = preg_replace('#(^|\s)[\'+-.,]+(\s|$)#mui', ' ', $input);

administrator/components/com_finder/src/Service/HTML/Filter.php

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use Joomla\Component\Finder\Administrator\Helper\LanguageHelper;
1818
use Joomla\Component\Finder\Administrator\Indexer\Query;
1919
use Joomla\Database\DatabaseAwareTrait;
20+
use Joomla\Database\ParameterType;
2021
use Joomla\Filter\OutputFilter;
2122
use Joomla\Registry\Registry;
2223

@@ -292,19 +293,27 @@ public function select($idxQuery, $options)
292293
$query->clear()
293294
->select('t.*')
294295
->from($db->quoteName('#__finder_taxonomy') . ' AS t')
295-
->where('t.lft > ' . (int) $bv->lft)
296-
->where('t.rgt < ' . (int) $bv->rgt)
296+
->where('t.lft > :lft')
297+
->where('t.rgt < :rgt')
297298
->where('t.state = 1')
298-
->where('t.access IN (' . $groups . ')')
299-
->order('t.title');
299+
->whereIn('t.access', $user->getAuthorisedViewLevels())
300+
->order('t.title')
301+
->bind(':lft', $bv->lft, ParameterType::INTEGER)
302+
->bind(':rgt', $bv->rgt, ParameterType::INTEGER);
303+
304+
// Apply multilanguage filter
305+
if (Multilanguage::isEnabled()) {
306+
$language = [Factory::getLanguage()->getTag(), '*'];
307+
$query->whereIn($db->quoteName('t.language'), $language, ParameterType::STRING);
308+
}
300309

301310
// Self-join to get the parent title.
302311
$query->select('e.title AS parent_title')
303312
->join('LEFT', $db->quoteName('#__finder_taxonomy', 'e') . ' ON ' . $db->quoteName('e.id') . ' = ' . $db->quoteName('t.parent_id'));
304313

305314
// Limit the nodes to a predefined filter.
306315
if (!empty($filter->data)) {
307-
$query->where('t.id IN(' . $filter->data . ')');
316+
$query->whereIn('t.id', explode(",", $filter->data));
308317
}
309318

310319
// Load the branches.

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/com_joomlaupdate/js/default.es6.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,7 @@ Joomla = window.Joomla || {};
541541
const pluginTitleTableCell = tableRow.querySelector('.exname');
542542
pluginTitleTableCell.innerHTML = `${Joomla.sanitizeHtml(pluginTitleTableCell.innerHTML)}
543543
<div class="small">
544+
${document.querySelector(`td[data-extension-id="${plugin.extension_id}"]`) ? '' : ` - ${plugin.name}`}
544545
<span class="badge bg-warning">
545546
<span class="icon-warning"></span>
546547
${Joomla.Text._('COM_JOOMLAUPDATE_VIEW_DEFAULT_POTENTIALLY_DANGEROUS_PLUGIN')}
@@ -569,10 +570,15 @@ Joomla = window.Joomla || {};
569570
status = 'warning';
570571
}
571572

572-
if (PreUpdateChecker.nonCoreCriticalPlugins.length === 0 && status === 'success') {
573+
if (PreUpdateChecker.nonCoreCriticalPlugins.length === 0 && status === 'success' && document.getElementById('preupdatecheckbox')) {
573574
document.getElementById('preupdatecheckbox').style.display = 'none';
575+
}
576+
577+
if (PreUpdateChecker.nonCoreCriticalPlugins.length === 0 && status === 'success' && document.getElementById('noncoreplugins')) {
574578
document.getElementById('noncoreplugins').checked = true;
579+
}
575580

581+
if (PreUpdateChecker.nonCoreCriticalPlugins.length === 0 && status === 'success') {
576582
[].slice.call(document.querySelectorAll('button.submitupdate')).forEach((el) => {
577583
el.classList.remove('disabled');
578584
el.removeAttribute('disabled');

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';

0 commit comments

Comments
 (0)