Skip to content

Commit

Permalink
Merge tag 'psr12anchor' into psr12/merge/28508
Browse files Browse the repository at this point in the history
  • Loading branch information
joomla-bot committed Jun 27, 2022
2 parents 535cb68 + 170f91a commit 8443201
Show file tree
Hide file tree
Showing 146 changed files with 5,513 additions and 2,216 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Expand Up @@ -44,7 +44,7 @@ install:
- choco install composer
- cd C:\projects\joomla-cms
- refreshenv
- composer install --no-progress --profile
- composer install --no-progress --profile --ignore-platform-req=ext-sodium
before_test:
# Database setup for MySQL via PowerShell tools
- >
Expand Down
5 changes: 1 addition & 4 deletions .drone.yml
Expand Up @@ -59,7 +59,6 @@ steps:
- name: php81-unit
depends_on: [ phpcs ]
image: joomlaprojects/docker-images:php8.1
failure: ignore
commands:
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Unit
Expand Down Expand Up @@ -88,7 +87,6 @@ steps:
- name: php80-integration
depends_on: [ npm ]
image: joomlaprojects/docker-images:php8.0
failure: ignore
commands:
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Integration
Expand Down Expand Up @@ -131,7 +129,6 @@ steps:
- name: php80-integration-pgsql
depends_on: [ npm ]
image: joomlaprojects/docker-images:php8.0
failure: ignore
commands:
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist
Expand Down Expand Up @@ -478,6 +475,6 @@ trigger:

---
kind: signature
hmac: 234ae9e7e2fbfa114ba754c68056dec518c76a93de2f5b098f569e355b50cc1b
hmac: d5db8148323f0205a8c0cd165da3934f5a77b25f73862d09ead95d3c42f1df01

...
5 changes: 5 additions & 0 deletions .github/workflows/create-translation-pull-request-v4.yml
Expand Up @@ -10,8 +10,13 @@ on:
# Run daily at 7:26
- cron: '26 7 * * *'

permissions:
contents: read

jobs:
build:
permissions:
contents: write # for Git to git push
runs-on: ubuntu-latest
# Only run this action the translation-bot repository in the translation branch
if: ${{ github.repository == 'joomla-translation-bot/joomla-cms' && github.ref == 'refs/heads/translation' }}
Expand Down
11 changes: 11 additions & 0 deletions administrator/components/com_admin/script.php
Expand Up @@ -6477,6 +6477,14 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
'/plugins/twofactorauth/yubikey/tmpl/form.php',
'/plugins/twofactorauth/yubikey/yubikey.php',
'/plugins/twofactorauth/yubikey/yubikey.xml',
// From 4.2.0-beta1 to 4.2.0-beta2
'/layouts/plugins/user/profile/fields/dob.php',
'/modules/mod_articles_latest/mod_articles_latest.php',
'/plugins/behaviour/taggable/taggable.php',
'/plugins/behaviour/versionable/versionable.php',
'/plugins/task/requests/requests.php',
'/plugins/task/sitestatus/sitestatus.php',
'/plugins/user/profile/src/Field/DobField.php',
);

$folders = array(
Expand Down Expand Up @@ -7838,6 +7846,9 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
'/plugins/twofactorauth/totp',
'/plugins/twofactorauth',
'/libraries/vendor/nyholm/psr7/doc',
// From 4.2.0-beta1 to 4.2.0-beta2
'/layouts/plugins/user/profile/fields',
'/layouts/plugins/user/profile',
);

