Skip to content

Commit 37db0bb

Browse files
committed
Merge remote-tracking branch 'upstream/5.3-dev' into upmerges/2024-11-20
2 parents 488e08e + 04d4276 commit 37db0bb

File tree

194 files changed

+1805
-438
lines changed

Some content is hidden

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

194 files changed

+1805
-438
lines changed

administrator/components/com_admin/script.php

Lines changed: 429 additions & 0 deletions
Large diffs are not rendered by default.

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

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -568,19 +568,38 @@ public function getDirectory(bool $public = false): array
568568

569569
$this->addDirectory('components', JPATH_SITE . '/components');
570570

571-
$this->addDirectory($cparams->get('image_path'), JPATH_SITE . '/' . $cparams->get('image_path'));
571+
$imagesDir = $cparams->get('image_path', 'images');
572+
$filesDir = $cparams->get('file_path', 'files');
573+
574+
$this->addDirectory($imagesDir, JPATH_SITE . '/' . $imagesDir);
572575

573576
// List all images folders
574-
$image_folders = new \DirectoryIterator(JPATH_SITE . '/' . $cparams->get('image_path'));
577+
$image_folders = new \DirectoryIterator(JPATH_SITE . '/' . $imagesDir);
578+
575579

576580
foreach ($image_folders as $folder) {
577581
if ($folder->isDot() || !$folder->isDir()) {
578582
continue;
579583
}
580584

581585
$this->addDirectory(
582-
'images/' . $folder->getFilename(),
583-
JPATH_SITE . '/' . $cparams->get('image_path') . '/' . $folder->getFilename()
586+
$imagesDir . '/' . $folder->getFilename(),
587+
JPATH_SITE . '/' . $imagesDir . '/' . $folder->getFilename()
588+
);
589+
}
590+
591+
$this->addDirectory($filesDir, JPATH_SITE . '/' . $filesDir);
592+
593+
$files_folders = new \DirectoryIterator(JPATH_SITE . '/' . $filesDir);
594+
595+
foreach ($files_folders as $folder) {
596+
if ($folder->isDot() || !$folder->isDir()) {
597+
continue;
598+
}
599+
600+
$this->addDirectory(
601+
$filesDir . '/' . $folder->getFilename(),
602+
JPATH_SITE . '/' . $filesDir . '/' . $folder->getFilename()
584603
);
585604
}
586605

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,14 @@ protected function populateState($ordering = 'a.id', $direction = 'desc')
143143
$this->context .= '.' . $forcedLanguage;
144144
}
145145

146+
// Required content filters for the administrator menu
147+
$this->getUserStateFromRequest($this->context . '.filter.category_id', 'filter_category_id');
148+
$this->getUserStateFromRequest($this->context . '.filter.level', 'filter_level');
149+
$this->getUserStateFromRequest($this->context . '.filter.author_id', 'filter_author_id');
150+
$this->getUserStateFromRequest($this->context . '.filter.tag', 'filter_tag', '');
151+
$this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access');
152+
$this->getUserStateFromRequest($this->context . '.filter.language', 'filter_language', '');
153+
146154
// List state information.
147155
parent::populateState($ordering, $direction);
148156

administrator/components/com_fields/src/Table/FieldTable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public function check()
154154
// Verify that the name is unique
155155
$table = new self($this->_db, $this->getDispatcher());
156156

