From c718716e571b66178e6397b7eb3ec169cc9a5a20 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 5 Jul 2010 15:31:59 +0200 Subject: [PATCH] Do not use table perfix for sqlite --- inc/lib_config.php | 4 +++- inc/templates/adminform.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/inc/lib_config.php b/inc/lib_config.php index dad2fbf8159..77fd68a189e 100755 --- a/inc/lib_config.php +++ b/inc/lib_config.php @@ -186,11 +186,13 @@ class OC_CONFIG{ //create/fill database $CONFIG_DBTYPE=$dbtype; $CONFIG_DBNAME=$_POST['dbname']; - $CONFIG_DBTABLEPREFIX=$_POST['dbtableprefix']; if($dbtype!='sqlite'){ + $CONFIG_DBTABLEPREFIX=$_POST['dbtableprefix']; $CONFIG_DBHOST=$_POST['dbhost']; $CONFIG_DBUSER=$_POST['dbuser']; $CONFIG_DBPASSWORD=$_POST['dbpassword']; + }else{ + $_POST['dbtableprefix']=''; } try{ if(isset($_POST['createdatabase']) and $CONFIG_DBTYPE!='sqlite'){ diff --git a/inc/templates/adminform.php b/inc/templates/adminform.php index 3adbd04ee73..b962ac6f31b 100755 --- a/inc/templates/adminform.php +++ b/inc/templates/adminform.php @@ -28,7 +28,7 @@ function showBackupPath(){ function dbtypechange(){ var dropdown=action=document.getElementById('dbtype'); var type=dropdown.options[dropdown.selectedIndex].value; - var inputs=Array('dbhost','dbuser','dbpass','dbpass_retype','dbcreaterow','dbAdminPwd','dbAdminUser','dbname','dbfill'); + var inputs=Array('dbhost','dbuser','dbpass','dbpass_retype','dbcreaterow','dbAdminPwd','dbAdminUser','dbname','dbfill','dbtableprefix'); var id,element; if(type=='sqlite'){ for(i in inputs){ -- 2.39.5