Skip to content

Commit b1cb875

Browse files
authored
Merge branch '4.1-dev' into patch-46
2 parents 288c69e + 0fd479e commit b1cb875

File tree

120 files changed

+913
-251
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+913
-251
lines changed

.drone.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ steps:
2323
- echo $(date)
2424

2525
- name: npm
26-
image: node:14-alpine
26+
image: node:16-alpine
2727
depends_on: [ phpcs ]
2828
commands:
2929
- npm ci --unsafe-perm
@@ -419,6 +419,6 @@ steps:
419419

420420
---
421421
kind: signature
422-
hmac: 15e1abb49597a83c250c8785948aa9fa0c6d93ec88b03e45c30d8050b338ea5d
422+
hmac: c34b8c98013a4c7f604f5c650875d03f4291e4fa42ba9ceb730993172d965aff
423423

424424
...

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Build Status
55
---------------------
66
| Drone-CI | AppVeyor | PHP | Node | npm |
77
| ------------- | ------------- | ------------- | ------------- | ------------- |
8-
| [![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-V12.0-green)](https://nodejs.org/en/) | [![npm](https://img.shields.io/badge/npm-v6.13.4-green)](https://nodejs.org/en/) |
8+
| [![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/) |
99

1010
Overview
1111
---------------------

administrator/components/com_menus/src/Model/ItemModel.php

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1433,8 +1433,8 @@ public function rebuild()
14331433
*/
14341434
public function save($data)
14351435
{
1436-
$pk = isset($data['id']) ? $data['id'] : (int) $this->getState('item.id');
1437-
$isNew = true;
1436+
$pk = isset($data['id']) ? $data['id'] : (int) $this->getState('item.id');
1437+
$isNew = true;
14381438
$db = $this->getDbo();
14391439
$query = $db->getQuery(true);
14401440
$table = $this->getTable();
@@ -1512,13 +1512,24 @@ public function save($data)
15121512
return false;
15131513
}
15141514

1515-
// Alter the title & alias for save as copy. Also, unset the home record.
1516-
if (!$isNew && $data['id'] == 0)
1515+
// Alter the title & alias for save2copy when required. Also, unset the home record.
1516+
if (Factory::getApplication()->input->get('task') === 'save2copy' && $data['id'] === 0)
15171517
{
1518-
list($title, $alias) = $this->generateNewTitle($table->parent_id, $table->alias, $table->title);
1518+
$origTable = $this->getTable();
1519+
$origTable->load($this->getState('item.id'));
1520+
1521+
if ($table->title === $origTable->title)
1522+
{
1523+
list($title, $alias) = $this->generateNewTitle($table->parent_id, $table->alias, $table->title);
1524+
$table->title = $title;
1525+
$table->alias = $alias;
1526+
}
1527+
1528+
if ($table->alias === $origTable->alias)
1529+
{
1530+
$table->alias = '';
1531+
}
15191532

1520-
$table->title = $title;
1521-
$table->alias = $alias;
15221533
$table->published = 0;
15231534
$table->home = 0;
15241535
}

build/media_source/templates/site/cassiopeia/scss/blocks/_tags.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111

1212
.tag {
1313
display: inline-block;
14-
padding: .5rem 0;
14+
padding: .5rem .5rem .5rem 0;
1515
}

components/com_content/src/View/Category/FeedView.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@
1212
\defined('_JEXEC') or die;
1313

1414
use Joomla\CMS\Factory;
15+
use Joomla\CMS\HTML\HTMLHelper;
1516
use Joomla\CMS\Language\Text;
16-
use Joomla\CMS\Layout\LayoutHelper;
1717
use Joomla\CMS\MVC\View\CategoryFeedView;
1818
use Joomla\CMS\Router\Route;
19-
use Joomla\CMS\Uri\Uri;
2019
use Joomla\Component\Content\Site\Helper\RouteHelper;
2120

2221
/**
@@ -50,13 +49,10 @@ protected function reconcileNames($item)
5049
$params = $app->getParams();
5150
$item->description = '';
5251
$obj = json_decode($item->images);
53-
$introImage = $obj->{'image_intro'} ?? '';
5452

55-
if (isset($introImage) && ($introImage != ''))
53+
if (!empty($obj->image_intro))
5654
{
57-
$item->description = '<p>'
58-
. LayoutHelper::render('joomla.html.image', ['src' => preg_match('/http/', $introImage) ? $introImage : Uri::root() . $introImage])
59-
. '</p>';
55+
$item->description = '<p>' . HTMLHelper::_('image', $obj->image_intro, $obj->image_intro_alt) . '</p>';
6056
}
6157

6258
$item->description .= ($params->get('feed_summary', 0) ? $item->introtext . $item->fulltext : $item->introtext);

components/com_content/src/View/Featured/FeedView.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414
use Joomla\CMS\Categories\Categories;
1515
use Joomla\CMS\Document\Feed\FeedItem;
1616
use Joomla\CMS\Factory;
17+
use Joomla\CMS\HTML\HTMLHelper;
1718
use Joomla\CMS\Language\Text;
18-
use Joomla\CMS\Layout\LayoutHelper;
1919
use Joomla\CMS\MVC\View\AbstractView;
2020
use Joomla\CMS\Router\Route;
21-
use Joomla\CMS\Uri\Uri;
2221
use Joomla\Component\Content\Site\Helper\RouteHelper;
2322

2423
/**
@@ -64,13 +63,10 @@ public function display($tpl = null)
6463

6564
$description = '';
6665
$obj = json_decode($row->images);
67-
$introImage = $obj->{'image_intro'} ?? '';
6866

69-
if (isset($introImage) && ($introImage != ''))
67+
if (!empty($obj->image_intro))
7068
{
71-
$description = '<p>'
72-
. LayoutHelper::render('joomla.html.image', ['src' => preg_match('/http/', $introImage) ? $introImage : Uri::root() . $introImage])
73-
. '</p>';
69+
$description = '<p>' . HTMLHelper::_('image', $obj->image_intro, $obj->image_intro_alt) . '</p>';
7470
}
7571

7672
$description .= ($params->get('feed_summary', 0) ? $row->introtext . $row->fulltext : $row->introtext);

components/com_content/tmpl/categories/default_items.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
use Joomla\CMS\HTML\HTMLHelper;
1313
use Joomla\CMS\Language\Text;
14-
use Joomla\CMS\Layout\LayoutHelper;
1514
use Joomla\CMS\Router\Route;
1615
use Joomla\Component\Content\Site\Helper\RouteHelper;
1716

@@ -46,7 +45,7 @@ class="btn btn-secondary btn-sm"
4645
<?php endif; ?>
4746
</div>
4847
<?php if ($this->params->get('show_description_image') && $item->getParams()->get('image')) : ?>
49-
<?php echo LayoutHelper::render('joomla.html.image', ['src' => $item->getParams()->get('image'), 'alt' => $item->getParams()->get('image_alt')]); ?>
48+
<?php echo HTMLHelper::_('image', $item->getParams()->get('image'), $item->getParams()->get('image_alt')); ?>
5049
<?php endif; ?>
5150
<?php if ($this->params->get('show_subcat_desc_cat') == 1) : ?>
5251
<?php if ($item->description) : ?>

components/com_finder/tmpl/search/default_result.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
use Joomla\CMS\Factory;
1313
use Joomla\CMS\HTML\HTMLHelper;
1414
use Joomla\CMS\Language\Text;
15-
use Joomla\CMS\Layout\LayoutHelper;
1615
use Joomla\CMS\Router\Route;
1716
use Joomla\Component\Finder\Administrator\Helper\LanguageHelper;
1817
use Joomla\Component\Finder\Administrator\Indexer\Helper;
@@ -73,14 +72,13 @@
7372
?>
7473
<li class="result__item">
7574
<?php if ($showImage && isset($this->result->imageUrl)) : ?>
76-
<figure class="<?php echo htmlspecialchars($imageclass, ENT_COMPAT, 'UTF-8'); ?> result__image">
77-
<?php $extraAttr = array_merge($extraAttr, ['src' => $this->result->imageUrl, 'alt' => $this->result->imageAlt]); ?>
75+
<figure class="<?php echo htmlspecialchars($imageClass, ENT_COMPAT, 'UTF-8'); ?> result__image">
7876
<?php if ($this->params->get('link_image') && $this->result->route) : ?>
7977
<a href="<?php echo Route::_($this->result->route); ?>">
80-
<?php echo LayoutHelper::render('joomla.html.image', $extraAttr); ?>
78+
<?php echo HTMLHelper::_('image', $this->result->imageUrl, $this->result->imageAlt, $extraAttr); ?>
8179
</a>
8280
<?php else : ?>
83-
<?php echo LayoutHelper::render('joomla.html.image', $extraAttr); ?>
81+
<?php echo HTMLHelper::_('image', $this->result->imageUrl, $this->result->imageAlt, $extraAttr); ?>
8482
<?php endif; ?>
8583
</figure>
8684
<?php endif; ?>

components/com_tags/tmpl/tag/default.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
defined('_JEXEC') or die;
1111

1212
use Joomla\CMS\HTML\HTMLHelper;
13-
use Joomla\CMS\Layout\LayoutHelper;
1413

1514
// Note that there are certain parts of this layout used only when there is exactly one tag.
1615
$isSingleTag = count($this->item) === 1;
@@ -36,7 +35,7 @@
3635
<div class="com-tags-tag__description category-desc">
3736
<?php $images = json_decode($this->item[0]->images); ?>
3837
<?php if ($this->params->get('tag_list_show_tag_image', 1) == 1 && !empty($images->image_fulltext)) : ?>
39-
<?php echo LayoutHelper::render('joomla.html.image', ['src' => $images->image_fulltext, 'alt' => $images->image_fulltext_alt]); ?>
38+
<?php echo HTMLHelper::_('image', $images->image_fulltext, $images->image_fulltext_alt); ?>
4039
<?php endif; ?>
4140
<?php if ($this->params->get('tag_list_show_tag_description') == 1 && $this->item[0]->description) : ?>
4241
<?php echo HTMLHelper::_('content.prepare', $this->item[0]->description, '', 'com_tags.tag'); ?>
@@ -47,7 +46,7 @@
4746
<?php // If there are multiple tags and a description or image has been supplied use that. ?>
4847
<?php if ($this->params->get('tag_list_show_tag_description', 1) || $this->params->get('show_description_image', 1)) : ?>
4948
<?php if ($this->params->get('show_description_image', 1) == 1 && $this->params->get('tag_list_image')) : ?>
50-
<?php echo LayoutHelper::render('joomla.html.image', ['src' => $this->params->get('tag_list_image'), 'alt' => empty($this->params->get('tag_list_image_alt')) && empty($this->params->get('tag_list_image_alt_empty')) ? false : $this->params->get('tag_list_image_alt')]); ?>
49+
<?php echo HTMLHelper::_('image', $this->params->get('tag_list_image'), empty($this->params->get('tag_list_image_alt')) && empty($this->params->get('tag_list_image_alt_empty')) ? false : $this->params->get('tag_list_image_alt')); ?>
5150
<?php endif; ?>
5251
<?php if ($this->params->get('tag_list_description', '') > '') : ?>
5352
<?php echo HTMLHelper::_('content.prepare', $this->params->get('tag_list_description'), '', 'com_tags.tag'); ?>

components/com_tags/tmpl/tag/default_items.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
use Joomla\CMS\Factory;
1313
use Joomla\CMS\HTML\HTMLHelper;
1414
use Joomla\CMS\Language\Text;
15-
use Joomla\CMS\Layout\LayoutHelper;
1615
use Joomla\CMS\Router\Route;
1716
use Joomla\CMS\Uri\Uri;
1817
use Joomla\Component\Tags\Site\Helper\RouteHelper;
@@ -93,7 +92,7 @@ class="inputbox" onchange="document.adminForm.submit();"
9392
<?php $images = json_decode($item->core_images); ?>
9493
<?php if ($this->params->get('tag_list_show_item_image', 1) == 1 && !empty($images->image_intro)) : ?>
9594
<a href="<?php echo Route::_(RouteHelper::getItemRoute($item->content_item_id, $item->core_alias, $item->core_catid, $item->core_language, $item->type_alias, $item->router)); ?>">
96-
<?php echo LayoutHelper::render('joomla.html.image', ['src' => $images->image_intro, 'alt' => $images->image_intro_alt]); ?>
95+
<?php echo HTMLHelper::_('image', $images->image_intro, $images->image_intro_alt); ?>
9796
</a>
9897
<?php endif; ?>
9998
<?php if ($this->params->get('tag_list_show_item_description', 1)) : ?>

0 commit comments

Comments
 (0)