Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/issuetemplate.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2018-02-08 16:09:30 +0300
committerJulius Härtl <jus@bitgrid.net>2018-08-15 18:39:15 +0300
commitfb90bb56de06a9e3f28e5120dd726d0c5c2426b7 (patch)
tree06a174d54521f5f86abfff188a75a05d54b18e9f /lib
parent9eb7e4abf0e28dc1816261d62783e25c387b4ad7 (diff)
Add boolean type
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/Controller/APIController.php3
-rw-r--r--lib/IDetail.php1
-rw-r--r--lib/Sections/ServerSection.php21
3 files changed, 13 insertions, 12 deletions
diff --git a/lib/Controller/APIController.php b/lib/Controller/APIController.php
index 991e708..ec4a9ae 100644
--- a/lib/Controller/APIController.php
+++ b/lib/Controller/APIController.php
@@ -111,6 +111,9 @@ class APIController extends Controller {
case IDetail::TYPE_SINGLE_LINE:
return 'input';
break;
+ case IDetail::TYPE_BOOLEAN:
+ return 'checkbox';
+ break;
default:
return 'textArea';
break;
diff --git a/lib/IDetail.php b/lib/IDetail.php
index f05c9fb..b0af18b 100644
--- a/lib/IDetail.php
+++ b/lib/IDetail.php
@@ -29,6 +29,7 @@ interface IDetail {
const TYPE_MULTI_LINE_PREFORMAT = 2;
const TYPE_COLLAPSIBLE = 3;
const TYPE_COLLAPSIBLE_PREFORMAT = 4;
+ const TYPE_BOOLEAN = 5;
/**
* Returns a unique identifier for the detail value
diff --git a/lib/Sections/ServerSection.php b/lib/Sections/ServerSection.php
index 354cdb8..c823d13 100644
--- a/lib/Sections/ServerSection.php
+++ b/lib/Sections/ServerSection.php
@@ -58,7 +58,7 @@ class ServerSection extends Section {
$this->createDetail('Operating system', $this->getOsVersion());
$this->createDetail('Webserver', $this->getWebserver());
$this->createDetail('Database', $this->getDatabaseInfo());
- $this->createDetail('PHP version', $this->getPhpVersion());
+ $this->createDetail('PHP version', $this->getPhpVersion(), IDetail::TYPE_MULTI_LINE);
$this->createDetail('Nextcloud version', $this->getNextcloudVersion());
$this->createDetail('Updated from an older Nextcloud/ownCloud or fresh install', '');
$this->createDetail('Where did you install Nextcloud from', $this->getInstallMethod());
@@ -68,19 +68,16 @@ class ServerSection extends Section {
$this->createDetail('Configuration (config/config.php)', print_r(json_encode($this->getConfig(), JSON_PRETTY_PRINT), true), IDetail::TYPE_COLLAPSIBLE_PREFORMAT);
$this->createDetail('Are you using external storage, if yes which one', 'local/smb/sftp/...');
- $this->createDetail('Are you using encryption', $this->getEncryptionInfo());
+ $this->createDetail('Are you using encryption', $this->getEncryptionInfo() === 'yes' ? true : false, IDetail::TYPE_BOOLEAN);
$this->createDetail('Are you using an external user-backend, if yes which one', 'LDAP/ActiveDirectory/Webdav/...');
- $this->createDetail('LDAP configuration (delete this part if not used)', 'With access to your command line run e.g.:
-sudo -u www-data php occ ldap:show-config
-from within your Nextcloud installation folder
-
-Without access to your command line download the data/owncloud.db to your local
-computer or access your SQL server remotely and run the select query:
-SELECT * FROM `oc_appconfig` WHERE `appid` = \'user_ldap\';
-
-
-Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.', IDetail::TYPE_COLLAPSIBLE_PREFORMAT);
+ if($this->appManager->isEnabledForUser('user_ldap')) {
+ $ldap = '';
+ foreach ($this->config->getAppKeys('user_ldap') as $key) {
+ $ldap .= $key . ': ' . $this->config->getAppValue('user_ldap', $key);
+ }
+ $this->createDetail('LDAP configuration (delete this par if not used)', $ldap, IDetail::TYPE_COLLAPSIBLE_PREFORMAT);
+ }
}
private function getWebserver() {
if (isset($_SERVER['SERVER_SOFTWARE']) && !empty($_SERVER['SERVER_SOFTWARE'])) {