Skip to content

Commit

Permalink
Merge branch '4.2-dev' into dynamic_properties
Browse files Browse the repository at this point in the history
  • Loading branch information
fancyFranci committed Feb 11, 2023
2 parents f1c41ff + 7114943 commit 8c955a4
Show file tree
Hide file tree
Showing 60 changed files with 378 additions and 151 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php

/**
* @package Joomla.Administrator
* @subpackage com_actionlogs
*
* @copyright (C) 2023 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

namespace Joomla\Component\Actionlogs\Administrator\Dispatcher;

use Joomla\CMS\Access\Exception\NotAllowed;
use Joomla\CMS\Dispatcher\ComponentDispatcher;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
* ComponentDispatcher class for com_admin
*
* @since 4.2.7
*/
class Dispatcher extends ComponentDispatcher
{
/**
* com_admin does not require check permission, so we override checkAccess method and have it empty
*
* @return void
*
* @since 4.2.7
*/
protected function checkAccess()
{
$user = $this->app->getIdentity();

// Access check
if (!$user->authorise('core.admin')) {
throw new NotAllowed($this->app->getLanguage()->_('JERROR_ALERTNOAUTHOR'), 403);
}
}
}
2 changes: 2 additions & 0 deletions administrator/components/com_admin/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -6463,6 +6463,8 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
'/media/vendor/hotkeys.js/LICENSE',
// From 4.2.1 to 4.2.2
'/administrator/cache/fido.jwt',
// From 4.2.6 to 4.2.7
'/libraries/vendor/maximebf/debugbar/src/DebugBar/DataFormatter/VarDumper/SeekingData.php',
];

$folders = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1123,6 +1123,8 @@ protected function batchMove($value, $pks, $contexts)
// We are going to store all the children and just move the category
$children = [];

$table = $this->getTable();

// Parent exists so let's proceed
foreach ($pks as $pk) {
// Check that the row actually exists
Expand Down Expand Up @@ -1171,7 +1173,7 @@ protected function batchMove($value, $pks, $contexts)
'extension' => $extension,
];

