Skip to content

Commit

Permalink
Merge branch '4.2-dev' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Quy committed Jul 27, 2022
2 parents ef54900 + a84ef00 commit 22d1519
Show file tree
Hide file tree
Showing 276 changed files with 21,573 additions and 21,194 deletions.
8 changes: 6 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
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
6 changes: 6 additions & 0 deletions .github/workflows/cacert-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,14 @@ on:
# Runs on the first day of every month at 03:00
- cron: '0 3 1 * *'

permissions:
contents: read

jobs:
build:
permissions:
contents: write # for peter-evans/create-pull-request to create branch
pull-requests: write # for peter-evans/create-pull-request to create a PR
if: (github.event_name == 'schedule' && github.repository == 'joomla/joomla-cms') || (github.event_name != 'schedule')

runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Build Status
---------------------
| Drone-CI | AppVeyor | PHP | Node | npm |
| ------------- | ------------- | ------------- | ------------- | ------------- |
| [![Build Status](https://ci.joomla.org/api/badges/joomla/joomla-cms/status.svg?branch=4.1-dev)](https://ci.joomla.org/joomla/joomla-cms) | [![Build status](https://ci.appveyor.com/api/projects/status/ru6sxal8jmfckvjc/branch/4.1-dev?svg=true)](https://ci.appveyor.com/project/release-joomla/joomla-cms) | [![PHP](https://img.shields.io/badge/PHP-V7.2.5-green)](https://www.php.net/) | [![node-lts](https://img.shields.io/badge/Node-V16.0-green)](https://nodejs.org/en/) | [![npm](https://img.shields.io/badge/npm-v8.6.0-green)](https://nodejs.org/en/) |
| [![Build Status](https://ci.joomla.org/api/badges/joomla/joomla-cms/status.svg?branch=4.2-dev)](https://ci.joomla.org/joomla/joomla-cms) | [![Build status](https://ci.appveyor.com/api/projects/status/ru6sxal8jmfckvjc/branch/4.2-dev?svg=true)](https://ci.appveyor.com/project/release-joomla/joomla-cms) | [![PHP](https://img.shields.io/badge/PHP-V7.2.5-green)](https://www.php.net/) | [![node-lts](https://img.shields.io/badge/Node-V16.0-green)](https://nodejs.org/en/) | [![npm](https://img.shields.io/badge/npm-v8.6.0-green)](https://nodejs.org/en/) |

Overview
---------------------
Expand Down
10 changes: 10 additions & 0 deletions administrator/components/com_admin/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -6428,6 +6428,13 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
'/plugins/task/requests/requests.php',
'/plugins/task/sitestatus/sitestatus.php',
'/plugins/user/profile/src/Field/DobField.php',
// From 4.2.0-beta2 to 4.2.0-beta3
'/plugins/system/webauthn/src/Exception/AjaxNonCmsAppException.php',
'/plugins/system/webauthn/src/Helper/CredentialsCreation.php',
'/plugins/system/webauthn/src/Helper/Joomla.php',
'/plugins/system/webauthn/webauthn.php',
'/plugins/task/checkfiles/checkfiles.php',
'/plugins/task/demotasks/demotasks.php',
);

$folders = array(
Expand Down Expand Up @@ -7792,6 +7799,9 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
// From 4.2.0-beta1 to 4.2.0-beta2
'/layouts/plugins/user/profile/fields',
'/layouts/plugins/user/profile',
// From 4.2.0-beta2 to 4.2.0-beta3
'/plugins/system/webauthn/src/Helper',
'/plugins/system/webauthn/src/Exception',
);

$status['files_checked'] = $files;
Expand Down
Original file line number Diff line number Diff line change
@@ -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'))
)
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
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_fields_menuitem', 'plugin', 'menuitem', 'fields', 0, 1, 1, 0, 1, '', '', '', 0, 0);
Original file line number Diff line number Diff line change
@@ -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'))
)
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
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_fields_menuitem', 'plugin', 'menuitem', 'fields', 0, 1, 1, 0, 1, '', '', '', 0, 0);
1 change: 0 additions & 1 deletion administrator/components/com_categories/forms/category.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
name="asset_id"
type="hidden"
filter="unset"
label="JFIELD_ASSET_ID_LABEL"
/>

<field
Expand Down
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
14 changes: 0 additions & 14 deletions administrator/components/com_fields/forms/field.xml
Original file line number Diff line number Diff line change
Expand Up @@ -328,20 +328,6 @@
<option value="0">JNO</option>
</field>
</fieldset>
<fieldset name="smartsearchoptions" label="COM_FIELDS_FIELD_SMARTSEARCHOPTIONS_HEADING">
<field
name="searchindex"
type="list"
label="COM_FIELDS_FIELD_SEARCHINDEX_LABEL"
default="0"
validate="options"
>
<option value="0">COM_FIELDS_FIELD_SEARCHINDEX_DONT</option>
<option value="1">COM_FIELDS_FIELD_SEARCHINDEX_SEARCHABLE</option>
<option value="2">COM_FIELDS_FIELD_SEARCHINDEX_TAXONOMY</option>
<option value="3">COM_FIELDS_FIELD_SEARCHINDEX_BOTH</option>
</field>
</fieldset>
</fieldset>
</fields>
</form>
1 change: 0 additions & 1 deletion administrator/components/com_fields/tmpl/field/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
<legend><?php echo Text::_('JGLOBAL_FIELDSET_PUBLISHING'); ?></legend>
<div>
<?php echo LayoutHelper::render('joomla.edit.publishingdata', $this); ?>
<?php echo $this->form->renderField('searchindexing'); ?>
</div>
</fieldset>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
Expand Down
8 changes: 0 additions & 8 deletions administrator/components/com_finder/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -308,14 +308,6 @@
<option value="300">J300</option>
</field>

<field
name="memory_table_limit"
type="number"
label="COM_FINDER_CONFIG_MEMORY_TABLE_LIMIT_LABEL"
default="30000"
filter="integer"
/>

<field
name="title_multiplier"
type="number"
Expand Down
35 changes: 0 additions & 35 deletions administrator/components/com_finder/src/Indexer/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Table\Table;
use Joomla\Component\Fields\Administrator\Helper\FieldsHelper;
use Joomla\Registry\Registry;
use Joomla\String\StringHelper;

Expand Down Expand Up @@ -382,40 +381,6 @@ public static function getContentExtras(Result $item)
return true;
}

/**
* Add custom fields for the item to the Result object
*
* @param Result $item Result object to add the custom fields to
* @param string $context Context of the item in the custom fields
*
* @return void
*
* @since 4.2.0
*/
public static function addCustomFields(Result $item, $context)
{
$obj = new \stdClass();
$obj->id = $item->id;

$fields = FieldsHelper::getFields($context, $obj, true);

foreach ($fields as $field) {
$searchindex = $field->params->get('searchindex', 0);

// We want to add this field to the search index
if ($searchindex == 1 || $searchindex == 3) {
$name = 'jsfield_' . $field->name;
$item->$name = $field->value;
$item->addInstruction(Indexer::META_CONTEXT, $name);
}

// We want to add this field as a taxonomy
if (($searchindex == 2 || $searchindex == 3) && $field->value) {
$item->addTaxonomy($field->title, $field->value, $field->state, $field->access, $field->language);
}
}
}

/**
* Method to process content text using the onContentPrepare event trigger.
*
Expand Down

0 comments on commit 22d1519

Please sign in to comment.