aboutsummaryrefslogtreecommitdiffstats
path: root/inc
diff options
context:
space:
mode:
authorRobin <robin@Amaya.(none)>2010-04-25 18:18:04 +0200
committerRobin <robin@Amaya.(none)>2010-04-25 18:18:04 +0200
commiteaf0024c0f56b33754217d6ddb95ba021deefccf (patch)
treec770eb20b66a5e6f8ff32e89af733a66a9a7021f /inc
parent4eddb7b2d3bbadbb1488d8ac2928c87afb331f8d (diff)
downloadnextcloud-server-eaf0024c0f56b33754217d6ddb95ba021deefccf.tar.gz
nextcloud-server-eaf0024c0f56b33754217d6ddb95ba021deefccf.zip
bugfix when filling the database in first run dialog
Diffstat (limited to 'inc')
-rwxr-xr-xinc/lib_base.php1
-rwxr-xr-xinc/lib_config.php18
2 files changed, 16 insertions, 3 deletions
diff --git a/inc/lib_base.php b/inc/lib_base.php
index 5992004f537..851fc254b8e 100755
--- a/inc/lib_base.php
+++ b/inc/lib_base.php
@@ -67,6 +67,7 @@ oc_require_once('lib_files.php');
oc_require_once('lib_log.php');
oc_require_once('lib_config.php');
oc_require_once('lib_user.php');
+oc_require_once('lib_ocs.php');
if(OC_USER::isLoggedIn()){
//jail the user in a seperate data folder
diff --git a/inc/lib_config.php b/inc/lib_config.php
index 130731b79f9..389aeff646e 100755
--- a/inc/lib_config.php
+++ b/inc/lib_config.php
@@ -202,9 +202,9 @@ class OC_CONFIG{
self::filldatabase();
}
}catch(Exception $e){
+ echo 'testin';
$error.='error while trying to fill the database<br/>';
}
-
if(!OC_USER::createuser($_POST['adminlogin'],$_POST['adminpassword']) && !OC_USER::login($_POST['adminlogin'],$_POST['adminpassword'])){
$error.='error while trying to create the admin user<br/>';
}
@@ -303,7 +303,7 @@ CREATE TABLE 'users' (
);
";
}elseif($CONFIG_DBTYPE=='mysql'){
- $query="SET SQL_MODE=\"NO_AUTO_VALUE_ON_ZERO\";
+ $query="SET SQL_MODE='NO_AUTO_VALUE_ON_ZERO';
CREATE TABLE IF NOT EXISTS `locks` (
`token` varchar(255) NOT NULL DEFAULT '',
@@ -351,10 +351,22 @@ UNIQUE (
)
) ENGINE = MYISAM ;
+CREATE TABLE IF NOT EXISTS `groups` (
+`group_id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
+`group_name` VARCHAR( 64 ) NOT NULL ,
+UNIQUE (
+`group_name`
+)
+) ENGINE = MYISAM ;
+
+CREATE TABLE IF NOT EXISTS `user_group` (
+`user_group_id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
+`user_id` VARCHAR( 64 ) NOT NULL ,
+`group_id` VARCHAR( 64 ) NOT NULL
+) ENGINE = MYISAM ;
";
}
OC_DB::multiquery($query);
- die();
}
/**