Skip to content

Commit

Permalink
Merge branch '4.3-dev' into MailHelper_cleanSubject
Browse files Browse the repository at this point in the history
  • Loading branch information
Denitz authored Aug 23, 2023
2 parents cffcd5c + a1d71e2 commit e8b28cf
Show file tree
Hide file tree
Showing 107 changed files with 234 additions and 227 deletions.
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
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
7 changes: 1 addition & 6 deletions administrator/components/com_menus/forms/itemadmin_alias.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,12 @@
label="COM_MENUS_ITEM_FIELD_ANCHOR_TITLE_LABEL"
/>

<field
name="menu-anchor_title"
type="text"
label="COM_MENUS_ITEM_FIELD_ICON_TITLE_LABEL"
/>

<field
name="menu_icon"
type="text"
label="COM_MENUS_ITEM_FIELD_ICON_TITLE_LABEL"
description="COM_MENUS_ITEM_FIELD_ICON_TITLE_DESC"
validate="CssIdentifier"
/>

<field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
type="text"
label="COM_MENUS_ITEM_FIELD_ICON_TITLE_LABEL"
description="COM_MENUS_ITEM_FIELD_ICON_TITLE_DESC"
validate="CssIdentifier"
/>

<field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
type="text"
label="COM_MENUS_ITEM_FIELD_ICON_TITLE_LABEL"
description="COM_MENUS_ITEM_FIELD_ICON_TITLE_DESC"
validate="CssIdentifier"
/>

<field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
type="text"
label="COM_MENUS_ITEM_FIELD_ICON_TITLE_LABEL"
description="COM_MENUS_ITEM_FIELD_ICON_TITLE_DESC"
validate="CssIdentifier"
/>

<field
Expand Down
1 change: 1 addition & 0 deletions administrator/components/com_menus/forms/itemadmin_url.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
type="text"
label="COM_MENUS_ITEM_FIELD_ICON_TITLE_LABEL"
description="COM_MENUS_ITEM_FIELD_ICON_TITLE_DESC"
validate="CssIdentifier"
/>

<field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ public function save($data)
$data['source'] = str_replace(["\r\n", "\r"], "\n", $data['source']);

// If the asset file for the template ensure we have valid template so we don't instantly destroy it
if ($fileName === '/joomla.asset.json' && json_decode($data['source']) === null) {
if (str_ends_with($fileName, '/joomla.asset.json') && json_decode($data['source']) === null) {
$this->setError(Text::_('COM_TEMPLATES_ERROR_ASSET_FILE_INVALID_JSON'));

return false;
Expand Down
6 changes: 4 additions & 2 deletions administrator/language/en-GB/com_guidedtours.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
; Note : All ini files need to be saved as UTF-8

COM_GUIDEDTOURS="Guided Tours"
; Deprecated, will be removed with 5.0
COM_GUIDEDTOURS_BASIC_STEP="Basic Step"
COM_GUIDEDTOURS_CONFIGURATION="Guided Tours: Options"
COM_GUIDEDTOURS_DESCRIPTION="Description"
Expand Down Expand Up @@ -42,6 +43,7 @@ COM_GUIDEDTOURS_N_ITEMS_UNPUBLISHED="%d items unpublished."
COM_GUIDEDTOURS_NEW_TOUR="New Tour"
COM_GUIDEDTOURS_ORDER_TYPE_ASC="Type ascending"
COM_GUIDEDTOURS_ORDER_TYPE_DESC="Type descending"
COM_GUIDEDTOURS_PLUGIN_DISABLED="The Guided Tours System Plugin is disabled. The Guided Tours module will not be displayed if this is not enabled."
COM_GUIDEDTOURS_STEP_DESCRIPTION_TRANSLATION="Description (%s)"
COM_GUIDEDTOURS_STEP_EDIT_STEP="Edit Step"
COM_GUIDEDTOURS_STEP_FILTER_SEARCH_DESC="Search in title and note. Prefix with ID: to search for a step ID or DESCRIPTION: to search in description."
Expand Down Expand Up @@ -73,7 +75,7 @@ COM_GUIDEDTOURS_TOURS_LIST_EMPTYSTATE_TITLE="No tours have been created yet."
COM_GUIDEDTOURS_TYPE_INTERACTIVE_STEP_DESC="Select <em>Form Submit</em> to submit a form, <em>Text Field</em> for user input, <em>Button</em> for buttons, or <em>Other</em> for any other interaction."
COM_GUIDEDTOURS_TYPE_INTERACTIVE_STEP_LABEL="Interactive Type"
COM_GUIDEDTOURS_TYPE_REDIRECT_URL_DESC="Enter the relative URL of the page you want the step to redirect to, eg administrator/index.php?option=com_guidedtours&view=tours for the tours' list page."
COM_GUIDEDTOURS_TYPE_REDIRECT_URL_LABEL="URL"
COM_GUIDEDTOURS_URL_LABEL="URL"
COM_GUIDEDTOURS_TYPE_REDIRECT_URL_LABEL="Relative URL"
COM_GUIDEDTOURS_URL_LABEL="Relative URL"
COM_GUIDEDTOURS_URL_DESC="Enter the relative URL of the page from where you want to Start the tour, e.g administrator/index.php?option=com_guidedtours&view=tours for the tours' list page."
COM_GUIDEDTOURS_XML_DESCRIPTION="Component for managing Guided Tours functionality."
4 changes: 2 additions & 2 deletions administrator/language/en-GB/install.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<extension client="administrator" type="language" method="upgrade">
<name>English (en-GB)</name>
<tag>en-GB</tag>
<version>4.3.3</version>
<creationDate>2023-07</creationDate>
<version>4.3.5</version>
<creationDate>2023-08</creationDate>
<author>Joomla! Project</author>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
Expand Down
4 changes: 2 additions & 2 deletions administrator/language/en-GB/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<metafile client="administrator">
<name>English (en-GB)</name>
<version>4.3.3</version>
<creationDate>2023-07</creationDate>
<version>4.3.5</version>
<creationDate>2023-08</creationDate>
<author>Joomla! Project</author>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
Expand Down
4 changes: 2 additions & 2 deletions administrator/manifests/files/joomla.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<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.3.3-rc2-dev</version>
<creationDate>2023-07</creationDate>
<version>4.3.5-dev</version>
<creationDate>2023-08</creationDate>
<description>FILES_JOOMLA_XML_DESCRIPTION</description>

<scriptfile>administrator/components/com_admin/script.php</scriptfile>
Expand Down
4 changes: 2 additions & 2 deletions administrator/manifests/packages/pkg_en-GB.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<extension type="package" method="upgrade">
<name>English (en-GB) Language Pack</name>
<packagename>en-GB</packagename>
<version>4.3.3.1</version>
<creationDate>2023-07</creationDate>
<version>4.3.5.1</version>
<creationDate>2023-08</creationDate>
<author>Joomla! Project</author>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
Expand Down
Loading

0 comments on commit e8b28cf

Please sign in to comment.