Skip to content

Commit

Permalink
Merge branch 'joomla:4.3-dev' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkRS-UK authored Aug 28, 2023
2 parents 3de0665 + 385b8ff commit 2db4c95
Show file tree
Hide file tree
Showing 161 changed files with 1,070 additions and 382 deletions.
8 changes: 4 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ If it is a PR, include what the issue is, what the PR is addressing, testing ins
Please be patient as not all items will be tested immediately (remember, all bug testing for the Joomla! CMS is done by volunteers) and be receptive to feedback about your code.

#### Branches
PRs should usually be made to the `4.2-dev` branch as this contains the most recent version of the code.
PRs should usually be made to the `4.3-dev` branch as this contains the most recent version of the code.
There are other branches available which serve specific purposes.

| Branch | Purpose |
| ------ | ------- |
| 3.10-dev | Branch for the Joomla 3.x series. The 3.10 series release will now only include security patches. |
| 4.2-dev | Branch for the current minor Joomla version.|
| 4.3-dev | Branch for the next minor Joomla version. New features go into this branch. Commits to 4.2-dev will be applied to this branch as well. |
| 5.0-dev | Branch for the next major Joomla version. |
| 4.3-dev | Branch for the current minor Joomla version.|
| 4.4-dev | Branch for the next minor Joomla version. Commits to 4.3-dev will be applied to this branch as well. |
| 5.0-dev | Branch for the next major Joomla version. New features go into this branch. |
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Overview
* This is the source of Joomla! 4.x.
* Joomla's [Official website](https://www.joomla.org).
* Joomla! 4.3 [version history](https://docs.joomla.org/Special:MyLanguage/Joomla_4.3_version_history).
* Detailed changes are in the [changelog](https://github.com/joomla/joomla-cms/commits/4.2-dev).
* Detailed changes are in the [changelog](https://github.com/joomla/joomla-cms/commits/4.3-dev).

What is Joomla?
---------------------
Expand Down
2 changes: 1 addition & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Joomla! CMS™
* This is a Joomla! 4.x installation/upgrade package.
* Joomla! Official site: https://www.joomla.org
* Joomla! 4.3 version history - https://docs.joomla.org/Special:MyLanguage/Joomla_4.3_version_history
* Detailed changes in the Changelog: https://github.com/joomla/joomla-cms/commits/4.2-dev
* Detailed changes in the Changelog: https://github.com/joomla/joomla-cms/commits/4.3-dev

2- What is Joomla?
* Joomla! is a Content Management System (CMS) which enables you to build websites and powerful online applications.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// phpcs:enable PSR1.Files.SideEffects

/**
* Plugins master display controller.
* Plugins display controller.
*
* @since 4.0.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
// phpcs:enable PSR1.Files.SideEffects

/**
* ComponentDispatcher class for com_admin
* ComponentDispatcher class for com_actionlogs
*
* @since 4.2.7
*/
class Dispatcher extends ComponentDispatcher
{
/**
* com_admin does not require check permission, so we override checkAccess method and have it empty
* Method to check component access permission
*
* @return void
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// phpcs:enable PSR1.Files.SideEffects

/**
* Field to load a list of all users that have logged actions
* Field to load a list of all extensions that have logged actions
*
* @since 3.9.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ protected function renderSection(string $sectionName, array $sectionData, int $l
}

if (\is_int($name) && ($name == 0 || $name == 1)) {
// The term "Master" is used because it is the term used in phpinfo() and this is a text representation of that.
$name = ($name == 0 ? 'Local Value' : 'Master Value');
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// phpcs:enable PSR1.Files.SideEffects

/**
* Banners master display controller.
* Banners display controller.
*
* @since 1.6
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,12 @@ public function getJson()

try {
$data = $model->getData();
$user = $this->app->getIdentity();
} catch (\Exception $e) {
$this->app->enqueueMessage($e->getMessage(), 'error');

return false;
}

$this->userIsSuperAdmin = $user->authorise('core.admin');

// Required data
$requiredData = [
'sitename' => null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ class Dispatcher extends ComponentDispatcher
*/
protected function checkAccess(): void
{
// sendtestmail expects json response, so we leave the method to handle the permission and send response itself
if ($this->input->getCmd('task') === 'application.sendtestmail') {
// sendtestmail and store do their own checks, so leave the method to handle the permission and send response itself
if (in_array($this->input->getCmd('task'), ['application.sendtestmail', 'application.store'], true)) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@
<option value="a.featured DESC">JFEATURED_DESC</option>
<option value="a.published ASC">JSTATUS_ASC</option>
<option value="a.published DESC">JSTATUS_DESC</option>
<option value="a.name ASC">JGLOBAL_TITLE_ASC</option>
<option value="a.name DESC">JGLOBAL_TITLE_DESC</option>
<option value="a.name ASC">JGLOBAL_NAME_ASC</option>
<option value="a.name DESC">JGLOBAL_NAME_DESC</option>
<option value="category_title ASC">JCATEGORY_ASC</option>
<option value="category_title DESC">JCATEGORY_DESC</option>
<option value="ul.name ASC">COM_CONTACT_FIELD_LINKED_USER_LABEL_ASC</option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<?php echo HTMLHelper::_('searchtools.sort', 'JSTATUS', 'a.published', $listDirn, $listOrder); ?>
</th>
<th scope="col">
<?php echo HTMLHelper::_('searchtools.sort', 'JGLOBAL_TITLE', 'a.name', $listDirn, $listOrder); ?>
<?php echo HTMLHelper::_('searchtools.sort', 'COM_CONTACT_FIELD_NAME_LABEL', 'a.name', $listDirn, $listOrder); ?>
</th>
<th scope="col" class="w-10 d-none">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_CONTACT_FIELD_LINKED_USER_LABEL', 'ul.name', $listDirn, $listOrder); ?>
Expand Down
2 changes: 2 additions & 0 deletions administrator/components/com_content/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -509,13 +509,15 @@
name="float_intro"
type="text"
label="COM_CONTENT_IMAGE_INTRO_CLASS_LABEL"
validate="CssIdentifier"
showon="show_urls_images_backend:1[OR]show_urls_images_frontend:1"
/>

<field
name="float_fulltext"
type="text"
label="COM_CONTENT_IMAGE_FULLTEXT_CLASS_LABEL"
validate="CssIdentifier"
showon="show_urls_images_backend:1[OR]show_urls_images_frontend:1"
/>
</fieldset>
Expand Down
2 changes: 2 additions & 0 deletions administrator/components/com_content/forms/article.xml
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,7 @@
label="COM_CONTENT_FIELD_IMAGE_CLASS_LABEL"
description="COM_CONTENT_FIELD_IMAGE_CLASS_DESC"
useglobal="true"
validate="CssIdentifier"
/>

<field
Expand Down Expand Up @@ -780,6 +781,7 @@
label="COM_CONTENT_FIELD_IMAGE_CLASS_LABEL"
description="COM_CONTENT_FIELD_IMAGE_CLASS_DESC"
useglobal="true"
validate="CssIdentifier"
/>

<field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
label="JOPTION_SELECT_STAGE"
class="js-select-submit-on-change"
activeonly="true"
extension="com_content"
extension="com_content.article"
>
<option value="">JOPTION_SELECT_STAGE</option>
</field>
Expand Down
1 change: 1 addition & 0 deletions administrator/components/com_fields/forms/field.xml
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@
label="COM_FIELDS_FIELD_VALUE_RENDER_CLASS_LABEL"
description="COM_FIELDS_FIELD_VALUE_RENDER_CLASS_DESC"
size="40"
validate="CssIdentifier"
/>

<field
Expand Down
33 changes: 17 additions & 16 deletions administrator/components/com_fields/src/Model/GroupModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,29 +240,30 @@ protected function preprocessForm(Form $form, $data, $group = 'content')

$parts = FieldsHelper::extract($this->state->get('filter.context'));

// If we don't have a valid context then return early
if (!$parts) {
return;
}

// Extract the component name
$component = $parts[0];

// Extract the optional section name
$section = (count($parts) > 1) ? $parts[1] : null;
// Extract the section name
$section = $parts[1];

if ($parts) {
// Set the access control rules field component value.
$form->setFieldAttribute('rules', 'component', $component);
}
// Set the access control rules field component value.
$form->setFieldAttribute('rules', 'component', $component);

if ($section !== null) {
// Looking first in the component models/forms folder
$path = Path::clean(JPATH_ADMINISTRATOR . '/components/' . $component . '/models/forms/fieldgroup/' . $section . '.xml');
// Looking first in the component models/forms folder
$path = Path::clean(JPATH_ADMINISTRATOR . '/components/' . $component . '/models/forms/fieldgroup/' . $section . '.xml');

if (file_exists($path)) {
$lang = Factory::getLanguage();
$lang->load($component, JPATH_BASE);
$lang->load($component, JPATH_BASE . '/components/' . $component);
if (file_exists($path)) {
$lang = Factory::getLanguage();
$lang->load($component, JPATH_BASE);
$lang->load($component, JPATH_BASE . '/components/' . $component);

if (!$form->loadFile($path, false)) {
throw new \Exception(Text::_('JERROR_LOADFILE_FAILED'));
}
if (!$form->loadFile($path, false)) {
throw new \Exception(Text::_('JERROR_LOADFILE_FAILED'));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
<?php // load the pagination. ?>
<?php echo $this->pagination->getListFooter(); ?>

<?php //Load the batch processing form. ?>
<?php // Load the batch processing form. ?>
<?php
if (
$user->authorise('core.create', $component)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
<?php // load the pagination. ?>
<?php echo $this->pagination->getListFooter(); ?>

<?php //Load the batch processing form. ?>
<?php // Load the batch processing form. ?>
<?php
if (
$user->authorise('core.create', $component)
Expand Down
24 changes: 4 additions & 20 deletions administrator/components/com_finder/src/Indexer/Language/Zh.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
namespace Joomla\Component\Finder\Administrator\Indexer\Language;

use Joomla\Component\Finder\Administrator\Indexer\Language;
use Joomla\String\StringHelper;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
Expand Down Expand Up @@ -61,26 +60,11 @@ public function __construct($locale = null)
*/
public function tokenise($input)
{
$terms = parent::tokenise($input);

// Iterate through the terms and test if they contain Chinese.
for ($i = 0, $n = count($terms); $i < $n; $i++) {
$charMatches = [];
$charCount = preg_match_all('#[\p{Han}]#mui', $terms[$i], $charMatches);

// Split apart any groups of Chinese characters.
for ($j = 0; $j < $charCount; $j++) {
$tSplit = StringHelper::str_ireplace($charMatches[0][$j], '', $terms[$i], false);
// We first add whitespace around each Chinese character, so that our later code can easily split on this.
$input = preg_replace('#\p{Han}#mui', ' $0 ', $input);

if (!empty($tSplit)) {
$terms[$i] = $tSplit;
} else {
unset($terms[$i]);
}

$terms[] = $charMatches[0][$j];
}
}
// Now we split up the input into individual terms
$terms = parent::tokenise($input);

return $terms;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Router\Route;

// phpcs:disable PSR1.Files.SideEffects
Expand Down Expand Up @@ -49,6 +50,11 @@ public function display($cachable = false, $urlparams = [])
$layout = $this->input->get('layout', 'default');
$id = $this->input->getInt('id');

// Show messages about the disabled plugin
if ($view === 'tours' && !PluginHelper::isEnabled('system', 'guidedtours')) {
$this->app->enqueueMessage(Text::_('COM_GUIDEDTOURS_PLUGIN_DISABLED'), 'error');
}

if ($view === 'tour' && $layout === 'edit' && !$this->checkEditId('com_guidedtours.edit.tour', $id)) {
$this->setMessage(Text::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id), 'error');
$this->setRedirect(Route::_('index.php?option=com_guidedtours&view=tours', false));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public function __construct($config = [])
'created_by', 'a.created_by',
'modified', 'a.modified',
'modified_by', 'a.modified_by',
'note', 'a.note',
];
}

Expand Down Expand Up @@ -200,9 +201,10 @@ protected function getListQuery()
$search = '%' . str_replace(' ', '%', trim($search)) . '%';
$query->where(
'(' . $db->quoteName('a.title') . ' LIKE :search1'
. ' OR ' . $db->quoteName('a.description') . ' LIKE :search2)'
. ' OR ' . $db->quoteName('a.description') . ' LIKE :search2'
. ' OR ' . $db->quoteName('a.note') . ' LIKE :search3)'
)
->bind([':search1', ':search2'], $search);
->bind([':search1', ':search2', ':search3'], $search);
}
}

Expand Down
19 changes: 1 addition & 18 deletions administrator/components/com_guidedtours/src/Model/TourModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,24 +77,7 @@ public function save($data)

$this->setStepsLanguage($id, $lang);

$result = parent::save($data);

// Create default step for new tour
if ($result && $input->getCmd('task') !== 'save2copy' && $this->getState($this->getName() . '.new')) {
$tourId = (int) $this->getState($this->getName() . '.id');

$table = $this->getTable('Step');

$table->id = 0;
$table->title = 'COM_GUIDEDTOURS_BASIC_STEP';
$table->description = '';
$table->tour_id = $tourId;
$table->published = 1;

$table->store();
}

return $result;
return parent::save($data);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public function __construct($config = [])
'created_by', 'a.created_by',
'modified', 'a.modified',
'modified_by', 'a.modified_by',
'note', 'a.note',
];
}

Expand Down Expand Up @@ -220,9 +221,10 @@ public function getListQuery()
$search = '%' . str_replace(' ', '%', trim($search)) . '%';
$query->where(
'(' . $db->quoteName('a.title') . ' LIKE :search1'
. ' OR ' . $db->quoteName('a.description') . ' LIKE :search2)'
. ' OR ' . $db->quoteName('a.description') . ' LIKE :search2'
. ' OR ' . $db->quoteName('a.note') . ' LIKE :search3)'
)
->bind([':search1', ':search2'], $search);
->bind([':search1', ':search2', ':search3'], $search);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public function __construct($config = [], MVCFactoryInterface $factory = null)
'package_id',
'extension_id',
'creationDate',
'core',
];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function download()
$message = null;
$messageType = null;

// The validation was not successful so abort.
// The validation was not successful so stop.
if ($result['check'] === false) {
$message = Text::_('COM_JOOMLAUPDATE_VIEW_UPDATE_CHECKSUM_WRONG');
$messageType = 'error';
Expand Down
Loading

0 comments on commit 2db4c95

Please sign in to comment.