phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: phpgwapi/inc class.setup.inc.php,1.5,1.6 class.s


From: Miles Lott <address@hidden>
Subject: [Phpgroupware-cvs] CVS: phpgwapi/inc class.setup.inc.php,1.5,1.6 class.setup_process.inc.php,1.1,1.2
Date: Sun, 03 Mar 2002 23:49:44 -0500

Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv28204

Modified Files:
        class.setup.inc.php class.setup_process.inc.php 
Log Message:
Fix name of oProc object to match current table scripts



Index: class.setup.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.setup.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.setup.inc.php 4 Mar 2002 03:12:50 -0000       1.5
--- class.setup.inc.php 4 Mar 2002 04:49:42 -0000       1.6
***************
*** 20,23 ****
--- 20,24 ----
        {
                var $db;
+               var $oProc;
  
                var $detection = '';

Index: class.setup_process.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.setup_process.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** class.setup_process.inc.php 3 Mar 2002 21:47:30 -0000       1.1
--- class.setup_process.inc.php 4 Mar 2002 04:49:42 -0000       1.2
***************
*** 26,30 ****
        class setup_process
        {
-               var $oProc;
                var $tables;
                var $updateincluded = array();
--- 26,29 ----
***************
*** 41,52 ****
                        $phpgw_info   = $GLOBALS['phpgw_info'];
  
!                       $this->oProc = 
CreateObject('phpgwapi.schema_proc',$phpgw_domain[$ConfigDomain]['db_type']);
!                       $this->oProc->m_odb           = 
$GLOBALS['phpgw_setup']->db;
!                       $this->oProc->m_odb->Host     = 
$phpgw_domain[$ConfigDomain]['db_host'];
!                       $this->oProc->m_odb->Database = 
$phpgw_domain[$ConfigDomain]['db_name'];
!                       $this->oProc->m_odb->User     = 
$phpgw_domain[$ConfigDomain]['db_user'];
!                       $this->oProc->m_odb->Password = 
$phpgw_domain[$ConfigDomain]['db_pass'];
!                       $this->oProc->m_odb->Halt_On_Error = 'report';
!                       $this->oProc->m_odb->connect();
                }
  
--- 40,51 ----
                        $phpgw_info   = $GLOBALS['phpgw_info'];
  
!                       $GLOBALS['phpgw_setup']->oProc = 
CreateObject('phpgwapi.schema_proc',$phpgw_domain[$ConfigDomain]['db_type']);
!                       $GLOBALS['phpgw_setup']->oProc->m_odb           = 
$GLOBALS['phpgw_setup']->db;
!                       $GLOBALS['phpgw_setup']->oProc->m_odb->Host     = 
$phpgw_domain[$ConfigDomain]['db_host'];
!                       $GLOBALS['phpgw_setup']->oProc->m_odb->Database = 
$phpgw_domain[$ConfigDomain]['db_name'];
!                       $GLOBALS['phpgw_setup']->oProc->m_odb->User     = 
$phpgw_domain[$ConfigDomain]['db_user'];
!                       $GLOBALS['phpgw_setup']->oProc->m_odb->Password = 
$phpgw_domain[$ConfigDomain]['db_pass'];
!                       $GLOBALS['phpgw_setup']->oProc->m_odb->Halt_On_Error = 
'report';
!                       $GLOBALS['phpgw_setup']->oProc->m_odb->connect();
                }
  
