Skip to content

Commit

Permalink
Merge pull request #29471 from owncloud/stable10-conditional-sever-na…
Browse files Browse the repository at this point in the history
…me-output

[stable10] Optionally show server hostname in status.php
  • Loading branch information
DeepDiver1975 authored Dec 5, 2017
2 parents 07f712f + f960907 commit 3871e85
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions config/config.sample.php
Original file line number Diff line number Diff line change
Expand Up @@ -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``
Expand Down
1 change: 0 additions & 1 deletion lib/public/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,6 @@ public static function getStatusInfo($includeVersion = false, $serverHide = fals
}
}


return $values;
}
}
4 changes: 3 additions & 1 deletion status.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3871e85

Please sign in to comment.