From f960907252e3f6e47d345cc3f7d3458817b5ec33 Mon Sep 17 00:00:00 2001 From: Tom Needham Date: Tue, 10 Oct 2017 13:06:59 +0200 Subject: [PATCH] Optionally show server hostname in status.php --- config/config.sample.php | 5 +++++ lib/public/Util.php | 1 - status.php | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/config/config.sample.php b/config/config.sample.php index 20b7a55d226f..a62d9bda629e 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -85,6 +85,11 @@ */ 'version.hide' => false, +/** + * Optionally, show the hostname of the server in status.php. Defaults to hidden + */ +'show_server_hostname' => false, + /** * Identifies the database used with this installation. See also config option * ``supportedDatabases`` diff --git a/lib/public/Util.php b/lib/public/Util.php index a98fff99e434..3286ea212c5b 100644 --- a/lib/public/Util.php +++ b/lib/public/Util.php @@ -746,7 +746,6 @@ public static function getStatusInfo($includeVersion = false, $serverHide = fals } } - return $values; } } diff --git a/status.php b/status.php index 7896079a466c..a75a20cf33c2 100644 --- a/status.php +++ b/status.php @@ -36,7 +36,9 @@ # show the version details based on config.php parameter, # but do not expose the servername in the public via url - $values = \OCP\Util::getStatusInfo(null,true); + $values = \OCP\Util::getStatusInfo( + null, + \OC::$server->getConfig()->getSystemValue('show_server_hostname', false) !== true); if (OC::$CLI) { print_r($values);