***************
*** 183,191 ****
                function droptables($setup_info,$DEBUG=False)
                {
!                       if (!$this->oProc)
                        {
                                $this->init_process();
                        }
!                       $this->oProc->m_bDeltaOnly = False;
  
                        /* The following is built so below we won't try to drop 
a table that isn't there. */
--- 182,190 ----
                function droptables($setup_info,$DEBUG=False)
                {
!                       if (!$GLOBALS['phpgw_setup']->oProc)
                        {
                                $this->init_process();
                        }
!                       $GLOBALS['phpgw_setup']->oProc->m_bDeltaOnly = False;
  
                        /* The following is built so below we won't try to drop 
a table that isn't there. */
***************
*** 207,211 ****
                                                {
                                                        if ($DEBUG){ echo 
'<br>process->droptables(): Dropping :'. $setup_info[$key]['name'] . ' table: ' 
. $table; }
!                                                       
$this->oProc->DropTable($table);
                                                        // Update the array 
values for return below
                                                        
$setup_info[$key]['status'] = 'U';
--- 206,210 ----
                                                {
                                                        if ($DEBUG){ echo 
'<br>process->droptables(): Dropping :'. $setup_info[$key]['name'] . ' table: ' 
. $table; }
!                                                       
$GLOBALS['phpgw_setup']->oProc->DropTable($table);
                                                        // Update the array 
values for return below
                                                        
$setup_info[$key]['status'] = 'U';
***************
*** 227,235 ****
                function current($setup_info,$DEBUG=False)
                {
!                       if (!$this->oProc)
                        {
                                $this->init_process();
                        }
!                       $this->oProc->m_bDeltaOnly = False;
  
                        @reset($setup_info);
--- 226,234 ----
                function current($setup_info,$DEBUG=False)
                {
!                       if (!$GLOBALS['phpgw_setup']->oProc)
                        {
                                $this->init_process();
                        }
!                       $GLOBALS['phpgw_setup']->oProc->m_bDeltaOnly = False;
  
                        @reset($setup_info);
***************
*** 309,318 ****
                function default_records($setup_info,$DEBUG=False)
                {
!                       if (!$this->oProc)
                        {
                                $this->init_process();
                        }
!                       $this->oProc->m_bDeltaOnly = False;
!                       $oProc = $this->oProc;
  
                        @reset($setup_info);
--- 308,317 ----
                function default_records($setup_info,$DEBUG=False)
                {
!                       if (!$GLOBALS['phpgw_setup']->oProc)
                        {
                                $this->init_process();
                        }
!                       $GLOBALS['phpgw_setup']->oProc->m_bDeltaOnly = False;
!                       $oProc = $GLOBALS['phpgw_setup']->oProc;
  
                        @reset($setup_info);
***************
*** 328,334 ****
                                                echo 
'<br>process->default_records(): Including default records for ' . $appname . 
"\n";
                                        }
!                                       
$this->oProc->m_odb->transaction_begin();
                                        include 
($appdir.'default_records.inc.php');
!                                       
$this->oProc->m_odb->transaction_commit();
                                }
                                /* $setup_info[$key]['status'] = 'C'; */
--- 327,333 ----
                                                echo 
'<br>process->default_records(): Including default records for ' . $appname . 
"\n";
                                        }
!                                       
$GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
                                        include 
($appdir.'default_records.inc.php');
!                                       
$GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit();
                                }
                                /* $setup_info[$key]['status'] = 'C'; */
***************
*** 418,427 ****
                function test_data($setup_info,$DEBUG=False)
                {
!                       if (!$this->oProc)
                        {
                                $this->init_process();
                        }
!                       $this->oProc->m_bDeltaOnly = False;
!                       $oProc = $this->oProc;
  
                        @reset($setup_info);
--- 417,426 ----
                function test_data($setup_info,$DEBUG=False)
                {
!                       if (!$GLOBALS['phpgw_setup']->oProc)
                        {
                                $this->init_process();
                        }
!                       $GLOBALS['phpgw_setup']->oProc->m_bDeltaOnly = False;
!                       $oProc = $GLOBALS['phpgw_setup']->oProc;
  
                        @reset($setup_info);
***************
*** 437,443 ****
                                                echo '<br>process->test_data(): 
Including baseline test data for ' . $appname . "\n";
                                        }
!                                       
$this->oProc->m_odb->transaction_begin();
                                        include ($appdir.'test_data.inc.php');
!                                       
$this->oProc->m_odb->transaction_commit();
                                }
                        }
--- 436,442 ----
                                                echo '<br>process->test_data(): 
Including baseline test data for ' . $appname . "\n";
                                        }
!                                       
$GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
                                        include ($appdir.'test_data.inc.php');
!                                       
$GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit();
                                }
                        }
***************
*** 454,458 ****
                function baseline($setup_info,$DEBUG=False)
                {
!                       if (!$this->oProc)
                        {
                                $this->init_process();
--- 453,457 ----
                function baseline($setup_info,$DEBUG=False)
                {
!                       if (!$GLOBALS['phpgw_setup']->oProc)
                        {
                                $this->init_process();
***************
*** 472,476 ****
                                        }
                                        include 
($appdir.'tables_baseline.inc.php');
!                                       
$this->oProc->GenerateScripts($phpgw_baseline, $DEBUG);
                                        
$this->post_process($phpgw_baseline,$DEBUG);
  
--- 471,475 ----
                                        }
                                        include 
($appdir.'tables_baseline.inc.php');
!                                       
$GLOBALS['phpgw_setup']->oProc->GenerateScripts($phpgw_baseline, $DEBUG);
                                        
$this->post_process($phpgw_baseline,$DEBUG);
  
***************
*** 499,508 ****
                function upgrade($setup_info,$DEBUG=False)
                {
!                       if (address@hidden>oProc)
                        {
                                $this->init_process();
                        }
!                       $this->oProc->m_odb->HaltOnError = 'no';
!                       $this->oProc->m_bDeltaOnly = True;
  
                        @reset($setup_info);
--- 498,507 ----
                function upgrade($setup_info,$DEBUG=False)
                {
!                       if (address@hidden'phpgw_setup']->oProc)
                        {
                                $this->init_process();
                        }
!                       $GLOBALS['phpgw_setup']->oProc->m_odb->HaltOnError = 
'no';
!                       $GLOBALS['phpgw_setup']->oProc->m_bDeltaOnly = True;
  
                        @reset($setup_info);
***************
*** 534,538 ****
  
                                        $test   = array();
!                                       $this->oProc->m_aTables = 
$phpgw_baseline = array();
  /*
                                        $phpgw_baseline = array();
--- 533,537 ----
  
                                        $test   = array();
!                                       
$GLOBALS['phpgw_setup']->oProc->m_aTables = $phpgw_baseline = array();
  /*
                                        $phpgw_baseline = array();
***************
*** 541,545 ****
                                        $tmpapp[] = $setup_info[$key];
                                        $this->baseline($tmpapp,$DEBUG);
!                                       $this->oProc->m_aTables = 
$phpgw_baseline;
                                        // So far, including the baseline file 
is not helping.
                                        // Only AlterColumn/RenameColumn seem 
to be failing silently.
--- 540,544 ----
                                        $tmpapp[] = $setup_info[$key];
                                        $this->baseline($tmpapp,$DEBUG);
!                                       
$GLOBALS['phpgw_setup']->oProc->m_aTables = $phpgw_baseline;
                                        // So far, including the baseline file 
is not helping.
                                        // Only AlterColumn/RenameColumn seem 
to be failing silently.
***************
*** 554,559 ****
                                                }
                                                include 
($appdir.'tables_baseline.inc.php');
!                                               $this->oProc->m_aTables = 
$phpgw_baseline;
!                                               /* 
$this->oProc->GenerateScripts($phpgw_baseline, $DEBUG); */
                                        }
                                        else
--- 553,558 ----
                                                }
                                                include 
($appdir.'tables_baseline.inc.php');
!                                               
$GLOBALS['phpgw_setup']->oProc->m_aTables = $phpgw_baseline;
!                                               /* 
$GLOBALS['phpgw_setup']->oProc->GenerateScripts($phpgw_baseline, $DEBUG); */
                                        }
                                        else
