Skip to content
Snippets Groups Projects
Commit 543537ef authored by Brice Maron's avatar Brice Maron
Browse files

Fix installer for postgresql : correct table detection query

parent 9ce15667
No related branches found
No related tags found
No related merge requests found
...@@ -135,7 +135,7 @@ class OC_Setup { ...@@ -135,7 +135,7 @@ class OC_Setup {
$dbpass = $options['dbpass']; $dbpass = $options['dbpass'];
$dbname = $options['dbname']; $dbname = $options['dbname'];
$dbhost = $options['dbhost']; $dbhost = $options['dbhost'];
$dbtableprefix = $options['dbtableprefix']; $dbtableprefix = 'oc_';
OC_CONFIG::setValue('dbname', $dbname); OC_CONFIG::setValue('dbname', $dbname);
OC_CONFIG::setValue('dbhost', $dbhost); OC_CONFIG::setValue('dbhost', $dbhost);
OC_CONFIG::setValue('dbtableprefix', $dbtableprefix); OC_CONFIG::setValue('dbtableprefix', $dbtableprefix);
...@@ -178,7 +178,7 @@ class OC_Setup { ...@@ -178,7 +178,7 @@ class OC_Setup {
} }
//fill the database if needed //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); $result = pg_query($connection, $query);
if(!$result) { if(!$result) {
OC_DB::createDbFromStructure('db_structure.xml'); OC_DB::createDbFromStructure('db_structure.xml');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment