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

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrice Maron <brice@bmaron.net>2012-12-04 00:20:17 +0400
committerBrice Maron <brice@bmaron.net>2012-12-04 00:20:17 +0400
commit4327ed83820f045395bbf1431cdddbdedfa19555 (patch)
tree9a05bdc9513853440243977f155f89aa799c8fd3 /lib/setup.php
parent4cb760a92402ab3eb8550fb05b05eae800030680 (diff)
Revoke DB rights on install only if the db is newly created
Diffstat (limited to 'lib/setup.php')
-rw-r--r--lib/setup.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/setup.php b/lib/setup.php
index 264cd55795e..fdd10be6824 100644
--- a/lib/setup.php
+++ b/lib/setup.php
@@ -319,9 +319,11 @@ class OC_Setup {
$entry.='Offending command was: '.$query.'<br />';
echo($entry);
}
+ else {
+ $query = "REVOKE ALL PRIVILEGES ON DATABASE \"$e_name\" FROM PUBLIC";
+ $result = pg_query($connection, $query);
+ }
}
- $query = "REVOKE ALL PRIVILEGES ON DATABASE \"$e_name\" FROM PUBLIC";
- $result = pg_query($connection, $query);
}
private static function pg_createDBUser($name, $password, $connection) {