aboutsummaryrefslogtreecommitdiffstats
path: root/lib/MDB2
diff options
context:
space:
mode:
authorBart Visscher <bart@thisnet.nl>2011-09-18 19:37:54 +0200
committerBart Visscher <bart@thisnet.nl>2011-09-18 19:37:54 +0200
commit82c7598861db175617694891bb9f21b426426225 (patch)
treefce8fb4717b4cc2a5dc6da8835bdb51b5fb40054 /lib/MDB2
parentd5656716f69caa6a1eb98706994ffcb9a08553a7 (diff)
downloadnextcloud-server-82c7598861db175617694891bb9f21b426426225.tar.gz
nextcloud-server-82c7598861db175617694891bb9f21b426426225.zip
Remove global vars and use the OC static version.
Removed global vars are DOCUMENTROOT, SERVERROOT, SUBURI, WEBROOT and CONFIG_DATADIRECTORY
Diffstat (limited to 'lib/MDB2')
-rw-r--r--lib/MDB2/Driver/Manager/sqlite3.php5
-rw-r--r--lib/MDB2/Driver/sqlite3.php5
2 files changed, 4 insertions, 6 deletions
diff --git a/lib/MDB2/Driver/Manager/sqlite3.php b/lib/MDB2/Driver/Manager/sqlite3.php
index 4e420b5d0b2..eabbb72b3c2 100644
--- a/lib/MDB2/Driver/Manager/sqlite3.php
+++ b/lib/MDB2/Driver/Manager/sqlite3.php
@@ -69,8 +69,7 @@ class MDB2_Driver_Manager_sqlite3 extends MDB2_Driver_Manager_Common
*/
function createDatabase($name, $options = array())
{
- global $SERVERROOT;
- $datadir=OC_Config::getValue( "datadirectory", "$SERVERROOT/data" );
+ $datadir=OC_Config::getValue( "datadirectory", OC::$SERVERROOT."/data" );
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
@@ -1361,4 +1360,4 @@ class MDB2_Driver_Manager_sqlite3 extends MDB2_Driver_Manager_Common
// }}}
}
-?> \ No newline at end of file
+?>
diff --git a/lib/MDB2/Driver/sqlite3.php b/lib/MDB2/Driver/sqlite3.php
index ccf6bb53688..a41aeed4850 100644
--- a/lib/MDB2/Driver/sqlite3.php
+++ b/lib/MDB2/Driver/sqlite3.php
@@ -351,8 +351,7 @@ class MDB2_Driver_sqlite3 extends MDB2_Driver_Common
if($this->connection instanceof SQLite3){
return MDB2_OK;
}
- global $SERVERROOT;
- $datadir=OC_Config::getValue( "datadirectory", "$SERVERROOT/data" );
+ $datadir=OC_Config::getValue( "datadirectory", OC::$SERVERROOT."/data" );
$database_file = $this->_getDatabaseFile($this->database_name);
if (is_resource($this->connection)) {
//if (count(array_diff($this->connected_dsn, $this->dsn)) == 0
@@ -1358,4 +1357,4 @@ class MDB2_Statement_sqlite3 extends MDB2_Statement_Common
}
}
-?> \ No newline at end of file
+?>