diff --git a/site/plugins/admin/app/Controllers/ToolsController.php b/site/plugins/admin/app/Controllers/ToolsController.php
index 24d91be9..57b1cd3d 100644
--- a/site/plugins/admin/app/Controllers/ToolsController.php
+++ b/site/plugins/admin/app/Controllers/ToolsController.php
@@ -68,6 +68,11 @@ class ToolsController extends Controller
'title' => __('admin_cache'),
'attributes' => ['class' => 'navbar-item']
],
+ 'registry' => [
+ 'link' => $this->router->pathFor('admin.tools.registry'),
+ 'title' => __('admin_registry'),
+ 'attributes' => ['class' => 'navbar-item']
+ ],
]
]
);
@@ -107,6 +112,11 @@ class ToolsController extends Controller
'title' => __('admin_cache'),
'attributes' => ['class' => 'navbar-item active']
],
+ 'registry' => [
+ 'link' => $this->router->pathFor('admin.tools.registry'),
+ 'title' => __('admin_registry'),
+ 'attributes' => ['class' => 'navbar-item']
+ ],
],
'buttons' => [
'tools_clear_cache' => [
@@ -122,6 +132,55 @@ class ToolsController extends Controller
}
+ /**
+ * Information page
+ *
+ * @param Request $request PSR7 request
+ * @param Response $response PSR7 response
+ *
+ * @return Response
+ */
+ public function registry(Request $request, Response $response) : Response
+ {
+
+ if (function_exists('apache_get_modules')) {
+ if (!in_array('mod_rewrite', apache_get_modules())) {
+ $apache_mod_rewrite_installed = false;
+ } else {
+ $apache_mod_rewrite_installed = true;
+ }
+ } else {
+ $apache_mod_rewrite_installed = true;
+ }
+
+ return $this->view->render(
+ $response,
+ 'plugins/admin/views/templates/system/tools/registry.html',
+ [
+ 'menu_item' => 'tools',
+ 'registry_dump' => $this->niceArray($this->registry->dump()),
+ 'links' => [
+ 'information' => [
+ 'link' => $this->router->pathFor('admin.tools.index'),
+ 'title' => __('admin_information'),
+ 'attributes' => ['class' => 'navbar-item']
+ ],
+ 'cache' => [
+ 'link' => $this->router->pathFor('admin.tools.cache'),
+ 'title' => __('admin_cache'),
+ 'attributes' => ['class' => 'navbar-item']
+ ],
+ 'registry' => [
+ 'link' => $this->router->pathFor('admin.tools.registry'),
+ 'title' => __('admin_registry'),
+ 'attributes' => ['class' => 'navbar-item active']
+ ],
+ ]
+ ]
+ );
+ }
+
+
public function clearCacheProcess($request, $response)
{
$id = $request->getParsedBody()['cache-id'];
@@ -143,6 +202,22 @@ class ToolsController extends Controller
}
+ function niceArray($arr){
+ $retStr = '
';
+ if (is_array($arr)){
+ foreach ($arr as $key=>$val){
+ if (is_array($val)){
+ $retStr .= '- ' . $key . ' => array(' . $this->niceArray($val) . ')
';
+ }else{
+ $retStr .= '- ' . $key . ' => ' . ($val == '' ? '""' : $val) . '
';
+ }
+ }
+ }
+ $retStr .= '
';
+
+ return $retStr;
+ }
+
public function getDirectorySize($path)
{
$bytestotal = 0;
diff --git a/site/plugins/admin/views/templates/system/information/index.html b/site/plugins/admin/views/templates/system/information/index.html
deleted file mode 100644
index 9822da95..00000000
--- a/site/plugins/admin/views/templates/system/information/index.html
+++ /dev/null
@@ -1,63 +0,0 @@
-{% extends "plugins/admin/views/partials/base.html" %}
-
-{% block content %}
-{{ tr('admin_system') }}
-
-
-
- {{ tr('admin_flextype_version') }} |
- {{ FLEXTYPE_VERSION }} |
-
-
- {{ tr('admin_debugging') }} |
-
- {% if registry.settings.errors.display %}
- {{ tr('admin_on') }}
- {% else %}
- {{ tr('admin_off') }}
- {% endif %}
- |
-
-
- {{ tr('admin_cache') }} |
-
- {% if registry.settings.cache.enabled %}
- {{ tr('admin_on') }}
- {% else %}
- {{ tr('admin_off') }}
- {% endif %}
- |
-
-
-
-
-
-
-{{ tr('admin_server') }}
-
-
-
-
- {{ tr('admin_php_version') }} |
- |
-
-
- {{ tr('admin_php_built_on') }} |
- {{ php_uname }} |
-
-
- {{ tr('admin_web_server') }} |
- {{ webserver }} |
-
-
- {{ tr('admin_web_server_php_interface') }} |
- {{ php_sapi_name }} |
-
- {% if apache_mod_rewrite_installed %}
- Apache Mod Rewrite | {{ tr('admin_installed') }} |
- {% else %}
- Apache Mod Rewrite | {{ tr('admin_not_installed') }} |
- {% endif %}
-
-
-{% endblock %}
diff --git a/site/plugins/admin/views/templates/system/tools/registry.html b/site/plugins/admin/views/templates/system/tools/registry.html
new file mode 100644
index 00000000..5f6a6400
--- /dev/null
+++ b/site/plugins/admin/views/templates/system/tools/registry.html
@@ -0,0 +1,5 @@
+{% extends "plugins/admin/views/partials/base.html" %}
+
+{% block content %}
+ {{ registry_dump|raw }}
+{% endblock %}