if ($this->table->load($conditions)) {
if ($table->load($conditions)) {
$this->setError(Text::_('JLIB_DATABASE_ERROR_CATEGORY_UNIQUE_ALIAS'));

return false;
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_finder/src/Indexer/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ class Query
* The dates Registry.
*
* @var Registry
* @since __DEPLOY_VERSION__
* @since 4.2.7
*/
public $dates;

Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_finder/src/Indexer/Token.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class Token
* The token required flag
*
* @var boolean
* @since __DEPLOY_VERSION__
* @since 4.2.7
*/
public $required;

Expand Down
104 changes: 104 additions & 0 deletions administrator/components/com_finder/src/Response/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,110 @@
*/
class Response
{
/**
* The buffer
*
* @var string
* @since __DEPLOY_VERSION__
*/
public $buffer;

/**
* The memory
*
* @var string
* @since __DEPLOY_VERSION__
*/
public $memory;

/**
* If it has an error
*
* @var bool
* @since __DEPLOY_VERSION__
*/
public $error;

/**
* The header
*
* @var string
* @since __DEPLOY_VERSION__
*/
public $header;

/**
* The message
*
* @var string
* @since __DEPLOY_VERSION__
*/
public $message;

/**
* The batch size
*
* @var int
* @since __DEPLOY_VERSION__
*/
public $batchSize;

/**
* The batch offset
*
* @var int
* @since __DEPLOY_VERSION__
*/
public $batchOffset;

/**
* The total items
*
* @var int
* @since __DEPLOY_VERSION__
*/
public $totalItems;

/**
* The plugin state
*
* @var string
* @since __DEPLOY_VERSION__
*/
public $pluginState;

/**
* The start time
*
* @var string
* @since __DEPLOY_VERSION__
*/
public $startTime;

/**
* The end time
*
* @var string
* @since __DEPLOY_VERSION__
*/
public $endTime;

/**
* The start
*
* @var int
* @since __DEPLOY_VERSION__
*/
public $start;

/**
* The complete
*
* @var int
* @since __DEPLOY_VERSION__
*/
public $complete;

/**
* Class Constructor
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public function discover_install()
$app->setUserState('com_installer.extension_message', $installer->get('extension_message'));

if (!$failed) {
$app->enqueueMessage(Text::_('COM_INSTALLER_MSG_DISCOVER_INSTALLSUCCESSFUL'));
$app->enqueueMessage(Text::_('COM_INSTALLER_MSG_DISCOVER_INSTALLSUCCESSFUL'), 'success');
}
} else {
$app->enqueueMessage(Text::_('COM_INSTALLER_MSG_DISCOVER_NOEXTENSIONSELECTED'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,11 @@
</td>
<th scope="row">
<span tabindex="0"><?php echo $item->name; ?></span>
<div role="tooltip" id="tip<?php echo $i; ?>">
<?php echo $item->description; ?>
</div>
<?php if ($item->description) : ?>
<div role="tooltip" id="tip<?php echo $i; ?>">
<?php echo $item->description; ?>
</div>
<?php endif; ?>
</th>
<td class="d-none d-md-table-cell">
<?php echo $item->client_translated; ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,11 @@
<span tabindex="0">
<?php echo $item->name; ?>
</span>
<div role="tooltip" id="tip<?php echo $i; ?>">
<?php echo $item->description; ?>
</div>
<?php if ($item->description) : ?>
<div role="tooltip" id="tip<?php echo $i; ?>">
<?php echo $item->description; ?>
</div>
<?php endif; ?>
</td>
<td class="d-none d-md-table-cell">
<?php echo $item->client_translated; ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public function postFiles()
// A file needs to be created
$name = $this->getModel()->createFile($adapter, $name, $path, $mediaContent, $override);
} else {
// A file needs to be created
// A folder needs to be created
$name = $this->getModel()->createFolder($adapter, $name, $path, $override);
}

Expand Down
2 changes: 2 additions & 0 deletions administrator/components/com_menus/forms/item_url.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@
<option value="alternate"/>
<option value="author"/>
<option value="bookmark"/>
<option value="external"/>
<option value="help"/>
<option value="license"/>
<option value="me"/>
<option value="next"/>
<option value="nofollow"/>
<option value="noopener"/>
Expand Down
5 changes: 5 additions & 0 deletions administrator/components/com_menus/forms/itemadmin_url.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,20 @@
<option value="alternate"/>
<option value="author"/>
<option value="bookmark"/>
<option value="external"/>
<option value="help"/>
<option value="license"/>
<option value="me"/>
<option value="next"/>
<option value="nofollow"/>
<option value="noopener"/>
<option value="noreferrer"/>
<option value="prefetch"/>
<option value="prev"/>
<option value="search"/>
<option value="sponsored"/>
<option value="tag"/>
<option value="ugc"/>
</field>

<field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ public function &getModules()
*
* @return array
*
* @since _DEPLOY_VERSION__
* @since 4.2.0
*/
public function getMissingModuleLanguages(): array
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ public function reset()
*/
public function unpublish()
{
$this->checkToken('get');

$model = $this->getModel('Messages', '', ['ignore_request' => true]);

$id = $this->input->get('id');
Expand All @@ -84,6 +86,8 @@ public function unpublish()
*/
public function republish()
{
$this->checkToken('get');

$model = $this->getModel('Messages', '', ['ignore_request' => true]);

$id = $this->input->get('id');
Expand All @@ -109,6 +113,8 @@ public function republish()
*/
public function archive()
{
$this->checkToken('get');

$model = $this->getModel('Messages', '', ['ignore_request' => true]);

$id = $this->input->get('id');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1802,7 +1802,7 @@ public function getMediaFiles()
$template->xmldata = TemplatesHelper::parseXMLTemplateFile($template->client_id === 0 ? JPATH_ROOT : JPATH_ROOT . '/administrator', $template->name);
}

if (!isset($template->xmldata->inheritable) || (isset($template->xmldata->parent) && $template->xmldata->parent === '')) {
if (empty($template->xmldata->inheritable) || (isset($template->xmldata->parent) && $template->xmldata->parent === '')) {
return $result;
}

Expand Down
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.2.7</version>
<creationDate>2022-12</creationDate>
<version>4.2.8</version>
<creationDate>2023-01</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.2.7</version>
<creationDate>2022-12</creationDate>
<version>4.2.8</version>
<creationDate>2023-01</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.2.7-dev</version>
<creationDate>2022-12</creationDate>
<version>4.2.8-dev</version>
<creationDate>2023-01</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.2.7.1</version>
<creationDate>2022-12</creationDate>
<version>4.2.8.1</version>
<creationDate>2023-01</creationDate>
<author>Joomla! Project</author>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
Expand Down
8 changes: 8 additions & 0 deletions api/components/com_menus/src/Controller/ItemsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
namespace Joomla\Component\Menus\Api\Controller;

use Joomla\CMS\Access\Exception\NotAllowed;
use Joomla\CMS\Filter\InputFilter;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\ApiController;
use Joomla\CMS\MVC\Model\ListModel;
Expand Down Expand Up @@ -68,6 +69,13 @@ public function displayItem($id = null)
*/
public function displayList()
{
$apiFilterInfo = $this->input->get('filter', [], 'array');
$filter = InputFilter::getInstance();

if (\array_key_exists('menutype', $apiFilterInfo)) {
$this->modelState->set('filter.menutype', $filter->clean($apiFilterInfo['menutype'], 'STRING'));
}

$this->modelState->set('filter.client_id', $this->getClientIdFromInput());

return parent::displayList();
Expand Down

0 comments on commit 8c955a4

Please sign in to comment.