Skip to content

Commit 25a154c

Browse files
committed
Merge remote-tracking branch 'Joomla/5.3-dev' into upmerges/2025-01-08
2 parents 250d8db + e038933 commit 25a154c

File tree

38 files changed

+272
-351
lines changed

38 files changed

+272
-351
lines changed

administrator/components/com_actionlogs/src/Model/ActionlogModel.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ protected function sendNotificationEmails($messages, $username, $context)
126126
$query = $db->getQuery(true);
127127

128128
$query
129-
->select($db->quoteName(['u.email', 'l.extensions']))
129+
->select($db->quoteName(['u.email', 'u.username', 'l.extensions', 'l.exclude_self']))
130130
->from($db->quoteName('#__users', 'u'))
131131
->where($db->quoteName('u.block') . ' = 0')
132132
->join(
@@ -142,6 +142,10 @@ protected function sendNotificationEmails($messages, $username, $context)
142142
$recipients = [];
143143

144144
foreach ($users as $user) {
145+
if ($user->username === $this->getCurrentUser()->username && $user->exclude_self) {
146+
continue;
147+
}
148+
145149
$extensions = json_decode($user->extensions, true);
146150

147151
if ($extensions && \in_array(strtok($context, '.'), $extensions)) {
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
INSERT INTO `#__action_log_config` (`type_title`, `type_alias`, `id_holder`, `title_holder`, `table_name`, `text_prefix`) VALUES
2+
('contact', 'com_contact.form', 'id', 'name', '#__contact_details', 'PLG_ACTIONLOG_JOOMLA');
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE `#__action_logs_users` ADD COLUMN `exclude_self` tinyint NOT NULL DEFAULT 0;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
INSERT INTO "#__action_log_config" ("type_title", "type_alias", "id_holder", "title_holder", "table_name", "text_prefix") VALUES
2+
('contact', 'com_contact.form', 'id', 'name', '#__contact_details', 'PLG_ACTIONLOG_JOOMLA');
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE "#__action_logs_users" ADD COLUMN "exclude_self" integer DEFAULT 0 NOT NULL;

administrator/components/com_config/src/Model/ApplicationModel.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,19 @@ public function save($data)
299299
'prefix' => $data['dbprefix'],
300300
];
301301

302+
// Validate database name
303+
if (\in_array($options['driver'], ['pgsql', 'postgresql']) && !preg_match('#^[a-zA-Z_][0-9a-zA-Z_$]*$#', $options['database'])) {
304+
$app->enqueueMessage(Text::_('COM_CONFIG_FIELD_DATABASE_NAME_INVALID_MSG_POSTGRES'), 'warning');
305+
306+
return false;
307+
}
308+
309+
if (\in_array($options['driver'], ['mysql', 'mysqli']) && preg_match('#[\\\\\/]#', $options['database'])) {
310+
$app->enqueueMessage(Text::_('COM_CONFIG_FIELD_DATABASE_NAME_INVALID_MSG_MYSQL'), 'warning');
311+
312+
return false;
313+
}
314+
302315
if ((int) $data['dbencryption'] !== 0) {
303316
$options['ssl'] = [
304317
'enable' => true,

administrator/components/com_contact/tmpl/contacts/default_batch_body.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,6 @@
4848
<?php echo LayoutHelper::render('joomla.html.batch.tag', []); ?>
4949
</div>
5050
</div>
51-
<div class="form-group col-md-6">
52-
<div class="controls">
53-
<?php echo LayoutHelper::render('joomla.html.batch.user', ['noUser' => $noUser]); ?>
54-
</div>
55-
</div>
5651
</div>
5752
</div>
5853
<div class="btn-toolbar p-3">

administrator/components/com_finder/src/View/Index/HtmlView.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,15 @@ class HtmlView extends BaseHtmlView
112112
*/
113113
private $isEmptyState = false;
114114

115+
/**
116+
* The finder plugins status
117+
*
118+
* @var boolean
119+
*
120+
* @since __DEPLOY_VERSION__
121+
*/
122+
protected $finderPlugins = true;
123+
115124
/**
116125
* Method to display the view.
117126
*
@@ -157,6 +166,11 @@ public function display($tpl = null)
157166
$this->finderPluginId = FinderHelper::getFinderPluginId();
158167
}
159168

169+
// Check that the finder plugins are enabled
170+
if (!PluginHelper::getPlugin('finder')) {
171+
$this->finderPlugins = false;
172+
}
173+
160174
// Configure the toolbar.
161175
$this->addToolbar();
162176

administrator/components/com_finder/tmpl/index/default.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@
5252
Factory::getApplication()->enqueueMessage(Text::sprintf('COM_FINDER_INDEX_PLUGIN_CONTENT_NOT_ENABLED_LINK', $link), 'warning');
5353
}
5454

55+
// Show warning that the finder plugins are disabled
56+
if (!$this->finderPlugins) {
57+
$url = 'index.php?option=com_plugins&filter[folder]=finder';
58+
$link = HTMLHelper::_('link', Route::_($url), Text::_('COM_FINDER_FINDER_PLUGINS'), 'class="alert-link"');
59+
Factory::getApplication()->enqueueMessage(Text::sprintf('COM_FINDER_INDEX_PLUGIN_FINDER_NOT_ENABLED_LINK', $link), 'warning');
60+
}
61+
5562
?>
5663
<form action="<?php echo Route::_('index.php?option=com_finder&view=index'); ?>" method="post" name="adminForm" id="adminForm">
5764
<div class="row">

administrator/components/com_finder/tmpl/index/emptystate.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,10 @@
5555
);
5656
Factory::getApplication()->enqueueMessage(Text::sprintf('COM_FINDER_INDEX_PLUGIN_CONTENT_NOT_ENABLED_LINK', $link), 'warning');
5757
}
58+
59+
// Show warning that the finder plugins are disabled
60+
if (!$this->finderPlugins) {
61+
$url = 'index.php?option=com_plugins&filter[folder]=finder';
62+
$link = HTMLHelper::_('link', Route::_($url), Text::_('COM_FINDER_FINDER_PLUGINS'), 'class="alert-link"');
63+
Factory::getApplication()->enqueueMessage(Text::sprintf('COM_FINDER_INDEX_PLUGIN_FINDER_NOT_ENABLED_LINK', $link), 'warning');
64+
}

0 commit comments

Comments
 (0)