summaryrefslogtreecommitdiffstats
path: root/lib/db.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/db.php')
-rw-r--r--lib/db.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/db.php b/lib/db.php
index 9e6835adc6f..2a06d72ea32 100644
--- a/lib/db.php
+++ b/lib/db.php
@@ -128,6 +128,14 @@ class OC_DB {
}else{
$dsn='pgsql:dbname='.$name.';host='.$host;
}
+ /**
+ * Ugly fix for pg connections pbm when password use spaces
+ */
+ $e_user = addslashes($user);
+ $e_password = addslashes($pass);
+ $pass = $user = null;
+ $dsn .= ";user='$e_user';password='$e_password'";
+ /** END OF FIX***/
break;
}
try{
@@ -528,7 +536,7 @@ class OC_DB {
self::removeDBStructure( OC::$SERVERROOT . '/db_structure.xml' );
foreach($apps as $app){
- $path = self::getAppPath($app).'/appinfo/database.xml';
+ $path = OC_App::getAppPath($app).'/appinfo/database.xml';
if(file_exists($path)){
self::removeDBStructure( $path );
}