aboutsummaryrefslogtreecommitdiffstats
path: root/lib/setup.php
diff options
context:
space:
mode:
authorThomas Mueller <thomas.mueller@tmit.eu>2013-02-12 01:04:35 +0100
committerThomas Mueller <thomas.mueller@tmit.eu>2013-02-12 01:04:35 +0100
commitb2dfdacaa1cb6d7839aed3b4d39adc6504a4beef (patch)
tree70a29e81e6ddb1f5def1d93592569666fc3a21a8 /lib/setup.php
parent76b31f870cf78aa8882761d954554fecb92e6211 (diff)
downloadnextcloud-server-b2dfdacaa1cb6d7839aed3b4d39adc6504a4beef.tar.gz
nextcloud-server-b2dfdacaa1cb6d7839aed3b4d39adc6504a4beef.zip
fixing undefined variables
Diffstat (limited to 'lib/setup.php')
-rw-r--r--lib/setup.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/setup.php b/lib/setup.php
index 893e0121ffa..6f2899ed863 100644
--- a/lib/setup.php
+++ b/lib/setup.php
@@ -591,7 +591,7 @@ class OC_Setup {
echo($entry);
}
}
- // grant neccessary roles
+ // grant necessary roles
$query = 'GRANT CREATE SESSION, CREATE TABLE, CREATE SEQUENCE, CREATE TRIGGER, UNLIMITED TABLESPACE TO '.$name;
$stmt = oci_parse($connection, $query);
if (!$stmt) {
@@ -634,7 +634,7 @@ class OC_Setup {
sqlsrv_close($masterConnection);
- self::mssql_createDatabaseStructure($dbname, $dbuser, $dbpass);
+ self::mssql_createDatabaseStructure($dbhost, $dbname, $dbuser, $dbpass, $dbtableprefix);
}
private static function mssql_createDBLogin($name, $password, $connection) {
@@ -730,7 +730,7 @@ class OC_Setup {
}
private static function mssql_createDatabase($dbname, $connection) {
- $query = "CREATE DATABASE [".$dbname."];";
+ $query = "CREATE DATABASE IF NOT EXISTS [".$dbname."];";
$result = sqlsrv_query($connection, $query);
if (!$result || $result === false) {
if ( ($errors = sqlsrv_errors() ) != null) {
@@ -742,8 +742,10 @@ class OC_Setup {
echo($entry);
}
}
-
- private static function mssql_createDatabaseStructure($dbname, $dbuser, $dbpass) {
+
+ // private static function setupMSSQLDatabase($dbhost, $dbuser, $dbpass, $dbname, $dbtableprefix, $username) {
+
+ private static function mssql_createDatabaseStructure($dbhost, $dbname, $dbuser, $dbpass, $dbtableprefix) {
$connectionInfo = array( "Database" => $dbname, "UID" => $dbuser, "PWD" => $dbpass);
$connection = @sqlsrv_connect($dbhost, $connectionInfo);