Skip to content
Snippets Groups Projects
Commit c105268a authored by Brice Maron's avatar Brice Maron
Browse files

Fetch prefix from config at installation instead of a hardcoded value

parent 543537ef
No related branches found
No related tags found
No related merge requests found
...@@ -82,10 +82,10 @@ class OC_Setup { ...@@ -82,10 +82,10 @@ class OC_Setup {
$dbpass = $options['dbpass']; $dbpass = $options['dbpass'];
$dbname = $options['dbname']; $dbname = $options['dbname'];
$dbhost = $options['dbhost']; $dbhost = $options['dbhost'];
$dbtableprefix = 'oc_'; $dbtableprefix = OC_Config::gsetValue('dbtableprefix','oc_');
OC_Config::setValue('dbname', $dbname); OC_Config::setValue('dbname', $dbname);
OC_Config::setValue('dbhost', $dbhost); OC_Config::setValue('dbhost', $dbhost);
OC_Config::setValue('dbtableprefix', 'oc_'); OC_Config::setValue('dbtableprefix', $dbtableprefix);
//check if the database user has admin right //check if the database user has admin right
$connection = @mysql_connect($dbhost, $dbuser, $dbpass); $connection = @mysql_connect($dbhost, $dbuser, $dbpass);
...@@ -135,7 +135,7 @@ class OC_Setup { ...@@ -135,7 +135,7 @@ class OC_Setup {
$dbpass = $options['dbpass']; $dbpass = $options['dbpass'];
$dbname = $options['dbname']; $dbname = $options['dbname'];
$dbhost = $options['dbhost']; $dbhost = $options['dbhost'];
$dbtableprefix = 'oc_'; $dbtableprefix = OC_Config::getValue('dbtableprefix','oc_');
OC_CONFIG::setValue('dbname', $dbname); OC_CONFIG::setValue('dbname', $dbname);
OC_CONFIG::setValue('dbhost', $dbhost); OC_CONFIG::setValue('dbhost', $dbhost);
OC_CONFIG::setValue('dbtableprefix', $dbtableprefix); OC_CONFIG::setValue('dbtableprefix', $dbtableprefix);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment