summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2016-09-14 14:26:41 +0200
committerGitHub <noreply@github.com>2016-09-14 14:26:41 +0200
commitc5189a93db706461bca2e726a25a889811a14e42 (patch)
tree02b07132c1a9ae38e8bf446a8764e709b377dc9c /lib
parentafddb138d941c26be0588b20d7b8d61524d86bf4 (diff)
parent4b26d7d86a6f08c4e2aabc86472c8133f36cf103 (diff)
downloadnextcloud-server-c5189a93db706461bca2e726a25a889811a14e42.tar.gz
nextcloud-server-c5189a93db706461bca2e726a25a889811a14e42.zip
Merge pull request #1375 from nextcloud/display-that-updating-failed-for-htaccess
Display an error when updating .htaccess failed
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Setup.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/Setup.php b/lib/private/Setup.php
index 3b3a57c3e96..4c72fbc9623 100644
--- a/lib/private/Setup.php
+++ b/lib/private/Setup.php
@@ -410,6 +410,7 @@ class Setup {
/**
* Append the correct ErrorDocument path for Apache hosts
+ * @return bool True when success, False otherwise
*/
public static function updateHtaccess() {
$config = \OC::$server->getConfig();
@@ -418,7 +419,7 @@ class Setup {
if(\OC::$CLI) {
$webRoot = $config->getSystemValue('overwrite.cli.url', '');
if($webRoot === '') {
- return;
+ return false;
}
$webRoot = parse_url($webRoot, PHP_URL_PATH);
$webRoot = rtrim($webRoot, '/');
@@ -472,9 +473,10 @@ class Setup {
if ($content !== '') {
//suppress errors in case we don't have permissions for it
- @file_put_contents($setupHelper->pathToHtaccess(), $htaccessContent.$content . "\n");
+ return (bool) @file_put_contents($setupHelper->pathToHtaccess(), $htaccessContent.$content . "\n");
}
+ return false;
}
public static function protectDataDirectory() {