Skip to content

Instantly share code, notes, and snippets.

@schiessle
Created September 15, 2015 10:02
Show Gist options
  • Save schiessle/1df8b768786f99befcc5 to your computer and use it in GitHub Desktop.
Save schiessle/1df8b768786f99befcc5 to your computer and use it in GitHub Desktop.
public function isEnabled() {
$installed = $this->config->getSystemValue('installed', false);
if (!$installed) {
$this->logger->error('config.php installed was FALSE');
$path = \OC::$SERVERROOT . '/config/config.php';
if(file_exists(\OC::$SERVERROOT . '/config/config.php')) {
$this->logger->error('config.php exists (path: ' . $path . '). Content:');
$this->logger->error(file_get_contents(\OC::$SERVERROOT . '/config/config.php'));
} else {
$this->logger->error('config.php does NOT exists (path: ' . $path . ')');
}
return false;
}
$enabled = $this->config->getAppValue('core', 'encryption_enabled', 'debugDefault');
if ($enabled !== 'yes') {
$this->logger->error('Encryption NOT enabled. Value: ' . $enabled);
}
return $enabled === 'yes';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment