| ');
- $html = preg_replace('/ | ]*>([^<]+)<\/th>/', '\1', $html);
- $html = preg_replace('/ | ]*>([^<]+)<\/td>/', '\1', $html);
- $t = preg_split('/(]*>[^<]+<\/h2>)/', $html, -1, PREG_SPLIT_DELIM_CAPTURE);
- $r = [];
+ $html = strip_tags($html, ' | ');
+ $html = preg_replace('/ | ]*>([^<]+)<\/th>/', '\1', $html);
+ $html = preg_replace('/ | ]*>([^<]+)<\/td>/', '\1', $html);
+ $t = preg_split('/(]*>[^<]+<\/h2>)/', $html, -1, PREG_SPLIT_DELIM_CAPTURE);
+ $r = [];
$count = \count($t);
- $p1 = '([^<]+)<\/info>';
- $p2 = '/' . $p1 . '\s*' . $p1 . '\s*' . $p1 . '/';
- $p3 = '/' . $p1 . '\s*' . $p1 . '/';
+ $p1 = '([^<]+)<\/info>';
+ $p2 = '/' . $p1 . '\s*' . $p1 . '\s*' . $p1 . '/';
+ $p3 = '/' . $p1 . '\s*' . $p1 . '/';
for ($i = 1; $i < $count; $i++) {
if (preg_match('/]*>([^<]+)<\/h2>/', $t[$i], $matches)) {
diff --git a/administrator/components/com_admin/src/Service/HTML/Configuration.php b/administrator/components/com_admin/src/Service/HTML/Configuration.php
index aaf7190f59c21..bc9058b9f6831 100644
--- a/administrator/components/com_admin/src/Service/HTML/Configuration.php
+++ b/administrator/components/com_admin/src/Service/HTML/Configuration.php
@@ -1,4 +1,5 @@
linkButton('download', 'COM_ADMIN_DOWNLOAD_SYSTEM_INFORMATION_TEXT')
+ ->url(Route::_('index.php?option=com_admin&view=sysinfo&format=text&' . Session::getFormToken() . '=1'));
+
+ $toolbar->linkButton('download', 'COM_ADMIN_DOWNLOAD_SYSTEM_INFORMATION_JSON')
+ ->url(Route::_('index.php?option=com_admin&view=sysinfo&format=json&' . Session::getFormToken() . '=1'));
+
+ $toolbar->help('Site_System_Information');
}
}
diff --git a/administrator/components/com_admin/src/View/Sysinfo/JsonView.php b/administrator/components/com_admin/src/View/Sysinfo/JsonView.php
index b3d921509b363..4ea9d7d79ef07 100644
--- a/administrator/components/com_admin/src/View/Sysinfo/JsonView.php
+++ b/administrator/components/com_admin/src/View/Sysinfo/JsonView.php
@@ -17,6 +17,10 @@
use Joomla\CMS\MVC\View\AbstractView;
use Joomla\Component\Admin\Administrator\Model\SysinfoModel;
+// phpcs:disable PSR1.Files.SideEffects
+\defined('_JEXEC') or die;
+// phpcs:enable PSR1.Files.SideEffects
+
/**
* Sysinfo View class for the Admin component
*
@@ -71,7 +75,7 @@ protected function getLayoutData(): array
'config' => $model->getSafeData('config'),
'directories' => $model->getSafeData('directory', true),
'phpInfo' => $model->getSafeData('phpInfoArray'),
- 'extensions' => $model->getSafeData('extensions')
+ 'extensions' => $model->getSafeData('extensions'),
];
}
}
diff --git a/administrator/components/com_admin/src/View/Sysinfo/TextView.php b/administrator/components/com_admin/src/View/Sysinfo/TextView.php
index ec4d1d579d68d..603c565aeaebe 100644
--- a/administrator/components/com_admin/src/View/Sysinfo/TextView.php
+++ b/administrator/components/com_admin/src/View/Sysinfo/TextView.php
@@ -17,6 +17,10 @@
use Joomla\CMS\MVC\View\AbstractView;
use Joomla\Component\Admin\Administrator\Model\SysinfoModel;
+// phpcs:disable PSR1.Files.SideEffects
+\defined('_JEXEC') or die;
+// phpcs:enable PSR1.Files.SideEffects
+
/**
* Sysinfo View class for the Admin component
*
@@ -29,7 +33,7 @@ class TextView extends AbstractView
*
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
- * @return mixed A string if successful, otherwise an Error object.
+ * @return void
*
* @since 3.5
*
@@ -81,28 +85,28 @@ protected function getLayoutData(): array
return [
'info' => [
'title' => Text::_('COM_ADMIN_SYSTEM_INFORMATION', true),
- 'data' => $model->getSafeData('info')
+ 'data' => $model->getSafeData('info'),
],
'phpSettings' => [
'title' => Text::_('COM_ADMIN_PHP_SETTINGS', true),
- 'data' => $model->getSafeData('phpSettings')
+ 'data' => $model->getSafeData('phpSettings'),
],
'config' => [
'title' => Text::_('COM_ADMIN_CONFIGURATION_FILE', true),
- 'data' => $model->getSafeData('config')
+ 'data' => $model->getSafeData('config'),
],
'directories' => [
'title' => Text::_('COM_ADMIN_DIRECTORY_PERMISSIONS', true),
- 'data' => $model->getSafeData('directory', true)
+ 'data' => $model->getSafeData('directory', true),
],
'phpInfo' => [
'title' => Text::_('COM_ADMIN_PHP_INFORMATION', true),
- 'data' => $model->getSafeData('phpInfoArray')
+ 'data' => $model->getSafeData('phpInfoArray'),
],
'extensions' => [
'title' => Text::_('COM_ADMIN_EXTENSIONS', true),
- 'data' => $model->getSafeData('extensions')
- ]
+ 'data' => $model->getSafeData('extensions'),
+ ],
];
}
diff --git a/administrator/components/com_admin/tmpl/help/default.php b/administrator/components/com_admin/tmpl/help/default.php
index 1cfe5e816f6b3..69480f7d90311 100644
--- a/administrator/components/com_admin/tmpl/help/default.php
+++ b/administrator/components/com_admin/tmpl/help/default.php
@@ -32,7 +32,7 @@
|
- $item->level)); ?>
+ $item->level]); ?>
checked_out) : ?>
editor, $item->checked_out_time, 'categories.', $canCheckin); ?>
@@ -279,18 +279,19 @@
pagination->getListFooter(); ?>
- authorise('core.create', $extension)
+ authorise('core.create', $extension)
&& $user->authorise('core.edit', $extension)
&& $user->authorise('core.edit.state', $extension)
-) : ?>
+ ) : ?>
Text::_('COM_CATEGORIES_BATCH_OPTIONS'),
'footer' => $this->loadTemplate('batch_footer'),
- ),
+ ],
$this->loadTemplate('batch_body')
); ?>
diff --git a/administrator/components/com_categories/tmpl/categories/default.xml b/administrator/components/com_categories/tmpl/categories/default.xml
index a079d8beb0130..5c079cedbc2f8 100644
--- a/administrator/components/com_categories/tmpl/categories/default.xml
+++ b/administrator/components/com_categories/tmpl/categories/default.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/administrator/components/com_categories/tmpl/categories/default_batch_body.php b/administrator/components/com_categories/tmpl/categories/default_batch_body.php
index aa432d63f01c5..4dbc859a3324e 100644
--- a/administrator/components/com_categories/tmpl/categories/default_batch_body.php
+++ b/administrator/components/com_categories/tmpl/categories/default_batch_body.php
@@ -57,7 +57,7 @@
diff --git a/administrator/components/com_categories/tmpl/categories/modal.php b/administrator/components/com_categories/tmpl/categories/modal.php
index 819957f58ddc7..7554482925ad0 100644
--- a/administrator/components/com_categories/tmpl/categories/modal.php
+++ b/administrator/components/com_categories/tmpl/categories/modal.php
@@ -25,10 +25,12 @@
Session::checkToken('get') or die(Text::_('JINVALID_TOKEN'));
}
-HTMLHelper::_('behavior.core');
+/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
+$wa = $this->document->getWebAssetManager();
+$wa->useScript('core');
$extension = $this->escape($this->state->get('filter.extension'));
-$function = $app->input->getCmd('function', 'jSelectCategory');
+$function = $app->getInput()->getCmd('function', 'jSelectCategory');
$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));
?>
@@ -36,7 +38,7 @@
|
|