minor changes to mysql setup

This commit is contained in:
Robin Appelman 2011-11-13 16:06:29 +01:00
parent 6c09d9e0f8
commit 91a9688d07
1 changed files with 4 additions and 4 deletions

View File

@ -160,8 +160,8 @@ class OC_Setup {
//add prefix to the postgresql user name to prevent collissions
$dbusername='oc_'.$username;
//hash the password so we don't need to store the admin config in the config file
$dbpassword=md5(time().$password);
//create a new password so we don't need to store the admin config in the config file
$dbpassword=md5(time());
self::pg_createDBUser($dbusername, $dbpassword, $connection);
@ -221,7 +221,7 @@ class OC_Setup {
}
public static function createDatabase($name,$user,$connection) {
//we cant user OC_BD functions here because we need to connect as the administrative user.
//we cant use OC_BD functions here because we need to connect as the administrative user.
$query = "CREATE DATABASE IF NOT EXISTS `$name`";
$result = mysql_query($query, $connection);
if(!$result) {
@ -243,7 +243,7 @@ class OC_Setup {
}
public static function pg_createDatabase($name,$user,$connection) {
//we cant user OC_BD functions here because we need to connect as the administrative user.
//we cant use OC_BD functions here because we need to connect as the administrative user.
$query = "CREATE DATABASE $name OWNER $user";
$result = pg_query($connection, $query);
if(!$result) {