Skip to content

Commit b34dc36

Browse files
authored
Merge branch '4.3-dev' into 4.3/help-toc
2 parents b5e7c43 + f8a788e commit b34dc36

File tree

226 files changed

+572
-457
lines changed

Some content is hidden

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

226 files changed

+572
-457
lines changed

administrator/components/com_admin/sql/updates/mysql/4.3.0-2023-02-15.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ INSERT IGNORE INTO `#__guidedtour_steps` (`id`, `tour_id`, `title`, `published`,
148148
(60, 7, 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_NEW_TITLE', 1, 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_NEW_DESCRIPTION', 60, 'bottom', '.button-new', 2, 1, 'administrator/index.php?option=com_banners&view=banners', CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 0, '*'),
149149
(61, 7, 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_TITLE_TITLE', 1, 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_TITLE_DESCRIPTION', 61, 'bottom', '#jform_name', 2, 2, 'administrator/index.php?option=com_banners&view=banner&layout=edit', CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 0, '*'),
150150
(62, 7, 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_ALIAS_TITLE', 1, 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_ALIAS_DESCRIPTION', 62, 'bottom', '#jform_alias', 2, 2, 'administrator/index.php?option=com_banners&view=banner&layout=edit', CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 0, '*'),
151-
(63, 7, 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_DESCRIPTION_TITLE', 1, 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_DESCRIPTION_DESCRIPTION', 63, 'bottom', '#jform_description,#jform_description_ifr', 2, 3, 'administrator/index.php?option=com_banners&view=banner&layout=edit', CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 0, '*'),
151+
(63, 7, 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_DETAILS_TITLE', 1, 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_DETAILS_DESCRIPTION', 63, 'bottom', '.col-lg-9', 2, 3, 'administrator/index.php?option=com_banners&view=banner&layout=edit', CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 0, '*'),
152152
(64, 7, 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_STATUS_TITLE', 1, 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_STATUS_DESCRIPTION', 64, 'bottom', '#jform_state', 2, 3, 'administrator/index.php?option=com_banners&view=banner&layout=edit', CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 0, '*'),
153153
(65, 7, 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_CATEGORY_TITLE', 1, 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_CATEGORY_DESCRIPTION', 65, 'top', 'joomla-field-fancy-select .choices[data-type=select-one]', 2, 3, 'administrator/index.php?option=com_banners&view=banner&layout=edit', CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 0, '*'),
154154
(66, 7, 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_PINNED_TITLE', 1, 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_PINNED_DESCRIPTION', 66, 'bottom', '#jform_sticky1', 2, 3, 'administrator/index.php?option=com_banners&view=banner&layout=edit', CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 0, '*'),
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
UPDATE `#__guidedtour_steps`
2+
SET `title` = 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_DETAILS_TITLE', `description` = 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_DETAILS_DESCRIPTION', `target` = '.col-lg-9'
3+
WHERE `id` = 63;

administrator/components/com_admin/sql/updates/postgresql/4.3.0-2023-02-15.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ INSERT INTO "#__guidedtour_steps" ("id", "tour_id", "title", "published", "descr
152152
(60, 7, 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_NEW_TITLE', 1, 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_NEW_DESCRIPTION', 60, 'bottom', '.button-new', 2, 1, 'administrator/index.php?option=com_banners&view=banners', CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0, '*'),
153153
(61, 7, 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_TITLE_TITLE', 1, 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_TITLE_DESCRIPTION', 61, 'bottom', '#jform_name', 2, 2, 'administrator/index.php?option=com_banners&view=banner&layout=edit', CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0, '*'),
154154
(62, 7, 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_ALIAS_TITLE', 1, 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_ALIAS_DESCRIPTION', 62, 'bottom', '#jform_alias', 2, 2, 'administrator/index.php?option=com_banners&view=banner&layout=edit', CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0, '*'),
155-
(63, 7, 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_DESCRIPTION_TITLE', 1, 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_DESCRIPTION_DESCRIPTION', 63, 'bottom', '#jform_description,#jform_description_ifr', 2, 3, 'administrator/index.php?option=com_banners&view=banner&layout=edit', CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0, '*'),
155+
(63, 7, 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_DETAILS_TITLE', 1, 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_DETAILS_DESCRIPTION', 63, 'bottom', '.col-lg-9', 2, 3, 'administrator/index.php?option=com_banners&view=banner&layout=edit', CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0, '*'),
156156
(64, 7, 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_STATUS_TITLE', 1, 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_STATUS_DESCRIPTION', 64, 'bottom', '#jform_state', 2, 3, 'administrator/index.php?option=com_banners&view=banner&layout=edit', CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0, '*'),
157157
(65, 7, 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_CATEGORY_TITLE', 1, 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_CATEGORY_DESCRIPTION', 65, 'top', 'joomla-field-fancy-select .choices[data-type=select-one]', 2, 3, 'administrator/index.php?option=com_banners&view=banner&layout=edit', CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0, '*'),
158158
(66, 7, 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_PINNED_TITLE', 1, 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_PINNED_DESCRIPTION', 66, 'bottom', '#jform_sticky1', 2, 3, 'administrator/index.php?option=com_banners&view=banner&layout=edit', CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0, '*'),
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
UPDATE "#__guidedtour_steps"
2+
SET "title" = 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_DETAILS_TITLE', "description" = 'COM_GUIDEDTOURS_TOUR_BANNERS_STEP_DETAILS_DESCRIPTION', "target" = '.col-lg-9'
3+
WHERE "id" = 63;

administrator/components/com_admin/src/Model/SysinfoModel.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,9 @@ public function &getInfo(): array
336336
*/
337337
public function phpinfoEnabled(): bool
338338
{
339-
return !\in_array('phpinfo', explode(',', ini_get('disable_functions')));
339+
// remove any spaces from the ini value before exploding it
340+
$disabledFunctions = str_replace(' ', '', ini_get('disable_functions'));
341+
return !\in_array('phpinfo', explode(',', $disabledFunctions));
340342
}
341343

342344
/**

administrator/components/com_banners/src/Model/BannerModel.php

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515
use Joomla\CMS\Language\Text;
1616
use Joomla\CMS\MVC\Model\AdminModel;
1717
use Joomla\CMS\Table\Table;
18+
use Joomla\CMS\Table\TableInterface;
1819
use Joomla\CMS\Versioning\VersionableModelTrait;
1920
use Joomla\Component\Categories\Administrator\Helper\CategoriesHelper;
21+
use Joomla\Database\ParameterType;
2022

2123
// phpcs:disable PSR1.Files.SideEffects
2224
\defined('_JEXEC') or die;
@@ -64,6 +66,34 @@ class BannerModel extends AdminModel
6466
'language_id' => 'batchLanguage',
6567
];
6668

69+
/**
70+
* Data cleanup after batch copying data
71+
*
72+
* @param TableInterface $table The table object containing the newly created item
73+
* @param integer $newId The id of the new item
74+
* @param integer $oldId The original item id
75+
*
76+
* @return void
77+
*
78+
* @since __DEPLOY_VERSION__
79+
*/
80+
protected function cleanupPostBatchCopy(TableInterface $table, $newId, $oldId)
81+
{
82+
// Initialise clicks and impmade
83+
$db = $this->getDatabase();
84+
85+
$query = $db->getQuery(true)
86+
->update($db->quoteName('#__banners'))
87+
->set($db->quoteName('clicks') . ' = 0')
88+
->set($db->quoteName('impmade') . ' = 0')
89+
->where($db->quoteName('id') . ' = :newId')
90+
->bind(':newId', $newId, ParameterType::INTEGER);
91+
92+
$db->setQuery($query);
93+
$db->execute();
94+
}
95+
96+
6797
/**
6898
* Batch client changes for a group of banners.
6999
*
@@ -429,6 +459,11 @@ public function save($data)
429459
$data['state'] = 0;
430460
}
431461

462+
if ($input->get('task') == 'save2copy' || $input->get('task') == 'copy') {
463+
$data['clicks'] = 0;
464+
$data['impmade'] = 0;
465+
}
466+
432467
return parent::save($data);
433468
}
434469

administrator/components/com_banners/tmpl/banner/edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
?>
2727

28-
<form action="<?php echo Route::_('index.php?option=com_banners&layout=edit&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="banner-form" aria-label="<?php echo Text::_('COM_BANNERS_BANNER_FORM_' . ((int) $this->item->id === 0 ? 'NEW' : 'EDIT'), true); ?>" class="form-validate">
28+
<form action="<?php echo Route::_('index.php?option=com_banners&layout=edit&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="banner-form" aria-label="<?php echo Text::_('COM_BANNERS_BANNER_' . ((int) $this->item->id === 0 ? 'NEW' : 'EDIT'), true); ?>" class="form-validate">
2929

3030
<?php echo LayoutHelper::render('joomla.edit.title_alias', $this); ?>
3131

administrator/components/com_banners/tmpl/banners/default_batch_body.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
/** @var \Joomla\Component\Banners\Administrator\View\Banners\HtmlView $this */
1818

19-
$published = $this->state->get('filter.published');
19+
$published = (int) $this->state->get('filter.published');
2020
?>
2121

2222

administrator/components/com_banners/tmpl/client/edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
?>
2626

27-
<form action="<?php echo Route::_('index.php?option=com_banners&layout=edit&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="client-form" aria-label="<?php echo Text::_('COM_BANNERS_CLIENT_FORM_' . ((int) $this->item->id === 0 ? 'NEW' : 'EDIT'), true); ?>" class="form-validate">
27+
<form action="<?php echo Route::_('index.php?option=com_banners&layout=edit&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="client-form" aria-label="<?php echo Text::_('COM_BANNERS_CLIENT_' . ((int) $this->item->id === 0 ? 'NEW' : 'EDIT'), true); ?>" class="form-validate">
2828

2929
<?php echo LayoutHelper::render('joomla.edit.title_alias', $this); ?>
3030

administrator/components/com_cache/src/View/Cache/HtmlView.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function display($tpl = null): void
106106
throw new GenericDataException(implode("\n", $errors), 500);
107107
}
108108

109-
if (!\count($this->data)) {
109+
if (!\count($this->data) && $this->state->get('filter.search') === '') {
110110
$this->setLayout('emptystate');
111111
}
112112

0 commit comments

Comments
 (0)