Skip to content

Commit

Permalink
merge 4.1-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Akshit Rattan authored and Akshit Rattan committed Feb 10, 2022
2 parents 6a71dbf + 8b03613 commit 6d0cb48
Show file tree
Hide file tree
Showing 71 changed files with 2,276 additions and 65 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
use Joomla\CMS\User\UserHelper;
use Joomla\CMS\Version;
use Joomla\Database\ParameterType;
use Joomla\Registry\Registry;
use Joomla\Utilities\ArrayHelper;

/**
Expand Down Expand Up @@ -364,13 +365,39 @@ public function download()
$updateInfo = $this->getUpdateInformation();
$packageURL = trim($updateInfo['object']->downloadurl->_data);
$sources = $updateInfo['object']->get('downloadSources', array());
$headers = get_headers($packageURL, 1);

// We have to manually follow the redirects here so we set the option to false.
$httpOptions = new Registry;
$httpOptions->set('follow_location', false);

try
{
$head = HttpFactory::getHttp($httpOptions)->head($packageURL);
}
catch (\RuntimeException $e)
{
// Passing false here -> download failed message
$response['basename'] = false;

return $response;
}

// Follow the Location headers until the actual download URL is known
while (isset($headers['Location']))
while (isset($head->headers['location']))
{
$packageURL = $headers['Location'];
$headers = get_headers($packageURL, 1);
$packageURL = (string) $head->headers['location'][0];

try
{
$head = HttpFactory::getHttp($httpOptions)->head($packageURL);
}
catch (\RuntimeException $e)
{
// Passing false here -> download failed message
$response['basename'] = false;

return $response;
}
}

// Remove protocol, path and query string from URL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class CronField extends ListField
private const OPTIONS_RANGE = [
'minutes' => [0, 59],
'hours' => [0, 23],
'days_week' => [0, 6],
'days_week' => [1, 7],
'days_month' => [1, 31],
'months' => [1, 12],
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ private function buildExecutionRules(array $executionRules): array
$buildExpression = sprintf($intervalStringMap[$intervalType], $interval);
}

if ($ruleClass === 'cron')
if ($ruleClass === 'cron-expression')
{
// ! custom matches are disabled in the form
$matches = $executionRules['cron-expression'];
Expand Down
2 changes: 1 addition & 1 deletion administrator/manifests/files/joomla.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<authorUrl>www.joomla.org</authorUrl>
<copyright>(C) 2019 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<version>4.1.0-rc3-dev</version>
<version>4.1.0-rc5-dev</version>
<creationDate>February 2022</creationDate>
<description>FILES_JOOMLA_XML_DESCRIPTION</description>

Expand Down
8 changes: 4 additions & 4 deletions components/com_privacy/src/Model/RequestModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function createRequest($data)
return false;
}

$email = Factory::getUser()->email;
$data['email'] = Factory::getUser()->email;

// Search for an open information request matching the email and type
$db = $this->getDbo();
Expand All @@ -98,7 +98,7 @@ public function createRequest($data)
->where($db->quoteName('email') . ' = :email')
->where($db->quoteName('request_type') . ' = :requesttype')
->whereIn($db->quoteName('status'), [0, 1])
->bind(':email', $email)
->bind(':email', $data['email'])
->bind(':requesttype', $data['request_type']);

try
Expand Down Expand Up @@ -139,7 +139,7 @@ public function createRequest($data)

$messageModel->notifySuperUsers(
Text::_('COM_PRIVACY_ADMIN_NOTIFICATION_USER_CREATED_REQUEST_SUBJECT'),
Text::sprintf('COM_PRIVACY_ADMIN_NOTIFICATION_USER_CREATED_REQUEST_MESSAGE', $email)
Text::sprintf('COM_PRIVACY_ADMIN_NOTIFICATION_USER_CREATED_REQUEST_MESSAGE', $data['email'])
);

// The mailer can be set to either throw Exceptions or return boolean false, account for both
Expand Down Expand Up @@ -174,7 +174,7 @@ public function createRequest($data)
}

$mailer->addTemplateData($templateData);
$mailer->addRecipient($email);
$mailer->addRecipient($data['email']);

$mailer->send();

Expand Down
275 changes: 275 additions & 0 deletions installation/language/af-ZA/joomla.ini

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions installation/language/af-ZA/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<metafile client="installation">
<name>Afrikaans (Suid-Afrika)</name>
<version>4.1.0</version>
<creationDate>February 2022</creationDate>
<author>Joomla! Projek</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<files>
<filename>joomla.ini</filename>
</files>
<metadata>
<name>Afrikaans (af-ZA)</name>
<nativeName>Afrikaans (Suid-Afrika)</nativeName>
<tag>af-ZA</tag>
<rtl>0</rtl>
</metadata>
<params/>
</metafile>
2 changes: 1 addition & 1 deletion installation/language/ar-AA/langmetadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<metafile client="installation">
<name>Arabic (اللغة العربية)</name>
<version>4.1.0</version>
<creationDate>January 2022</creationDate>
<creationDate>February 2022</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

0 comments on commit 6d0cb48

Please sign in to comment.