Skip to content

Commit 9db0761

Browse files
authored
Merge pull request joomla#44631 from softforge/upmerges/2024-12-18
[6.0] Upmerges - 2024-12-8
2 parents 224196b + 1fc4d21 commit 9db0761

File tree

78 files changed

+147
-98
lines changed

Some content is hidden

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

78 files changed

+147
-98
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,13 @@ public function addLog($messages, $messageLanguageKey, $context, $userId = 0)
5555
@trigger_error(\sprintf('User ID must be an integer in %s.', __METHOD__), E_USER_DEPRECATED);
5656
}
5757

58-
$user = $userId ? $this->getUserFactory()->loadUserById($userId) : $this->getCurrentUser();
58+
try {
59+
$user = $userId ? $this->getUserFactory()->loadUserById($userId) : $this->getCurrentUser();
60+
} catch (\UnexpectedValueException $e) {
61+
@trigger_error(\sprintf('UserFactory must be set, this will not be caught anymore in 7.0.'), E_USER_DEPRECATED);
62+
$user = Factory::getUser($userId);
63+
}
64+
5965
$db = $this->getDatabase();
6066
$date = Factory::getDate();
6167
$params = ComponentHelper::getComponent('com_actionlogs')->getParams();

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ protected function prepareTable($table)
347347
// Set the values
348348
$table->created = $date->toSql();
349349
$table->created_by = $user->id;
350+
$table->version = 1;
350351

351352
// Set ordering to the last item if not set
352353
if (empty($table->ordering)) {
@@ -364,10 +365,8 @@ protected function prepareTable($table)
364365
// Set the values
365366
$table->modified = $date->toSql();
366367
$table->modified_by = $user->id;
368+
$table->version++;
367369
}
368-
369-
// Increment the content version number.
370-
$table->version++;
371370
}
372371

373372
/**

administrator/components/com_contact/src/Model/ContactModel.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@ protected function prepareTable($table)
363363
if (empty($table->id)) {
364364
// Set the values
365365
$table->created = $date;
366+
$table->version = 1;
366367

367368
// Set ordering to the last item if not set
368369
if (empty($table->ordering)) {
@@ -379,10 +380,8 @@ protected function prepareTable($table)
379380
// Set the values
380381
$table->modified = $date;
381382
$table->modified_by = $this->getCurrentUser()->id;
383+
$table->version++;
382384
}
383-
384-
// Increment the content version number.
385-
$table->version++;
386385
}
387386

388387
/**

administrator/components/com_content/src/Model/ArticleModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ protected function prepareTable($table)
347347
}
348348

349349
// Increment the content version number.
350-
$table->version++;
350+
$table->version = empty($table->version) ? 1 : $table->version + 1;
351351

352352
// Reorder the articles within the category so the new article is first
353353
if (empty($table->id)) {

administrator/components/com_newsfeeds/src/Model/NewsfeedModel.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ protected function prepareTable($table)
305305
if (empty($table->id)) {
306306
// Set the values
307307
$table->created = $date->toSql();
308+
$table->version = 1;
308309

309310
// Set ordering to the last item if not set
310311
if (empty($table->ordering)) {
@@ -321,10 +322,8 @@ protected function prepareTable($table)
321322
// Set the values
322323
$table->modified = $date->toSql();
323324
$table->modified_by = $user->id;
325+
$table->version++;
324326
}
325-
326-
// Increment the content version number.
327-
$table->version++;
328327
}
329328

330329
/**

administrator/components/com_plugins/src/Model/PluginsModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ protected function _getList($query, $limitstart = 0, $limit = 0)
135135
$escapedSearchString = $this->refineSearchStringToRegex($search, '/');
136136

137137
foreach ($result as $i => $item) {
138-
if (!preg_match("/$escapedSearchString/i", $item->name)) {
138+
if (!preg_match("/$escapedSearchString/iu", $item->name)) {
139139
unset($result[$i]);
140140
}
141141
}

administrator/components/com_tags/src/Model/TagModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ public function save($data)
325325
protected function prepareTable($table)
326326
{
327327
// Increment the content version number.
328-
$table->version++;
328+
$table->version = empty($table->version) ? 1 : $table->version + 1;
329329
}
330330

331331
/**

build/build.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,6 @@ function clean_composer(string $dir)
272272
$composerOptions .= '--no-dev';
273273
}
274274

275-
276275
echo "Start build for remote $remote.\n";
277276
echo "Delete old release folder.\n";
278277
system('rm -rf ' . $tmp);

components/com_tags/src/Service/Router.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,15 @@ public function parse(&$segments)
308308

309309
while (\count($segments)) {
310310
$id = array_shift($segments);
311-
$ids[] = $this->fixSegment($id);
311+
$slug = $this->fixSegment($id);
312+
313+
// We did not find the segment as a tag in the DB
314+
if ($slug === $id) {
315+
array_unshift($segments, $id);
316+
break;
317+
}
318+
319+
$ids[] = $slug;
312320
}
313321

314322
if (\count($ids)) {

components/com_users/src/View/Registration/HtmlView.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class HtmlView extends BaseHtmlView
6565
public $document;
6666

6767
/**
68-
* Should we show a captcha form for the submission of the article?
68+
* Should we show a captcha form for the registration of a user?
6969
*
7070
* @var boolean
7171
*

0 commit comments

Comments
 (0)