157-
if ($table->load(['name' => $this->name, 'context' => $this->context]) && ($table->id != $this->id || $this->id == 0)) {
157+
if ($table->load(['name' => $this->name]) && ($table->id != $this->id || $this->id == 0)) {
158158
$this->setError(Text::_('COM_FIELDS_ERROR_UNIQUE_NAME'));
159159

160160
return false;

administrator/components/com_finder/src/Controller/IndexerController.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ class_alias(DebugAdapter::class, Adapter::class);
365365
$output .= '<dl class="row">';
366366

367367
foreach (DebugIndexer::$item as $key => $value) {
368-
$output .= '<dt class="col-sm-2">' . $key . '</dt><dd class="col-sm-10">' . $value . '</dd>';
368+
$output .= '<dt class="col-sm-2">' . $key . '</dt><dd class="col-sm-10 text-break">' . $value . '</dd>';
369369
}
370370

371371
$output .= '</dl>';
@@ -375,7 +375,7 @@ class_alias(DebugAdapter::class, Adapter::class);
375375
$output .= '<dl class="row">';
376376

377377
foreach (DebugIndexer::$item->getElements() as $key => $element) {
378-
$output .= '<dt class="col-sm-2">' . $key . '</dt><dd class="col-sm-10">' . $element . '</dd>';
378+
$output .= '<dt class="col-sm-2">' . $key . '</dt><dd class="col-sm-10 text-break">' . $element . '</dd>';
379379
}
380380

381381
$output .= '</dl>';
@@ -392,7 +392,7 @@ class_alias(DebugAdapter::class, Adapter::class);
392392
];
393393

394394
foreach (DebugIndexer::$item->getInstructions() as $key => $element) {
395-
$output .= '<dt class="col-sm-2">' . $contexts[$key] . '</dt><dd class="col-sm-10">' . json_encode($element) . '</dd>';
395+
$output .= '<dt class="col-sm-2">' . $contexts[$key] . '</dt><dd class="col-sm-10 text-break">' . json_encode($element) . '</dd>';
396396
}
397397

398398
$output .= '</dl>';
@@ -402,7 +402,7 @@ class_alias(DebugAdapter::class, Adapter::class);
402402
$output .= '<dl class="row">';
403403

404404
foreach (DebugIndexer::$item->getTaxonomy() as $key => $element) {
405-
$output .= '<dt class="col-sm-2">' . $key . '</dt><dd class="col-sm-10">' . json_encode($element) . '</dd>';
405+
$output .= '<dt class="col-sm-2">' . $key . '</dt><dd class="col-sm-10 text-break">' . json_encode($element) . '</dd>';
406406
}
407407

408408
$output .= '</dl>';

administrator/components/com_guidedtours/src/Controller/StepController.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,21 @@
2323
*/
2424
class StepController extends FormController
2525
{
26+
/**
27+
* Gets the URL arguments to append to a list redirect.
28+
*
29+
* @return string The arguments to append to the redirect URL.
30+
*
31+
* @since 5.2.2
32+
*/
33+
protected function getRedirectToListAppend()
34+
{
35+
$append = parent::getRedirectToListAppend();
36+
$tourId = $this->app->getUserState('com_guidedtours.tour_id');
37+
if (!empty($tourId)) {
38+
$append .= '&tour_id=' . $tourId;
39+
}
40+
41+
return $append;
42+
}
2643
}

administrator/components/com_installer/src/Model/UpdateModel.php

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
use Joomla\Database\Exception\ExecutionFailureException;
2525
use Joomla\Database\ParameterType;
2626
use Joomla\Database\QueryInterface;
27+
use Joomla\Filesystem\Path;
2728
use Joomla\Utilities\ArrayHelper;
2829

2930
// phpcs:disable PSR1.Files.SideEffects
@@ -358,10 +359,24 @@ public function update($uids, $minimumStability = Updater::STABILITY_STABLE)
358359
$update->set('extra_query', $updateSiteInstance->extra_query);
359360
}
360361

361-
$this->preparePreUpdate($update, $instance);
362-
363-
// Install sets state and enqueues messages
364-
$res = $this->install($update);
362+
try {
363+
$this->preparePreUpdate($update, $instance);
364+
365+
// Install sets state and enqueues messages
366+
$res = $this->install($update);
367+
} catch (\Throwable $t) {
368+
$res = false;
369+
370+
Factory::getApplication()->enqueueMessage(
371+
Text::sprintf(
372+
'COM_INSTALLER_UPDATE_ERROR',
373+
$instance->name,
374+
$t->getMessage(),
375+
(JDEBUG ? str_replace(JPATH_ROOT, 'JROOT', Path::clean($t->getFile())) . ':' . $t->getLine() : '')
376+
),
377+
'error'
378+
);
379+
}
365380

366381
if ($res) {
367382
$instance->delete($uid);

administrator/components/com_joomlaupdate/src/Controller/UpdateController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public function install()
123123
Log::add(Text::_('COM_JOOMLAUPDATE_UPDATE_LOG_INSTALL'), Log::INFO, 'Update');
124124

125125
$file = $this->app->getUserState('com_joomlaupdate.file', null);
126-
$model->createRestorationFile($file);
126+
$model->createUpdateFile($file);
127127

128128
$this->display();
129129
}

0 commit comments

Comments
 (0)