summaryrefslogtreecommitdiffstats
path: root/lib/private/setup/oci.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/setup/oci.php')
-rw-r--r--lib/private/setup/oci.php38
1 files changed, 19 insertions, 19 deletions
diff --git a/lib/private/setup/oci.php b/lib/private/setup/oci.php
index d46d5529da0..1e1eb1ff54e 100644
--- a/lib/private/setup/oci.php
+++ b/lib/private/setup/oci.php
@@ -38,10 +38,10 @@ class OCI extends AbstractDatabase {
$this->dbtablespace = 'USERS';
}
// allow empty hostname for oracle
- $this->dbhost = $config['dbhost'];
+ $this->dbHost = $config['dbhost'];
\OC_Config::setValues([
- 'dbhost' => $this->dbhost,
+ 'dbhost' => $this->dbHost,
'dbtablespace' => $this->dbtablespace,
]);
}
@@ -58,8 +58,8 @@ class OCI extends AbstractDatabase {
}
public function setupDatabase($username) {
- $e_host = addslashes($this->dbhost);
- $e_dbname = addslashes($this->dbname);
+ $e_host = addslashes($this->dbHost);
+ $e_dbname = addslashes($this->dbName);
//check if the database user has admin right
if ($e_host == '') {
$easy_connect_string = $e_dbname; // use dbname as easy connect name
@@ -67,7 +67,7 @@ class OCI extends AbstractDatabase {
$easy_connect_string = '//'.$e_host.'/'.$e_dbname;
}
\OCP\Util::writeLog('setup oracle', 'connect string: ' . $easy_connect_string, \OCP\Util::DEBUG);
- $connection = @oci_connect($this->dbuser, $this->dbpassword, $easy_connect_string);
+ $connection = @oci_connect($this->dbUser, $this->dbPassword, $easy_connect_string);
if(!$connection) {
$errorMessage = $this->getLastError();
if ($errorMessage) {
@@ -103,23 +103,23 @@ class OCI extends AbstractDatabase {
//use the admin login data for the new database user
//add prefix to the oracle user name to prevent collisions
- $this->dbuser='oc_'.$username;
+ $this->dbUser='oc_'.$username;
//create a new password so we don't need to store the admin config in the config file
- $this->dbpassword=\OC_Util::generateRandomBytes(30);
+ $this->dbPassword=\OC_Util::generateRandomBytes(30);
//oracle passwords are treated as identifiers:
// must start with alphanumeric char
// needs to be shortened to 30 bytes, as the two " needed to escape the identifier count towards the identifier length.
- $this->dbpassword=substr($this->dbpassword, 0, 30);
+ $this->dbPassword=substr($this->dbPassword, 0, 30);
$this->createDBUser($connection);
}
}
\OC_Config::setValues([
- 'dbuser' => $this->dbuser,
- 'dbname' => $this->dbname,
- 'dbpassword' => $this->dbpassword,
+ 'dbuser' => $this->dbUser,
+ 'dbname' => $this->dbName,
+ 'dbpassword' => $this->dbPassword,
]);
//create the database not necessary, oracle implies user = schema
@@ -131,26 +131,26 @@ class OCI extends AbstractDatabase {
oci_close($connection);
// connect to the oracle database (schema=$this->dbuser) an check if the schema needs to be filled
- $this->dbuser = \OC_Config::getValue('dbuser');
+ $this->dbUser = \OC_Config::getValue('dbuser');
//$this->dbname = \OC_Config::getValue('dbname');
- $this->dbpassword = \OC_Config::getValue('dbpassword');
+ $this->dbPassword = \OC_Config::getValue('dbpassword');
- $e_host = addslashes($this->dbhost);
- $e_dbname = addslashes($this->dbname);
+ $e_host = addslashes($this->dbHost);
+ $e_dbname = addslashes($this->dbName);
if ($e_host == '') {
$easy_connect_string = $e_dbname; // use dbname as easy connect name
} else {
$easy_connect_string = '//'.$e_host.'/'.$e_dbname;
}
- $connection = @oci_connect($this->dbuser, $this->dbpassword, $easy_connect_string);
+ $connection = @oci_connect($this->dbUser, $this->dbPassword, $easy_connect_string);
if(!$connection) {
throw new \OC\DatabaseSetupException($this->trans->t('Oracle username and/or password not valid'),
$this->trans->t('You need to enter either an existing account or the administrator.'));
}
$query = "SELECT count(*) FROM user_tables WHERE table_name = :un";
$stmt = oci_parse($connection, $query);
- $un = $this->tableprefix.'users';
+ $un = $this->tablePrefix.'users';
oci_bind_by_name($stmt, ':un', $un);
if (!$stmt) {
$entry = $this->trans->t('DB Error: "%s"', array($this->getLastError($connection))) . '<br />';
@@ -171,8 +171,8 @@ class OCI extends AbstractDatabase {
* @param resource $connection
*/
private function createDBUser($connection) {
- $name = $this->dbuser;
- $password = $this->dbpassword;
+ $name = $this->dbUser;
+ $password = $this->dbPassword;
$query = "SELECT * FROM all_users WHERE USERNAME = :un";
$stmt = oci_parse($connection, $query);
if (!$stmt) {