From 86a3f8da81743a502700c8bac810618d7db30825 Mon Sep 17 00:00:00 2001 From: el_latino Date: Wed, 28 Feb 2001 16:24:56 +0000 Subject: [PATCH] =?UTF-8?q?Wed,=2028=20Feb=202001=2016:21:16=20+0000=20=09?= =?UTF-8?q?Ra=EF=BF=BDl=20Alexis=20Betancort=20Santana=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed the *config* table name problem on phpgw_setup.inc.php --- setup/inc/functions.inc.php | 9 +++++++-- setup/inc/phpgw_schema_proc.inc.php | 4 ++-- setup/inc/phpgw_setup.inc.php | 8 +++++++- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/setup/inc/functions.inc.php b/setup/inc/functions.inc.php index fe729766bd..ae43f8d082 100644 --- a/setup/inc/functions.inc.php +++ b/setup/inc/functions.inc.php @@ -47,6 +47,11 @@ if(file_exists('../header.inc.php')) { include('../header.inc.php'); } include('./inc/phpgw_setup.inc.php'); -// include('./inc/phpgw_schema_proc.inc.php'); + include('./inc/phpgw_schema_proc.inc.php'); + include('./inc/phpgw_schema_current.inc.php'); $phpgw_setup = new phpgw_setup; -?> \ No newline at end of file + /*$phpgw_setup12 = new phpgw_schema_proc('mysql'); + $phpgw_setup13 = new phpgw_schema_proc('pgsql'); + $phpgw_setup12->GenerateScripts($phpgw_tables,true); + $phpgw_setup13->GenerateScripts($phpgw_tables,true);*/ +?> diff --git a/setup/inc/phpgw_schema_proc.inc.php b/setup/inc/phpgw_schema_proc.inc.php index 37b0f0223b..654f2d0af7 100644 --- a/setup/inc/phpgw_schema_proc.inc.php +++ b/setup/inc/phpgw_schema_proc.inc.php @@ -21,10 +21,10 @@ class phpgw_schema_proc function phpgw_schema_proc($dbms) { - include("phpgw_schema_proc_" . $dbms . ".inc.php"); + include("./inc/phpgw_schema_proc_" . $dbms . ".inc.php"); eval("\$this->m_oTranslator = new phpgw_schema_proc_$dbms;"); - include("phpgw_schema_proc_array.inc.php"); + include("./inc/phpgw_schema_proc_array.inc.php"); $this->m_oDeltaProc = new phpgw_schema_proc_array; $this->m_aTables = array(); $this->m_bDeltaOnly = false; // Default to false here in case it's just a CreateTable script diff --git a/setup/inc/phpgw_setup.inc.php b/setup/inc/phpgw_setup.inc.php index 7a1c9529a9..b054797a19 100644 --- a/setup/inc/phpgw_setup.inc.php +++ b/setup/inc/phpgw_setup.inc.php @@ -247,7 +247,13 @@ $this->db->Halt_On_Error = "no"; if ($phpgw_info["setup"]["stage"]["db"] != 10){return "";} - $this->db->query("select config_value from config where config_name='freshinstall'"); + // Since 0.9.10pre6 config table is named as phpgw_config + $config_table="config"; + $ver = explode(".",$phpgw_info["server"]["versions"]["phpgwapi"]); + if(ereg("([0-9]+)(pre)([0-9]+)",$ver[2],$regs)) + if(($regs[1] == "10") && ($regs[3] >= "6")) + $config_table="phpgw_config"; + $this->db->query("select config_value from $config_table where config_name='freshinstall'"); $this->db->next_record(); $configed = $this->db->f("config_value"); if ($configed){