Skip to content

armgit / Vvveb

Public Imported from GitHub
0

Powerful and easy to use cms to build websites, blogs or ecommerce stores.

Added php info to system info page

givanz4d007245f4d1
diff --git a/admin/controller/tools/systeminfo.php b/admin/controller/tools/systeminfo.php
index e61966b..e9eb373 100755
--- a/admin/controller/tools/systeminfo.php
+++ b/admin/controller/tools/systeminfo.php
@@ -87,15 +87,17 @@ class SystemInfo extends Base {
list($info) = Event::trigger(__CLASS__, __FUNCTION__, $info);
$this->view->info = $info;
- /*
- ob_start();
- phpinfo();
- $php = ob_get_contents();
- ob_end_clean();
- $php = preg_replace('@^.+?<body><div class="center">|</div></body></html>@ms', '', $php);
- $php = preg_replace('@<table>@ms', '<table class="table table-bordered">', $php);
- $php = preg_replace('@<h2><a.+?>(.+?)</a></h2>@ms', '<h3>\1</h3>', $php);
+
+ if (isset($this->request->get['phpinfo'])) {
+ ob_start();
+ phpinfo();
+ $php = ob_get_contents();
+ ob_end_clean();
+ $php = preg_replace('@^.+?<body><div class="center">|</div></body></html>@ms', '', $php);
+ $php = preg_replace('@<table>@ms', '<table class="table table-bordered">', $php);
+ $php = preg_replace('@<h2><a.+?>(.+?)</a></h2>@ms', '<h3>\1</h3>', $php);
- $this->view->phpinfo = $php;*/
+ $this->view->phpinfo = $php;
+ }
}
}