[Pkg-owncloud-commits] [owncloud] 04/83: fix enabling apps for oracle cornercase
David Prévot
taffit at moszumanska.debian.org
Wed Dec 18 13:05:24 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch 5.0
in repository owncloud.
commit 5965b68cc3fc212756a2904086f051136103003f
Author: Jörn Friedrich Dreyer <jfd at butonic.de>
Date: Wed Nov 6 18:28:26 2013 +0100
fix enabling apps for oracle cornercase
---
lib/db.php | 26 +++++++++++++++++++++++---
1 file changed, 23 insertions(+), 3 deletions(-)
diff --git a/lib/db.php b/lib/db.php
index 01f8864..4932c5f 100644
--- a/lib/db.php
+++ b/lib/db.php
@@ -561,9 +561,29 @@ class OC_DB {
* TODO: write more documentation
*/
public static function createDbFromStructure( $file ) {
- $CONFIG_DBNAME = OC_Config::getValue( "dbname", "owncloud" );
- $CONFIG_DBTABLEPREFIX = OC_Config::getValue( "dbtableprefix", "oc_" );
- $CONFIG_DBTYPE = OC_Config::getValue( "dbtype", "sqlite" );
+ $CONFIG_DBNAME = OC_Config::getValue('dbname', 'owncloud');
+ $CONFIG_DBTABLEPREFIX = OC_Config::getValue('dbtableprefix', 'oc_');
+ $CONFIG_DBTYPE = OC_Config::getValue('dbtype', 'sqlite');
+ $CONFIG_DBHOST = OC_Config::getValue('dbhost', '');
+
+ if( $CONFIG_DBTYPE === 'oci'
+ && $CONFIG_DBNAME === ''
+ && $CONFIG_DBHOST !== null && $CONFIG_DBHOST !== ''
+ ) {
+ // we are connecting by user name, pwd and SID (host)
+ $CONFIG_DBUSER = OC_Config::getValue('dbuser', '');
+ $CONFIG_DBPASSWORD = OC_Config::getValue('dbpassword');
+ if ($CONFIG_DBUSER !== ''
+ && $CONFIG_DBPASSWORD !== ''
+ ) {
+ // use dbuser as dbname
+ $CONFIG_DBNAME = $CONFIG_DBUSER;
+ } else {
+ throw new DatabaseException('Please specify '
+ .'username and password when '
+ .'connecting via SID as the hostname.');
+ }
+ }
// cleanup the cached queries
self::$preparedQueries = array();
--
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