Skip to content

Commit

Permalink
Merge remote-tracking branch 'hackwar/5.2-router-cleanuprule' into 5.…
Browse files Browse the repository at this point in the history
…2-router-cleanuprule
  • Loading branch information
Hackwar committed Aug 29, 2024
2 parents 6047bca + f828efd commit c57d285
Show file tree
Hide file tree
Showing 73 changed files with 432 additions and 168 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/create-translation-pull-request-v4.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Create translation pull request
name: Create translation pull request J4

on:
push:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

use Joomla\CMS\Authentication\Authentication;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Event\Extension\AfterJoomlaUpdateEvent;
use Joomla\CMS\Event\Extension\BeforeJoomlaUpdateEvent;
use Joomla\CMS\Extension\ExtensionHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Filter\InputFilter;
Expand Down Expand Up @@ -580,7 +582,7 @@ public function createUpdateFile($basename = null): bool
$app = Factory::getApplication();

// Trigger event before joomla update.
$app->triggerEvent('onJoomlaBeforeUpdate');
$app->getDispatcher()->dispatch('onJoomlaBeforeUpdate', new BeforeJoomlaUpdateEvent('onJoomlaBeforeUpdate'));

// Get the absolute path to site's root.
$siteroot = JPATH_SITE;
Expand Down Expand Up @@ -890,7 +892,8 @@ public function cleanUp()
$app = Factory::getApplication();

// Trigger event after joomla update.
$app->triggerEvent('onJoomlaAfterUpdate');
// @TODO: The event dispatched twice, here and at the end of current method. One of it should be removed.
$app->getDispatcher()->dispatch('onJoomlaAfterUpdate', new AfterJoomlaUpdateEvent('onJoomlaAfterUpdate'));

// Remove the update package.
$tempdir = $app->get('tmp_path');
Expand Down Expand Up @@ -920,7 +923,9 @@ public function cleanUp()
$oldVersion = $app->getUserState('com_joomlaupdate.oldversion');

// Trigger event after joomla update.
$app->triggerEvent('onJoomlaAfterUpdate', [$oldVersion]);
$app->getDispatcher()->dispatch('onJoomlaAfterUpdate', new AfterJoomlaUpdateEvent('onJoomlaAfterUpdate', [
'oldVersion' => $oldVersion ?: '',
]));
$app->setUserState('com_joomlaupdate.oldversion', null);

