Skip to content
Snippets Groups Projects
Commit e5d3cd59 authored by Jörn Friedrich Dreyer's avatar Jörn Friedrich Dreyer
Browse files

use USERS tablespace whn none is given, only needed when we need to create a...

use USERS tablespace whn none is given, only needed when we need to create a user, does not need to be stored in config
parent dcdabac0
No related branches found
No related tags found
No related merge requests found
...@@ -133,12 +133,15 @@ class OC_Setup { ...@@ -133,12 +133,15 @@ class OC_Setup {
$dbuser = $options['dbuser']; $dbuser = $options['dbuser'];
$dbpass = $options['dbpass']; $dbpass = $options['dbpass'];
$dbname = $options['dbname']; $dbname = $options['dbname'];
$dbtablespace = $options['dbtablespace']; if (array_key_exists('dbtablespace', $options)) {
$dbtablespace = $options['dbtablespace'];
} else {
$dbtablespace = 'USERS';
}
$dbhost = isset($options['dbhost'])?$options['dbhost']:''; $dbhost = isset($options['dbhost'])?$options['dbhost']:'';
$dbtableprefix = isset($options['dbtableprefix']) ? $options['dbtableprefix'] : 'oc_'; $dbtableprefix = isset($options['dbtableprefix']) ? $options['dbtableprefix'] : 'oc_';
OC_Config::setValue('dbname', $dbname); OC_Config::setValue('dbname', $dbname);
OC_Config::setValue('dbtablespace', $dbtablespace);
OC_Config::setValue('dbhost', $dbhost); OC_Config::setValue('dbhost', $dbhost);
OC_Config::setValue('dbtableprefix', $dbtableprefix); OC_Config::setValue('dbtableprefix', $dbtableprefix);
...@@ -439,8 +442,8 @@ class OC_Setup { ...@@ -439,8 +442,8 @@ class OC_Setup {
} }
} }
private static function setupOCIDatabase($dbhost, $dbuser, $dbpass, $dbname, $dbtableprefix, $dbtablespace, private static function setupOCIDatabase($dbhost, $dbuser, $dbpass, $dbname, $dbtableprefix,
$username) { $dbtablespace = 'USERS', $username) {
$l = self::getTrans(); $l = self::getTrans();
$e_host = addslashes($dbhost); $e_host = addslashes($dbhost);
$e_dbname = addslashes($dbname); $e_dbname = addslashes($dbname);
...@@ -552,7 +555,7 @@ class OC_Setup { ...@@ -552,7 +555,7 @@ class OC_Setup {
* @param String $tablespace * @param String $tablespace
* @param resource $connection * @param resource $connection
*/ */
private static function oci_createDBUser($name, $password, $tablespace, $connection) { private static function oci_createDBUser($name, $password, $tablespace = 'USERS', $connection) {
$l = self::getTrans(); $l = self::getTrans();
$query = "SELECT * FROM all_users WHERE USERNAME = :un"; $query = "SELECT * FROM all_users WHERE USERNAME = :un";
$stmt = oci_parse($connection, $query); $stmt = oci_parse($connection, $query);
......
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