removed database table prefix choice, use oc_

This commit is contained in:
Jan-Christoph Borchardt 2011-09-04 14:56:09 +02:00
parent f4b9895cbf
commit 252bca5057
3 changed files with 3 additions and 8 deletions

View File

@ -68,7 +68,7 @@ input[type="submit"].highlight{ background:#ffc100; border:1px solid #db0; text-
#login form fieldset { background:0; border:0; margin-bottom:2em; padding:0; }
#login form fieldset legend { font-weight:bold; }
#login form label { position:absolute; margin:.8em .8em; font-size:1.5em; color:#666; }
#login #dbhostlabel, #login #dbtableprefixlabel, #login #directorylabel { display:block; margin:.95em 0 .8em -7em; }
#login #dbhostlabel, #login #directorylabel { display:block; margin:.95em 0 .8em -7em; }
#login form input[type="checkbox"]+label { position:relative; margin:0; font-size:1em; text-shadow:#fff 0 1px 0; }
#login form ul.errors { background:#fed7d7; border:1px solid #f00; list-style-indent:inside; margin:0 0 4em 0; padding:1em 1em 1em 5em; }

View File

@ -75,8 +75,6 @@
<fieldset id='datadirField'>
<label id="dbhostlabel" for="dbhost"><?php echo $l->t( 'Database host' ); ?></label><input type="text" name="dbhost" id="dbhost" value="<?php print OC_Helper::init_var('dbhost', 'localhost'); ?>" placeholder="<?php echo $l->t( 'Database host' ); ?>" />
<label id="dbtableprefixlabel" for="dbtableprefix"><?php echo $l->t( 'Table prefix' ); ?></label><input type="text" name="dbtableprefix" id="dbtableprefix" value="<?php print OC_Helper::init_var('dbtableprefix', 'oc_'); ?>" placeholder="<?php echo $l->t( 'Table prefix' ); ?>" />
<label id="directorylabel" for="directory"><?php echo $l->t( 'Data folder' ); ?></label><input type="text" name="directory" id="directory" value="<?php print OC_Helper::init_var('directory', $_['directory']); ?>" placeholder="<?php echo $l->t( 'Data folder' ); ?>" />
</fieldset>

View File

@ -64,9 +64,6 @@ class OC_Setup {
if(empty($options['dbhost'])) {
$error[] = "$dbprettyname set the database host.";
}
if(!isset($options['dbtableprefix'])) {
$error[] = "$dbprettyname set a table prefix.";
}
}
if(count($error) == 0) { //no errors, good
@ -88,10 +85,10 @@ class OC_Setup {
$dbpass = $options['dbpass'];
$dbname = $options['dbname'];
$dbhost = $options['dbhost'];
$dbtableprefix = $options['dbtableprefix'];
$dbtableprefix = 'oc_';
OC_Config::setValue('dbname', $dbname);
OC_Config::setValue('dbhost', $dbhost);
OC_Config::setValue('dbtableprefix', $dbtableprefix);
OC_Config::setValue('dbtableprefix', 'oc_');
//check if the database user has admin right
$connection = @mysql_connect($dbhost, $dbuser, $dbpass);