phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] phpgwapi/inc class.setup.inc.php, 1.23 class.setup_de


From: skwashd
Subject: [Phpgroupware-cvs] phpgwapi/inc class.setup.inc.php, 1.23 class.setup_detection.inc.php, 1.10
Date: Sun, 15 May 2005 13:58:00 +0200

Update of phpgwapi/inc

Modified Files:
     Branch: MAIN
            class.setup.inc.php lines: +17 -11
            class.setup_detection.inc.php lines: +6 -6

Log Message:
fixes

====================================================
Index: phpgwapi/inc/class.setup.inc.php
diff -u phpgwapi/inc/class.setup.inc.php:1.22 
phpgwapi/inc/class.setup.inc.php:1.23
--- phpgwapi/inc/class.setup.inc.php:1.22       Thu Apr 28 18:20:15 2005
+++ phpgwapi/inc/class.setup.inc.php    Sun May 15 11:58:17 2005
@@ -1,6 +1,6 @@
 <?php
        /**
-       * Setup
+       * phpGroupWare Setup - http://phpGroupWare.prg
        * @author Joseph Engo<address@hidden>
        * @author Dan Kuykendall<address@hidden>
        * @author Mark Peters<address@hidden>
@@ -34,7 +34,7 @@
                var $tbl_config;
                var $tbl_hooks;

-               function setup($html=False, $translation=False)
+               function setup($html = False, $translation = False)
                {
                        $this->detection = 
CreateObject('phpgwapi.setup_detection');
                        $this->process   = 
CreateObject('phpgwapi.setup_process');
@@ -54,16 +54,19 @@
                */
                function loaddb()
                {
-                       $GLOBALS['ConfigDomain'] = 
get_var('ConfigDomain',array('COOKIE','POST'),$_POST['FormDomain']);
+                       $form_domain = get_var('FormDomain', array('POST'), '');
+                       $ConfigDomain = get_var('ConfigDomain', 
array('COOKIE','POST'), $form_domain);

-                       $GLOBALS['phpgw_info']['server']['db_type'] = 
$GLOBALS['phpgw_domain'][$GLOBALS['ConfigDomain']]['db_type'];
+                       $GLOBALS['phpgw_info']['server']['db_type'] = 
$GLOBALS['phpgw_domain'][$ConfigDomain]['db_type'];

                        $this->db         = CreateObject('phpgwapi.db');
-                       $this->db->Host     = 
$GLOBALS['phpgw_domain'][$GLOBALS['ConfigDomain']]['db_host'];
-                       $this->db->Type     = 
$GLOBALS['phpgw_domain'][$GLOBALS['ConfigDomain']]['db_type'];
-                       $this->db->Database = 
$GLOBALS['phpgw_domain'][$GLOBALS['ConfigDomain']]['db_name'];
-                       $this->db->User     = 
$GLOBALS['phpgw_domain'][$GLOBALS['ConfigDomain']]['db_user'];
-                       $this->db->Password = 
$GLOBALS['phpgw_domain'][$GLOBALS['ConfigDomain']]['db_pass'];
+                       $this->db->Host     = 
$GLOBALS['phpgw_domain'][$ConfigDomain]['db_host'];
+                       $this->db->Type     = 
$GLOBALS['phpgw_domain'][$ConfigDomain]['db_type'];
+                       $this->db->Database = 
$GLOBALS['phpgw_domain'][$ConfigDomain]['db_name'];
+                       $this->db->User     = 
$GLOBALS['phpgw_domain'][$ConfigDomain]['db_user'];
+                       $this->db->Password = 
$GLOBALS['phpgw_domain'][$ConfigDomain]['db_pass'];
+
+                       $GLOBALS['ConfigDomain'] = $ConfigDomain;
                }

                /*!
@@ -772,7 +775,10 @@

                function get_hooks_table_name()
                {
-                       
if($this->alessthanb($GLOBALS['setup_info']['phpgwapi']['currentver'],'0.9.8pre5')
 && ($GLOBALS['setup_info']['phpgwapi']['currentver'] != ''))
+
+                       if ( 
isset($GLOBALS['setup_info']['phpgwapi']['currentver'])
+                               && 
$this->alessthanb($GLOBALS['setup_info']['phpgwapi']['currentver'], '0.9.8pre5')
+                               && 
($GLOBALS['setup_info']['phpgwapi']['currentver'] != ''))
                        {
                                /* No phpgw_hooks table yet. */
                                return False;

====================================================
Index: phpgwapi/inc/class.setup_detection.inc.php
diff -u phpgwapi/inc/class.setup_detection.inc.php:1.9 
phpgwapi/inc/class.setup_detection.inc.php:1.10
--- phpgwapi/inc/class.setup_detection.inc.php:1.9      Thu Dec 30 06:47:31 2004
+++ phpgwapi/inc/class.setup_detection.inc.php  Sun May 15 11:58:17 2005
@@ -227,29 +227,29 @@
                        if(!file_exists('../header.inc.php'))
                        {
                                $GLOBALS['phpgw_info']['setup']['header_msg'] = 
'Stage One';
-                               return '1';
+                               return 1;
                        }
                        else
                        {
                                if 
(!isset($GLOBALS['phpgw_info']['server']['header_admin_password']))
                                {
                                        
$GLOBALS['phpgw_info']['setup']['header_msg'] = 'Stage One (No header admin 
password set)';
-                                       return '2';
+                                       return 2;
                                }
                                elseif (!isset($GLOBALS['phpgw_domain']))
                                {
                                        
$GLOBALS['phpgw_info']['setup']['header_msg'] = 'Stage One (Upgrade your 
header.inc.php)';
-                                       return '3';
+                                       return 3;
                                }
                                elseif 
(@$GLOBALS['phpgw_info']['server']['versions']['header'] != 
@$GLOBALS['phpgw_info']['server']['versions']['current_header'])
                                {
                                        
$GLOBALS['phpgw_info']['setup']['header_msg'] = 'Stage One (Upgrade your 
header.inc.php)';
-                                       return '3';
+                                       return 3;
                                }
                        }
                        /* header.inc.php part settled. Moving to 
authentication */
                        $GLOBALS['phpgw_info']['setup']['header_msg'] = 'Stage 
One (Completed)';
-                       return '10';
+                       return 10;
                }

                function check_db()






reply via email to

[Prev in Thread] Current Thread [Next in Thread]