[Pkg-owncloud-commits] [owncloud] 18/75: Fix installer for postgresql : correct table detection query

David Prévot taffit at alioth.debian.org
Fri Nov 8 23:08:30 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v3.0.1
in repository owncloud.

commit 6c19f6dc4ed0a54a6ab0cd6268fd336edda36078
Author: Brice Maron <brice at bmaron.net>
Date:   Sun Oct 16 20:23:43 2011 +0200

    Fix installer for postgresql : correct table detection query
---
 lib/setup.php |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/setup.php b/lib/setup.php
index 355d979..071108a 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');

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list