Skip to content

Commit

Permalink
Merge branch '4.2-dev' into mailtemplate/absolute-urls
Browse files Browse the repository at this point in the history
  • Loading branch information
bembelimen committed Jul 1, 2022
2 parents a2a9e2b + ce5f12c commit 0799bdd
Show file tree
Hide file tree
Showing 174 changed files with 20,750 additions and 20,577 deletions.
8 changes: 6 additions & 2 deletions .editorconfig
Expand Up @@ -5,12 +5,16 @@ root = true

# Unix-style end of lines and a blank line at the end of the file
[*]
indent_style = space
indent_size = 4
indent_style = tab
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.php]
indent_style = space
indent_size = 4

[*.{js,json,scss,css,vue}]
indent_style = space
indent_size = 2
@@ -0,0 +1,9 @@
-- Set core extensions as locked extensions.
UPDATE `#__extensions`
SET `locked` = 1
WHERE (`type` = 'plugin' AND
(
(`folder` = 'system' AND `element` = 'schedulerunner')
OR (`folder` = 'task' AND `element` IN ('checkfiles', 'demotasks', 'requests', 'sitestatus'))
)
);
@@ -0,0 +1,9 @@
-- Set core extensions as locked extensions.
UPDATE "#__extensions"
SET "locked" = 1
WHERE ("type" = 'plugin' AND
(
("folder" = 'system' AND "element" = 'schedulerunner')
OR ("folder" = 'task' AND "element" IN ('checkfiles', 'demotasks', 'requests', 'sitestatus'))
)
);
Expand Up @@ -411,9 +411,7 @@ public function getAssoc()
$hname = $cname . 'HelperAssociation';
\JLoader::register($hname, JPATH_SITE . '/components/' . $component . '/helpers/association.php');

/* @codingStandardsIgnoreStart */
$this->hasAssociation = class_exists($hname) && !empty($hname::$category_association);
/* @codingStandardsIgnoreEnd */
$this->hasAssociation = class_exists($hname) && !empty($hname::$category_association);

return $this->hasAssociation;
}
Expand Down
17 changes: 1 addition & 16 deletions administrator/components/com_content/tmpl/articles/default.php
Expand Up @@ -57,24 +57,9 @@
$workflow_featured = false;

if ($workflow_enabled) :
// @todo move the script to a file
$js = <<<JS
(function() {
document.addEventListener('DOMContentLoaded', function() {
var elements = [].slice.call(document.querySelectorAll('.article-status'));
elements.forEach(function (element) {
element.addEventListener('click', function(event) {
event.stopPropagation();
});
});
});
})();
JS;

$wa->getRegistry()->addExtensionRegistryFile('com_workflow');
$wa->useScript('com_workflow.admin-items-workflow-buttons')
->addInlineScript($js, [], ['type' => 'module']);
->useScript('com_content.articles-status');

$workflow_state = Factory::getApplication()->bootComponent('com_content')->isFunctionalityUsed('core.state', 'com_content.article');
$workflow_featured = Factory::getApplication()->bootComponent('com_content')->isFunctionalityUsed('core.featured', 'com_content.article');
Expand Down
17 changes: 1 addition & 16 deletions administrator/components/com_content/tmpl/featured/default.php
Expand Up @@ -58,24 +58,9 @@
$workflow_featured = false;

if ($workflow_enabled) :
// @todo move the script to a file
$js = <<<JS
(function() {
document.addEventListener('DOMContentLoaded', function() {
var elements = [].slice.call(document.querySelectorAll('.article-status'));
elements.forEach(function (element) {
element.addEventListener('click', function(event) {
event.stopPropagation();
});
});
});
})();
JS;

$wa->getRegistry()->addExtensionRegistryFile('com_workflow');
$wa->useScript('com_workflow.admin-items-workflow-buttons')
->addInlineScript($js, [], ['type' => 'module']);
->useScript('com_content.articles-status');

$workflow_state = Factory::getApplication()->bootComponent('com_content')->isFunctionalityUsed('core.state', 'com_content.article');
$workflow_featured = Factory::getApplication()->bootComponent('com_content')->isFunctionalityUsed('core.featured', 'com_content.article');
Expand Down
20 changes: 10 additions & 10 deletions administrator/components/com_installer/forms/filter_manage.xml
Expand Up @@ -28,16 +28,6 @@
<option value="">COM_INSTALLER_VALUE_CLIENT_SELECT</option>
</field>

<field
name="package_id"
type="package"
label="COM_INSTALLER_MANAGE_FILTER_PACKAGE_ID_LABEL"
description="COM_INSTALLER_MANAGE_FILTER_PACKAGE_ID_DESC"
onchange="this.form.submit();"
>
<option value="">COM_INSTALLER_VALUE_PACKAGE_ID_SELECT</option>
</field>

<field
name="type"
type="type"
Expand All @@ -56,6 +46,16 @@
<option value="">COM_INSTALLER_VALUE_FOLDER_SELECT</option>
</field>

<field
name="package_id"
type="package"
label="COM_INSTALLER_MANAGE_FILTER_PACKAGE_ID_LABEL"
description="COM_INSTALLER_MANAGE_FILTER_PACKAGE_ID_DESC"
onchange="this.form.submit();"
>
<option value="">COM_INSTALLER_VALUE_PACKAGE_ID_SELECT</option>
</field>

<field
name="core"
type="list"
Expand Down
Expand Up @@ -21,7 +21,6 @@
* @return boolean
* @since 4.2.0
*/
// phpcs:ignore
function com_users_postinstall_mfa_condition(): bool
{
return count(PluginHelper::getPlugin('multifactorauth')) < 1;
Expand All @@ -35,7 +34,6 @@ function com_users_postinstall_mfa_condition(): bool
* @return void
* @since 4.2.0
*/
// phpcs:ignore
function com_users_postinstall_mfa_action(): void
{
/** @var DatabaseDriver $db */
Expand Down
Expand Up @@ -208,8 +208,7 @@ function (bool $carry, $result) {
// Update the Last Used, UA and IP columns
$jNow = Date::getInstance();

// phpcs:ignore
$record->last_used = $jNow->toSql();
$record->last_used = $jNow->toSql();
$record->store();

// Flag the user as fully logged in
Expand Down
Expand Up @@ -409,9 +409,7 @@ private function assertValidRecordId($id, ?User $user = null): MfaTable

$record = $model->getRecord($user);

// phpcs:ignore
if (is_null($record) || ($record->id != $id) || ($record->user_id != $user->id))
{
if (is_null($record) || ($record->id != $id) || ($record->user_id != $user->id)) {
throw new RuntimeException(Text::_('JERROR_ALERTNOAUTHOR'), 403);
}

Expand Down
Expand Up @@ -97,8 +97,7 @@ public function disable($cachable = false, $urlparams = []): void
}

// Redirect
// phpcs:ignore
$url = Route::_('index.php?option=com_users&task=methods.display&user_id=' . $userId, false);
$url = Route::_('index.php?option=com_users&task=methods.display&user_id=' . $userId, false);
$returnURL = $this->input->getBase64('returnurl');

if (!empty($returnURL)) {
Expand Down
Expand Up @@ -48,35 +48,31 @@ class CaptiveRenderOptions extends DataShapeObject
* @var string
* @since 4.2.0
*/
// phpcs:ignore
protected $pre_message = '';
protected $pre_message = '';

/**
* How to render the MFA code field. "input" (HTML input element) or "custom" (custom HTML)
*
* @var string
* @since 4.2.0
*/
// phpcs:ignore
protected $field_type = 'input';
protected $field_type = 'input';

/**
* The type attribute for the HTML input box. Typically "text" or "password". Use any HTML5 input type.
*
* @var string
* @since 4.2.0
*/
// phpcs:ignore
protected $input_type = '';
protected $input_type = '';

/**
* Attributes other than type and id which will be added to the HTML input box.
*
* @var array
* @@since 4.2.0
*/
// phpcs:ignore
protected $input_attributes = [];
protected $input_attributes = [];

/**
* Placeholder text for the HTML input box. Leave empty if you don't need it.
Expand Down Expand Up @@ -108,44 +104,39 @@ class CaptiveRenderOptions extends DataShapeObject
* @var string
* @since 4.2.0
*/
// phpcs:ignore
protected $post_message = '';
protected $post_message = '';

/**
* Should I hide the default Submit button?
*
* @var boolean
* @since 4.2.0
*/
// phpcs:ignore
protected $hide_submit = false;
protected $hide_submit = false;

/**
* Additional CSS classes for the submit button (apply the MFA setup)
*
* @var string
* @since 4.2.0
*/
// phpcs:ignore
protected $submit_class = '';
protected $submit_class = '';

/**
* Icon class to use for the submit button
*
* @var string
* @since 4.2.0
*/
// phpcs:ignore
protected $submit_icon = 'icon icon-rightarrow icon-arrow-right';
protected $submit_icon = 'icon icon-rightarrow icon-arrow-right';

/**
* Language key to use for the text on the submit button
*
* @var string
* @since 4.2.0
*/
// phpcs:ignore
protected $submit_text = 'COM_USERS_MFA_VALIDATE';
protected $submit_text = 'COM_USERS_MFA_VALIDATE';

/**
* Is this MFA method validating against all configured authenticators of the same type?
Expand All @@ -161,8 +152,7 @@ class CaptiveRenderOptions extends DataShapeObject
* @var string
* @since 4.2.0
*/
// phpcs:ignore
protected $help_url = '';
protected $help_url = '';

/**
* Setter for the field_type property
Expand All @@ -172,15 +162,14 @@ class CaptiveRenderOptions extends DataShapeObject
* @since 4.2.0
* @throws InvalidArgumentException
*/
// phpcs:ignore
protected function setField_type(string $value)
// phpcs:ignore
protected function setField_type(string $value)
{
if (!in_array($value, [self::FIELD_INPUT, self::FIELD_CUSTOM])) {
throw new InvalidArgumentException('Invalid value for property field_type.');
}

// phpcs:ignore
$this->field_type = $value;
$this->field_type = $value;
}

/**
Expand All @@ -191,8 +180,8 @@ protected function setField_type(string $value)
* @return void
* @@since 4.2.0
*/
// phpcs:ignore
protected function setInput_attributes(array $value)
// phpcs:ignore
protected function setInput_attributes(array $value)
{
$forbiddenAttributes = ['id', 'type', 'name', 'value'];

Expand All @@ -202,7 +191,6 @@ protected function setInput_attributes(array $value)
}
}

// phpcs:ignore
$this->input_attributes = $value;
$this->input_attributes = $value;
}
}

0 comments on commit 0799bdd

Please sign in to comment.