Skip to content

Commit

Permalink
Merge branch '4.1-dev' into 4.2-finder-debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackwar committed Jan 24, 2022
2 parents 4eb331f + 33d80d2 commit 161313d
Show file tree
Hide file tree
Showing 116 changed files with 325 additions and 273 deletions.
16 changes: 8 additions & 8 deletions .drone.yml
Expand Up @@ -57,13 +57,13 @@ steps:
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Unit

- name: php81-unit
depends_on: [ phpcs ]
image: joomlaprojects/docker-images:php8.1
failure: ignore
commands:
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Unit
# - name: php81-unit
# depends_on: [ phpcs ]
# image: joomlaprojects/docker-images:php8.1
# failure: ignore
# commands:
# - php -v
# - ./libraries/vendor/bin/phpunit --testsuite Unit

- name: php72-integration
depends_on: [ npm ]
Expand Down Expand Up @@ -420,6 +420,6 @@ steps:

---
kind: signature
hmac: daa8e5588cc88058bc57aadf35e3d9dd55eefaa9419c457ce374a0dd19eb7cda
hmac: a6f3f2ed21261b612d052724e5f43a5dd55168f98cbaa48eeaa358816bb255df

...
4 changes: 2 additions & 2 deletions .github/workflows/create-translation-pull-request-v4.yml
Expand Up @@ -32,7 +32,7 @@ jobs:
git remote add upstream https://github.com/joomla/joomla-cms.git
git fetch upstream
git checkout --progress --force -B translation refs/remotes/origin/translation
git merge upstream/4.0-dev
git merge upstream/4.1-dev
- name: Fetch and extract translations
run: |
Expand Down Expand Up @@ -67,4 +67,4 @@ jobs:
GITHUB_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
run: |
gh pr list -R joomla/joomla-cms --state open --author joomla-translation-bot -S "Translation Update" | grep -v "No pull" || \
gh pr create --title "Translation Update" --body "Automatically created pull request based on core-translation repository changes" -R joomla/joomla-cms --base 4.0-dev
gh pr create --title "Translation Update" --body "Automatically created pull request based on core-translation repository changes" -R joomla/joomla-cms --base 4.1-dev
Expand Up @@ -106,7 +106,7 @@ public static function getItem($extensionName, $typeName, $itemId)
{
if (!self::hasSupport($extensionName))
{
return array();
return null;
}

// Get the extension specific helper method
Expand Down Expand Up @@ -176,7 +176,7 @@ private static function loadHelper($extensionName)
*
* @param string $extensionName The extension name with com_
*
* @return boolean
* @return string
*
* @since 3.7.0
*/
Expand Down
Expand Up @@ -345,7 +345,7 @@ protected function loadFormData()
if (!$data->id)
{
// Check for which extension the Category Manager is used and get selected fields
$extension = substr($app->getUserState('com_categories.categories.filter.extension'), 4);
$extension = substr($app->getUserState('com_categories.categories.filter.extension', ''), 4);
$filters = (array) $app->getUserState('com_categories.categories.' . $extension . '.filter');

$data->set(
Expand Down
Expand Up @@ -66,7 +66,7 @@ public function display($tpl = null)

if (!$component->enabled)
{
return false;
return;
}

$form = $this->get('form');
Expand All @@ -76,7 +76,7 @@ public function display($tpl = null)
{
Factory::getApplication()->enqueueMessage($e->getMessage(), 'error');

return false;
return;
}

$this->fieldsets = $form ? $form->getFieldsets() : null;
Expand Down
Expand Up @@ -34,7 +34,7 @@ class AdministratorService
*
* @return string The language HTML
*
* @throws Exception
* @throws \Exception
*/
public function association($contactid)
{
Expand Down
2 changes: 2 additions & 0 deletions administrator/components/com_content/forms/article.xml
Expand Up @@ -920,11 +920,13 @@
<field
name="introtext"
label="COM_CONTENT_FIELD_INTROTEXT"
filter="JComponentHelper::filterText"
/>

<field
name="fulltext"
label="COM_CONTENT_FIELD_FULLTEXT"
filter="JComponentHelper::filterText"
/>
</fields>

Expand Down
Expand Up @@ -11,6 +11,7 @@

\defined('_JEXEC') or die;

use Joomla\CMS\Date\Date;
use Joomla\CMS\Event\AbstractEvent;
use Joomla\CMS\Factory;
use Joomla\CMS\Filter\InputFilter;
Expand Down
Expand Up @@ -88,7 +88,7 @@ public function __construct($config = array())
* @param array $data data
* @param boolean $loadData load current data
*
* @return Form|null The \JForm object or null if the form can't be found
* @return \Joomla\CMS\Form\Form|null The Form object or null if the form can't be found
*
* @since 3.2
*/
Expand Down
Expand Up @@ -148,11 +148,6 @@ public function onCustomFieldsPrepareField($context, $item, $field)
// Get the path for the layout file
$path = PluginHelper::getLayoutPath('fields', $this->_name, $field->type);

if (!file_exists($path))
{
$path = PluginHelper::getLayoutPath('fields', $this->_name, $field->type);
}

// Render the layout
ob_start();
include $path;
Expand Down Expand Up @@ -269,8 +264,8 @@ public function onContentPrepareForm(Form $form, $data)
/**
* Returns the path of the XML definition file for the field parameters
*
* @param Form $form The form
* @param stdClass $data The data
* @param Form $form The form
* @param \stdClass $data The data
*
* @return string
*
Expand Down
Expand Up @@ -79,7 +79,7 @@ protected function getGroups()
}
catch (\RuntimeException $e)
{
return;
return [];
}

// Build the grouped list array.
Expand Down
3 changes: 0 additions & 3 deletions administrator/components/com_finder/src/Indexer/Query.php
Expand Up @@ -1054,7 +1054,6 @@ protected function processString($input, $lang, $mode)

// Adjust the loop.
$i += 2;
continue;
}
// Handle the OR operator.
elseif ($op === 'OR' && isset($terms[$i + 2]))
Expand Down Expand Up @@ -1124,7 +1123,6 @@ protected function processString($input, $lang, $mode)

// Adjust the loop.
$i += 2;
continue;
}
}
// Handle an orphaned OR operator.
Expand Down Expand Up @@ -1172,7 +1170,6 @@ protected function processString($input, $lang, $mode)

// Adjust the loop.
$i++;
continue;
}
// Handle the NOT operator.
elseif (isset($terms[$i + 1]) && array_search($terms[$i], $operators, true) === 'NOT')
Expand Down
9 changes: 7 additions & 2 deletions administrator/components/com_finder/tmpl/maps/default.php
Expand Up @@ -112,8 +112,13 @@
<?php if (!$branchFilter) : ?>
<td class="text-center btns itemnumber">
<?php if ($item->rgt - $item->lft > 1) : ?>
<a href="<?php echo Route::_('index.php?option=com_finder&view=maps&filter[branch]=' . $item->id); ?>">
<span class="btn btn-info"><?php echo floor(($item->rgt - $item->lft) / 2); ?></span></a>
<a href="<?php echo Route::_('index.php?option=com_finder&view=maps&filter[branch]=' . $item->id); ?>"
aria-describedby="tip-map<?php echo $i; ?>">
<span class="btn btn-info"><?php echo floor(($item->rgt - $item->lft) / 2); ?></span>
</a>
<div role="tooltip" id="tip-map<?php echo $i; ?>">
<?php echo Text::_('COM_FINDER_HEADING_CHILDREN'); ?>
</div>
<?php else : ?>
-
<?php endif; ?>
Expand Down
Expand Up @@ -108,14 +108,14 @@ public function find()
if ($disabledUpdateSites)
{
$updateSitesUrl = Route::_('index.php?option=com_installer&view=updatesites');
$this->setMessage(Text::sprintf('COM_INSTALLER_MSG_UPDATE_SITES_COUNT_CHECK', $updateSitesUrl), 'warning');
$this->app->enqueueMessage(Text::sprintf('COM_INSTALLER_MSG_UPDATE_SITES_COUNT_CHECK', $updateSitesUrl), 'warning');
}

$model->findUpdates(0, $cache_timeout, $minimum_stability);

if (0 === $model->getTotal())
{
$this->setMessage(Text::_('COM_INSTALLER_MSG_UPDATE_NOUPDATES'), 'info');
$this->app->enqueueMessage(Text::_('COM_INSTALLER_MSG_UPDATE_NOUPDATES'), 'info');
}

$this->setRedirect(Route::_('index.php?option=com_installer&view=update', false));
Expand Down
Expand Up @@ -1073,7 +1073,7 @@ public function removePackageFiles()

foreach ($files as $file)
{
if (File::exists($file))
if ($file !== null && File::exists($file))
{
File::delete($file);
}
Expand Down
Expand Up @@ -239,7 +239,6 @@ public function getData()
&& stripos($installedLanguage->language, $search) === false)
{
unset($installedLanguages[$key]);
continue;
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion administrator/components/com_mails/forms/template.xml
Expand Up @@ -28,7 +28,8 @@
name="htmlbody"
type="editor"
label="COM_MAILS_FIELD_HTMLBODY_LABEL"
buttons="false"
buttons="true"
hide="fields,pagebreak,readmore,module"
class="inputbox"
filter="JComponentHelper::filterText"
/>
Expand Down
Expand Up @@ -4,15 +4,17 @@
@dblclick="openPreview()"
@mouseleave="hideActions()"
>
<div class="media-browser-item-preview">
<div class="media-browser-item-preview"
:title="item.name">
<div class="image-background">
<div
class="image-cropped"
:style="{ backgroundImage: getHashedURL }"
/>
</div>
</div>
<div class="media-browser-item-info">
<div class="media-browser-item-info"
:title="item.name">
{{ item.name }} {{ item.filetype }}
</div>
<span
Expand Down
Expand Up @@ -104,7 +104,7 @@ public function createFolder(string $name, string $path): string;
*
* @param string $name The name
* @param string $path The folder
* @param binary $data The data
* @param string $data The data
*
* @return string
*
Expand All @@ -118,7 +118,7 @@ public function createFile(string $name, string $path, $data): string;
*
* @param string $name The name
* @param string $path The folder
* @param binary $data The data
* @param string $data The data
*
* @return void
*
Expand Down
Expand Up @@ -36,7 +36,7 @@ class DisplayController extends BaseController
* @param string $prefix The class prefix. Optional.
* @param array $config Configuration array for view. Optional.
*
* @return \Joomla\CMS\MVC\View\AbstractView Reference to the view or an error.
* @return \Joomla\CMS\MVC\View\ViewInterface Reference to the view or an error.
*
* @since 3.0
* @throws \Exception
Expand Down
4 changes: 2 additions & 2 deletions administrator/components/com_media/src/Model/ApiModel.php
Expand Up @@ -220,7 +220,7 @@ public function createFolder($adapter, $name, $path, $override)
* @param string $adapter The adapter
* @param string $name The name
* @param string $path The folder
* @param binary $data The data
* @param string $data The data
* @param boolean $override Should the file being overridden when it exists
*
* @return string
Expand Down Expand Up @@ -286,7 +286,7 @@ public function createFile($adapter, $name, $path, $data, $override)
* @param string $adapter The adapter
* @param string $name The name
* @param string $path The folder
* @param binary $data The data
* @param string $data The data
*
* @return void
*
Expand Down
Expand Up @@ -35,7 +35,7 @@ class MenuOrderingField extends ListField
* Method to get the list of siblings in a menu.
* The method requires that parent be set.
*
* @return array The field option objects or false if the parent field has not been set
* @return array|boolean The field option objects or false if the parent field has not been set
*
* @since 1.7
*/
Expand Down
Expand Up @@ -136,7 +136,7 @@ public static function getMenuTypes($clientId = 0)
* @param array $languages Optional array of specify which languages we want to filter
* @param int $clientId Optional client id - viz 0 = site, 1 = administrator, can be NULL for all (used only if menutype not given)
*
* @return array
* @return array|boolean
*
* @since 1.6
*/
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_modules/tmpl/module/edit.php
Expand Up @@ -107,7 +107,7 @@
<p><?php echo $short_description; ?></p>
<?php if ($long_description) : ?>
<p class="readmore">
<a href="#" onclick="document.querySelector('#tab-description').click();">
<a href="#" onclick="document.getElementById('myTab').activateTab(document.getElementById('description'));">
<?php echo Text::_('JGLOBAL_SHOW_FULL_DESCRIPTION'); ?>
</a>
</p>
Expand Down
Expand Up @@ -273,9 +273,9 @@ function ($a, $b)
/**
* Prepare core files.
*
* @param string $dir The path of the directory to scan.
* @param string $element The path of the template element.
* @param stdClass $template The stdClass object of template.
* @param string $dir The path of the directory to scan.
* @param string $element The path of the template element.
* @param \stdClass $template The stdClass object of template.
*
* @return array
*
Expand Down
2 changes: 1 addition & 1 deletion administrator/modules/mod_sampledata/tmpl/default.php
Expand Up @@ -32,7 +32,7 @@
<?php foreach($items as $i => $item) : ?>
<li class="list-group-item sampledata-<?php echo $item->name; ?>">
<div class="d-flex justify-content-between align-items-center">
<div class="sample-data__title me-2">
<div class="sample-data__title">
<span class="sample-data__icon icon-<?php echo $item->icon; ?> me-1" aria-hidden="true"></span>
<?php echo htmlspecialchars($item->title, ENT_QUOTES, 'UTF-8'); ?>
</div>
Expand Down

0 comments on commit 161313d

Please sign in to comment.