try {
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_menus/src/Model/MenuModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ protected function populateState()
*
* @since 1.6
*/
public function &getItem($itemId = null)
public function getItem($itemId = null)
{
$itemId = (!empty($itemId)) ? $itemId : (int) $this->getState('menu.id');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ protected function populateState()
*
* @since 1.6
*/
public function &getItem()
public function getItem()
{
$item = new CMSObject();
$userid = (int) $this->getState('user.id');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function getItems()
->bind(':clientid', $clientId, ParameterType::INTEGER);

if ($search) {
$search = '%' . str_replace(' ', '%', trim($search), true) . '%';
$search = '%' . str_replace(' ', '%', trim($search)) . '%';
$query->where($db->quoteName('position') . ' LIKE :position')
->bind(':position', $search);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ protected function populateState()
*
* @since 1.6
*/
public function &getTemplate()
public function getTemplate()
{
if (empty($this->template)) {
$pk = (int) $this->getState('extension.id');
Expand Down
3 changes: 2 additions & 1 deletion components/com_contact/src/Controller/ContactController.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ private function _sendEmail($data, $contact, $emailCopyToSender)
$mailer->addRecipient($contact->email_to);
$mailer->setReplyTo($templateData['email'], $templateData['name']);
$mailer->addTemplateData($templateData);
$mailer->addUnsafeTags(['name', 'email', 'body', 'customfields']);
$mailer->addUnsafeTags(['name', 'email', 'body']);
$sent = $mailer->send();

// If we are supposed to copy the sender, do so.
Expand All @@ -292,6 +292,7 @@ private function _sendEmail($data, $contact, $emailCopyToSender)
$mailer->addRecipient($templateData['email']);
$mailer->setReplyTo($templateData['email'], $templateData['name']);
$mailer->addTemplateData($templateData);
$mailer->addUnsafeTags(['name', 'email', 'body']);
$sent = $mailer->send();
}
} catch (MailDisabledException | phpMailerException $exception) {
Expand Down
2 changes: 1 addition & 1 deletion components/com_content/src/View/Archive/HtmlView.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public function display($tpl = null)
$this->pagination->setAdditionalUrlParam('month', $state->get('filter.month'));
$this->pagination->setAdditionalUrlParam('year', $state->get('filter.year'));
$this->pagination->setAdditionalUrlParam('filter-search', $state->get('list.filter'));
$this->pagination->setAdditionalUrlParam('catid', $app->input->get('catid', [], 'array'));
$this->pagination->setAdditionalUrlParam('catid', $app->getInput()->get->get('catid', [], 'array'));

$this->_prepareDocument();

Expand Down
6 changes: 5 additions & 1 deletion components/com_finder/src/View/Search/HtmlView.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ public function display($tpl = null)
// Flag indicates to not add limitstart=0 to URL
$this->pagination->hideEmptyLimitstart = true;

$input = $app->getInput()->get;

// Add additional parameters
$queryParameterList = [
'f' => 'int',
Expand All @@ -164,10 +166,12 @@ public function display($tpl = null)
'd2' => 'string',
'w1' => 'string',
'w2' => 'string',
'o' => 'word',
'od' => 'word',
];

foreach ($queryParameterList as $parameter => $filter) {
$value = $app->input->get($parameter, null, $filter);
$value = $input->get($parameter, null, $filter);

if (\is_null($value)) {
continue;
Expand Down
1 change: 1 addition & 0 deletions components/com_users/src/Model/RegistrationModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,7 @@ public function register($temp)
$mailer = new MailTemplate('com_users.registration.admin.new_notification', $app->getLanguage()->getTag());
$mailer->addTemplateData($data);
$mailer->addRecipient($row->email);
$mailer->addUnsafeTags(['username', 'name']);
$return = $mailer->send();
} catch (\Exception $exception) {
try {
Expand Down
4 changes: 2 additions & 2 deletions installation/language/af-ZA/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<metafile client="installation">
<name>Afrikaans (Suid-Afrika)</name>
<version>5.1.3</version>
<creationDate>2024-07</creationDate>
<version>5.1.4</version>
<creationDate>2024-08</creationDate>
<author>Afrikaans Translation Team</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
Expand Down
4 changes: 2 additions & 2 deletions installation/language/ar-AA/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<metafile client="installation">
<name>Arabic (اللغة العربية)</name>
<version>5.1.3</version>
<creationDate>2024-07</creationDate>
<version>5.1.4</version>
<creationDate>2024-08</creationDate>
<author>Dr. Ashraf Damra</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
Expand Down
4 changes: 2 additions & 2 deletions installation/language/be-BY/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<metafile client="installation">
<name>Belarusian (Belarus)</name>
<version>5.1.3</version>
<creationDate>2024-07</creationDate>
<version>5.1.4</version>
<creationDate>2024-08</creationDate>
<author>Joomla Belarus Community</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
Expand Down
4 changes: 2 additions & 2 deletions installation/language/bg-BG/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<metafile client="installation">
<name>Bulgarian (bg-BG)</name>
<version>5.1.3</version>
<creationDate>2024-07</creationDate>
<version>5.1.4</version>
<creationDate>2024-08</creationDate>
<author>Joomla! Bulgaria</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
Expand Down
4 changes: 2 additions & 2 deletions installation/language/ca-ES/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<metafile client="installation">
<name>Catalan (ca-ES)</name>
<version>5.1.3</version>
<creationDate>2024-07</creationDate>
<version>5.1.4</version>
<creationDate>2024-08</creationDate>
<author>Catalan [ca-ES] Translation Team</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
Expand Down
4 changes: 2 additions & 2 deletions installation/language/cs-CZ/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<metafile client="installation">
<name>Czech (Čeština)</name>
<version>5.1.3</version>
<creationDate>2024-07</creationDate>
<version>5.1.4</version>
<creationDate>2024-08</creationDate>
<author>Czech Translation Team</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
Expand Down
4 changes: 2 additions & 2 deletions installation/language/cy-GB/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<metafile client="installation">
<name>Welsh (United Kingdom)</name>
<version>5.1.3</version>
<creationDate>2024-07</creationDate>
<version>5.1.4</version>
<creationDate>2024-08</creationDate>
<author>Joomla! Project - Welsh Translation Team</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
Expand Down
4 changes: 2 additions & 2 deletions installation/language/da-DK/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<metafile client="installation">
<name>Danish (Danmark)</name>
<version>5.1.3</version>
<creationDate>2024-07</creationDate>
<version>5.1.4</version>
<creationDate>2024-08</creationDate>
<author>Danish Translation Team (Transl.: Ronny Buelund)</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
Expand Down
4 changes: 2 additions & 2 deletions installation/language/el-GR/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<metafile client="installation">
<name>Greek (el-GR)</name>
<version>5.1.3</version>
<creationDate>2024-07</creationDate>
<version>5.1.4</version>
<creationDate>2024-08</creationDate>
<author>Ομάδα Μετάφρασης: joomla. gr</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
Expand Down
4 changes: 2 additions & 2 deletions installation/language/en-AU/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<metafile client="installation">
<name>English (Australia)</name>
<version>5.1.3</version>
<creationDate>2024-07</creationDate>
<version>5.1.4</version>
<creationDate>2024-08</creationDate>
<author>Joomla! Project</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
Expand Down
4 changes: 2 additions & 2 deletions installation/language/en-CA/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<metafile client="installation">
<name>English (Canada)</name>
<version>5.1.3</version>
<creationDate>2024-07</creationDate>
<version>5.1.4</version>
<creationDate>2024-08</creationDate>
<author>Joomla! Project</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
Expand Down
4 changes: 2 additions & 2 deletions installation/language/en-NZ/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<metafile client="installation">
<name>English (New Zealand)</name>
<version>5.1.3</version>
<creationDate>2024-07</creationDate>
<version>5.1.4</version>
<creationDate>2024-08</creationDate>
<author>Joomla! Project</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
Expand Down
4 changes: 2 additions & 2 deletions installation/language/en-US/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<metafile client="installation">
<name>English (United States)</name>
<version>5.1.3</version>
<creationDate>2024-07</creationDate>
<version>5.1.4</version>
<creationDate>2024-08</creationDate>
<author>Joomla! Project</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
Expand Down
4 changes: 2 additions & 2 deletions installation/language/es-ES/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<metafile client="installation">
<name>Spanish (es-ES)</name>
<version>5.1.3</version>
<creationDate>2024-07</creationDate>
<version>5.1.4</version>
<creationDate>2024-08</creationDate>
<author>Spanish [es-ES] Translation Team</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
Expand Down
4 changes: 2 additions & 2 deletions installation/language/et-EE/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<metafile client="installation">
<name>Estonian</name>
<version>5.1.3</version>
<creationDate>2024-07</creationDate>
<version>5.1.4</version>
<creationDate>2024-08</creationDate>
<author>Joomla! Project</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
Expand Down
4 changes: 2 additions & 2 deletions installation/language/eu-ES/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<metafile client="installation">
<name>Basque</name>
<version>5.1.3</version>
<creationDate>2024-07</creationDate>
<version>5.1.4</version>
<creationDate>2024-08</creationDate>
<author>Joomla! Basque Translation Team</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
Expand Down
4 changes: 2 additions & 2 deletions installation/language/fa-AF/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<metafile client="installation">
<name>فارسی (دری)</name>
<version>5.1.3</version>
<creationDate>2024-07</creationDate>
<version>5.1.4</version>
<creationDate>2024-08</creationDate>
<author>JoomlaPersian Translation Team</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
Expand Down
4 changes: 2 additions & 2 deletions installation/language/fa-IR/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<metafile client="installation">
<name>Persian (fa-IR)</name>
<version>5.1.3</version>
<creationDate>2024-07</creationDate>
<version>5.1.4</version>
<creationDate>2024-08</creationDate>
<author>Persian Translation Team: joomlafarsi.com</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
Expand Down
4 changes: 2 additions & 2 deletions installation/language/fi-FI/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<metafile client="installation">
<name>Finnish (Finland)</name>
<version>5.1.3</version>
<creationDate>2024-07</creationDate>
<version>5.1.4</version>
<creationDate>2024-08</creationDate>
<author>Finnish translation team: Joomla.fi</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
Expand Down
4 changes: 2 additions & 2 deletions installation/language/fr-CA/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<metafile client="installation">
<name>French (Canada)</name>
<version>5.1.3</version>
<creationDate>2024-07</creationDate>
<version>5.1.4</version>
<creationDate>2024-08</creationDate>
<author>Joomla! Project - French translation team</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
Expand Down
4 changes: 2 additions & 2 deletions installation/language/fr-FR/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<metafile client="installation">
<name>French (fr-FR)</name>
<version>5.1.3</version>
<creationDate>2024-07</creationDate>
<version>5.1.4</version>
<creationDate>2024-08</creationDate>
<author>Joomla! Project - French translation team</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
Expand Down
4 changes: 2 additions & 2 deletions installation/language/he-IL/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<metafile client="installation">
<name>Hebrew (Israel)</name>
<version>5.1.3</version>
<creationDate>2024-07</creationDate>
<version>5.1.4</version>
<creationDate>2024-08</creationDate>
<author>פרוייקט ג'ומלה</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
Expand Down
4 changes: 2 additions & 2 deletions installation/language/hr-HR/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<metafile client="installation">
<name>Croatian (Croatia)</name>
<version>5.1.3</version>
<creationDate>2024-07</creationDate>
<version>5.1.4</version>
<creationDate>2024-08</creationDate>
<author>Joomla! Hrvatska team</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
Expand Down
Loading

0 comments on commit c57d285

Please sign in to comment.