$status['files_checked'] = $files;
Expand Down
@@ -0,0 +1,3 @@
-- See https://github.com/joomla/joomla-cms/pull/38092
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`, `ordering`, `state`) VALUES
(0, 'plg_system_shortcut', 'plugin', 'shortcut', 'system', 0, 1, 1, 0, 1, '', '', '', 0, 0);
@@ -0,0 +1,3 @@
-- See https://github.com/joomla/joomla-cms/pull/38092
INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "locked", "manifest_cache", "params", "custom_data", "ordering", "state") VALUES
(0, 'plg_system_shortcut', 'plugin', 'shortcut', 'system', 0, 1, 1, 0, 1, '', '', '', 0, 0);
2 changes: 2 additions & 0 deletions administrator/components/com_banners/forms/filter_tracks.xml
Expand Up @@ -63,6 +63,7 @@
hint="COM_BANNERS_BEGIN_HINT"
format="%Y-%m-%d"
filter="user_utc"
onchange="this.form.submit();"
/>

<field
Expand All @@ -72,6 +73,7 @@
hint="COM_BANNERS_END_HINT"
format="%Y-%m-%d"
filter="user_utc"
onchange="this.form.submit();"
/>
</fields>
<fields name="list">
Expand Down
12 changes: 9 additions & 3 deletions administrator/components/com_contact/src/Table/ContactTable.php
Expand Up @@ -110,10 +110,16 @@ public function store($updateNulls = true)
}

// Store utf8 email as punycode
$this->email_to = PunycodeHelper::emailToPunycode($this->email_to);
if ($this->email_to !== null)
{
$this->email_to = PunycodeHelper::emailToPunycode($this->email_to);
}

// Convert IDN urls to punycode
$this->webpage = PunycodeHelper::urlToPunycode($this->webpage);
if ($this->webpage !== null)
{
$this->webpage = PunycodeHelper::urlToPunycode($this->webpage);
}

// Verify that the alias is unique
$table = Table::getInstance('ContactTable', __NAMESPACE__ . '\\', array('dbo' => $this->getDbo()));
Expand Down Expand Up @@ -151,7 +157,7 @@ public function check()

$this->default_con = (int) $this->default_con;

if (InputFilter::checkAttribute(array('href', $this->webpage)))
if ($this->webpage !== null && InputFilter::checkAttribute(array('href', $this->webpage)))
{
$this->setError(Text::_('COM_CONTACT_WARNING_PROVIDE_VALID_URL'));

Expand Down
Expand Up @@ -11,7 +11,6 @@

\defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Router\Route;

Expand Down Expand Up @@ -78,8 +77,8 @@ public function addModule()
$position = 'cpanel';
}

Factory::getApplication()->setUserState('com_modules.modules.filter.position', $position);
Factory::getApplication()->setUserState('com_modules.modules.client_id', '1');
$this->app->setUserState('com_modules.modules.filter.position', $position);
$this->app->setUserState('com_modules.modules.client_id', '1');

$this->setRedirect(Route::_('index.php?option=com_modules&view=select&tmpl=component&layout=modal' . $appendLink, false));
}
Expand Down
Expand Up @@ -11,7 +11,6 @@

\defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\CMS\Plugin\PluginHelper;
Expand Down
Expand Up @@ -178,10 +178,10 @@ public function batch()
try
{
// Trigger the onBeforeIndex event.
Factory::getApplication()->triggerEvent('onBeforeIndex');
$this->app->triggerEvent('onBeforeIndex');

// Trigger the onBuildIndex event.
Factory::getApplication()->triggerEvent('onBuildIndex');
$this->app->triggerEvent('onBuildIndex');

// Get the indexer state.
$state = Indexer::getState();
Expand Down
Expand Up @@ -315,7 +315,7 @@ public function index($item, $format = 'html')
$item->end_date = (int) $item->end_date != 0 ? $item->end_date : null;

// Prepare the item description.
$item->description = Helper::parse($item->summary);
$item->description = Helper::parse($item->summary ?? '');

/*
* Now, we need to enter the item into the links table. If the item
Expand Down
Expand Up @@ -152,6 +152,14 @@ protected function getLanguages()
}

$updateSiteXML = simplexml_load_string($response->body);

if (!$updateSiteXML)
{
Factory::getApplication()->enqueueMessage(Text::sprintf('COM_INSTALLER_MSG_ERROR_CANT_RETRIEVE_XML', $updateSite), 'error');

return;
}

$languages = array();
$search = strtolower($this->getState('filter.search'));

Expand Down
4 changes: 2 additions & 2 deletions administrator/components/com_joomlaupdate/extract.php
Expand Up @@ -1946,7 +1946,7 @@ function getConfiguration(): ?array
* Sets the PHP timeout to 3600 seconds
*
* @return void
* @since __DEPLOY_VERSION__
* @since 4.2.0
*/
function setLongTimeout()
{
Expand All @@ -1962,7 +1962,7 @@ function setLongTimeout()
* Sets the memory limit to 1GiB
*
* @return void
* @since __DEPLOY_VERSION__
* @since 4.2.0
*/
function setHugeMemoryLimit()
{
Expand Down
Expand Up @@ -588,7 +588,7 @@ public function fetchExtensionCompatibility()
* Called by the Joomla Update JavaScript (PreUpdateChecker.checkNextChunk).
*
* @return void
* @since __DEPLOY_VERSION__
* @since 4.2.0
*
*/
public function batchextensioncompatibility()
Expand Down
Expand Up @@ -119,15 +119,15 @@ class HtmlView extends BaseHtmlView
* Should I disable the confirmation checkbox for pre-update extension version checks?
*
* @var boolean
* @since __DEPLOY_VERSION__
* @since 4.2.0
*/
protected $noVersionCheck = false;

/**
* Should I disable the confirmation checkbox for taking a backup before updating?
*
* @var boolean
* @since __DEPLOY_VERSION__
* @since 4.2.0
*/
protected $noBackupCheck = false;

Expand Down
Expand Up @@ -55,7 +55,7 @@ class HtmlView extends BaseHtmlView
* Should I disable the confirmation checkbox for taking a backup before updating?
*
* @var boolean
* @since __DEPLOY_VERSION__
* @since 4.2.0
*/
protected $noBackupCheck = false;

Expand Down
Expand Up @@ -46,7 +46,7 @@ public function setDefault()
$language = Factory::getLanguage();
$newLang = Language::getInstance($cid);
Factory::$language = $newLang;
Factory::getApplication()->loadLanguage($language = $newLang);
$this->app->loadLanguage($language = $newLang);
$newLang->load('com_languages', JPATH_ADMINISTRATOR);
}

Expand Down Expand Up @@ -101,7 +101,7 @@ public function switchAdminLanguage()
$language = Factory::getLanguage();
$newLang = Language::getInstance($cid);
Factory::$language = $newLang;
Factory::getApplication()->loadLanguage($language = $newLang);
$this->app->loadLanguage($language = $newLang);
$newLang->load('com_languages', JPATH_ADMINISTRATOR);

$msg = Text::sprintf('COM_LANGUAGES_MSG_SWITCH_ADMIN_LANGUAGE_SUCCESS', $languageName);
Expand Down
Expand Up @@ -3,15 +3,18 @@
class="media-browser-select"
:aria-label="translate('COM_MEDIA_TOGGLE_SELECT_ITEM')"
:title="translate('COM_MEDIA_TOGGLE_SELECT_ITEM')"
tabindex="0"
@focusin="focused(true)"
@focusout="focused(false)"
/>
<div
class="media-browser-actions"
:class="{ active: showActions }"
>
<media-browser-action-item-toggle
ref="actionToggle"
:on-focused="focused"
:main-action="openActions"
@on-focused="focused"
@keyup.up="openLastActions()"
@keyup.down="openActions()"
/>
Expand All @@ -29,6 +32,7 @@
:closing-action="hideActions"
@keyup.up="$refs.actionDelete.$el.focus()"
@keyup.down="$refs.actionDelete.$el.previousElementSibling.focus()"
@keyup.esc="hideActions"
/>
</li>
<li>
Expand All @@ -40,6 +44,7 @@
:closing-action="hideActions"
@keyup.up="$refs.actionPreview.$el.focus()"
@keyup.down="$refs.actionPreview.$el.previousElementSibling.focus()"
@keyup.esc="hideActions"
/>
</li>
<li>
Expand All @@ -61,6 +66,7 @@
? $refs.actionShare.$el.focus()
: $refs.actionShare.$el.previousElementSibling.focus()
"
@keyup.esc="hideActions"
/>
</li>
<li>
Expand All @@ -72,6 +78,7 @@
:closing-action="hideActions"
@keyup.up="$refs.actionRename.$el.focus()"
@keyup.down="$refs.actionRename.$el.previousElementSibling.focus()"
@keyup.esc="hideActions"
/>
</li>
<li>
Expand All @@ -87,6 +94,7 @@
: $refs.actionEdit.$el.previousElementSibling.focus()
"
@keyup.down="$refs.actionDelete.$el.focus()"
@keyup.esc="hideActions"
/>
</li>
<li>
Expand All @@ -106,6 +114,7 @@
? $refs.actionPreview.$el.focus()
: $refs.actionPreview.$el.previousElementSibling.focus()
"
@keyup.esc="hideActions"
/>
</li>
</ul>
Expand All @@ -121,12 +130,12 @@ export default {
name: 'MediaBrowserActionItemsContainer',
props: {
item: { type: Object, default: () => {} },
onFocused: { type: Function, default: () => {} },
edit: { type: Function, default: () => {} },
previewable: { type: Boolean, default: false },
downloadable: { type: Boolean, default: false },
shareable: { type: Boolean, default: false },
},
emits: ['toggle-settings'],
data() {
return {
showActions: false,
Expand Down Expand Up @@ -207,6 +216,9 @@ export default {
editItem() {
this.edit();
},
focused(bool) {
this.$emit('toggle-settings', bool);
},
},
};
</script>
Expand Up @@ -2,6 +2,7 @@
<button
type="button"
class="action-toggle"
tabindex="0"
:aria-label="translate('COM_MEDIA_OPEN_ITEM_ACTIONS')"
:title="translate('COM_MEDIA_OPEN_ITEM_ACTIONS')"
@keyup.enter="openActions()"
Expand All @@ -22,14 +23,14 @@ export default {
name: 'MediaBrowserActionItemToggle',
props: {
mainAction: { type: Function, default: () => {} },
onFocused: { type: Function, default: () => {} },
},
emits: ['on-focused'],
methods: {
openActions() {
this.mainAction();
},
focused(bool) {
this.onFocused(bool);
this.$emit('on-focused', bool);
},
},
};
Expand Down

0 comments on commit 8443201

Please sign in to comment.