summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBrice Maron <brice@bmaron.net>2011-10-16 20:23:43 +0200
committerBrice Maron <brice@bmaron.net>2011-10-16 20:23:43 +0200
commit543537ef29bb6f0d9b93a5329e7443e6742452ab (patch)
tree4c474ebb81a73c9b9433340f33b13d772d0aba01 /lib
parent9ce15667d5351f21cc88598bb9a5fc757be3213a (diff)
downloadnextcloud-server-543537ef29bb6f0d9b93a5329e7443e6742452ab.tar.gz
nextcloud-server-543537ef29bb6f0d9b93a5329e7443e6742452ab.zip
Fix installer for postgresql : correct table detection query
Diffstat (limited to 'lib')
-rw-r--r--lib/setup.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/setup.php b/lib/setup.php
index 252eaaeea18..d13502c4adf 100644
--- a/lib/setup.php
+++ b/lib/setup.php
@@ -135,7 +135,7 @@ class OC_Setup {
$dbpass = $options['dbpass'];
$dbname = $options['dbname'];
$dbhost = $options['dbhost'];
- $dbtableprefix = $options['dbtableprefix'];
+ $dbtableprefix = 'oc_';
OC_CONFIG::setValue('dbname', $dbname);
OC_CONFIG::setValue('dbhost', $dbhost);
OC_CONFIG::setValue('dbtableprefix', $dbtableprefix);
@@ -178,7 +178,7 @@ class OC_Setup {
}
//fill the database if needed
- $query="SELECT * FROM {$dbtableprefix}users";
+ $query = "SELECT relname FROM pg_class WHERE relname='{$dbtableprefix}users' limit 1";
$result = pg_query($connection, $query);
if(!$result) {
OC_DB::createDbFromStructure('db_structure.xml');