***************
*** 593,597 ****
                                                        if ($value == 
$targetver)
                                                        {
!                                                               
$this->oProc->m_bDeltaOnly = False;
                                                                /* Done 
upgrading */
                                                                if($DEBUG)
--- 592,596 ----
                                                        if ($value == 
$targetver)
                                                        {
!                                                               
$GLOBALS['phpgw_setup']->oProc->m_bDeltaOnly = False;
                                                                /* Done 
upgrading */
                                                                if($DEBUG)
***************
*** 617,621 ****
                                                        {
                                                                /* start 
upgrading db in addition to baseline */
!                                                               
$this->oProc->m_bDeltaOnly = False;
                                                                if ($DEBUG) { 
echo '<br>process->upgrade(): running ' . $function; }
                                                                /* run upgrade 
function */
--- 616,620 ----
                                                        {
                                                                /* start 
upgrading db in addition to baseline */
!                                                               
$GLOBALS['phpgw_setup']->oProc->m_bDeltaOnly = False;
                                                                if ($DEBUG) { 
echo '<br>process->upgrade(): running ' . $function; }
                                                                /* run upgrade 
function */
***************
*** 668,672 ****
                                                        {
                                                                if ($DEBUG) { 
echo '<br>process->upgrade(): running baseline delta only: ' . $function . 
'...'; }
!                                                               
$this->oProc->m_bDeltaOnly = True;
                                                                $success = 
$function();
                                                        }
--- 667,671 ----
                                                        {
                                                                if ($DEBUG) { 
echo '<br>process->upgrade(): running baseline delta only: ' . $function . 
'...'; }
!                                                               
$GLOBALS['phpgw_setup']->oProc->m_bDeltaOnly = True;
                                                                $success = 
$function();
                                                        }
***************
*** 742,749 ****
                        }
  
!                       $ret = $this->oProc->GenerateScripts($tables,$DEBUG);
                        if ($ret)
                        {
!                               $oret = 
$this->oProc->ExecuteScripts($tables,$DEBUG);
                                if ($oret)
                                {
--- 741,748 ----
                        }
  
!                       $ret = 
$GLOBALS['phpgw_setup']->oProc->GenerateScripts($tables,$DEBUG);
                        if ($ret)
                        {
!                               $oret = 
$GLOBALS['phpgw_setup']->oProc->ExecuteScripts($tables,$DEBUG);
                                if ($oret)
                                {
***************
*** 773,791 ****
                        }
  
!                       if (!$this->oProc)
                        {
                                $this->init_process();
                        }
  
!                       $this->oProc->m_oTranslator->_GetColumns($this->oProc, 
$tablename, $sColumns, $sColumnName);
  
!                       while (list($key,$tbldata) = each 
($this->oProc->m_oTranslator->sCol))
                        {
                                $arr .= $tbldata;
                        }
!                       $pk = $this->oProc->m_oTranslator->pk;
!                       $fk = $this->oProc->m_oTranslator->fk;
!                       $ix = $this->oProc->m_oTranslator->ix;
!                       $uc = $this->oProc->m_oTranslator->uc;
  
                        return array($arr,$pk,$fk,$ix,$uc);
--- 772,790 ----
                        }
  
!                       if (!$GLOBALS['phpgw_setup']->oProc)
                        {
                                $this->init_process();
                        }
  
!                       
$GLOBALS['phpgw_setup']->oProc->m_oTranslator->_GetColumns($GLOBALS['phpgw_setup']->oProc,
 $tablename, $sColumns, $sColumnName);
  
!                       while (list($key,$tbldata) = each 
($GLOBALS['phpgw_setup']->oProc->m_oTranslator->sCol))
                        {
                                $arr .= $tbldata;
                        }
!                       $pk = $GLOBALS['phpgw_setup']->oProc->m_oTranslator->pk;
!                       $fk = $GLOBALS['phpgw_setup']->oProc->m_oTranslator->fk;
!                       $ix = $GLOBALS['phpgw_setup']->oProc->m_oTranslator->ix;
!                       $uc = $GLOBALS['phpgw_setup']->oProc->m_oTranslator->uc;
  
                        return array($arr,$pk,$fk,$ix,$uc);




reply via email to

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