phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: phpgwapi/inc class.schema_proc_pgsql.inc.php,1.


From: Ralf Becker <address@hidden>
Subject: [Phpgroupware-cvs] CVS: phpgwapi/inc class.schema_proc_pgsql.inc.php,1.4,1.5
Date: Fri, 21 Mar 2003 20:28:50 -0500

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

Modified Files:
        class.schema_proc_pgsql.inc.php 
Log Message:
fix for 2 pgSql bugs:
- if a table get droped (eg. uninstall an app) the sequenz got not droped, 
which leads to complains of pgSql if you tried to reinstall the table/app
- _CopyAlteredTable (which is used by AlterColumn) uses a 'SELECT * ' and then 
the $db->f(0|1|2) which leads to errors when the column-order is not as expected


Index: class.schema_proc_pgsql.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.schema_proc_pgsql.inc.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** class.schema_proc_pgsql.inc.php     18 Mar 2003 00:05:04 -0000      1.4
--- class.schema_proc_pgsql.inc.php     22 Mar 2003 01:28:48 -0000      1.5
***************
*** 378,382 ****
                                        }
  
!                                       if ($oProc->m_odb->f($i) != null)
                                        {
                                                switch ($arraydef['type'])
--- 378,382 ----
                                        }
  
!                                       if ($oProc->m_odb->f($name) != null)
                                        {
                                                switch ($arraydef['type'])
***************
*** 388,395 ****
                                                        case 'timestamp':
                                                        case 'varchar':
!                                                               $sSQL .= "'" . 
$oProc->m_odb->db_addslashes($oProc->m_odb->f($i)) . "'";
                                                                break;
                                                        default:
!                                                               $sSQL .= 
intval($oProc->m_odb->f($i));
                                                }
                                        }
--- 388,395 ----
                                                        case 'timestamp':
                                                        case 'varchar':
!                                                               $sSQL .= "'" . 
$oProc->m_odb->db_addslashes($oProc->m_odb->f($name)) . "'";
                                                                break;
                                                        default:
!                                                               $sSQL .= 
intval($oProc->m_odb->f($name));
                                                }
                                        }
***************
*** 452,456 ****
                        $this->DropSequenceForTable($oProc,$sTableName);
  
!                       return !!($oProc->m_odb->query("DROP TABLE " . 
$sTableName));
                }
  
--- 452,457 ----
                        $this->DropSequenceForTable($oProc,$sTableName);
  
!                       return $oProc->m_odb->query("DROP TABLE " . 
$sTableName) &&
!                              $this->DropSequenceForTable($oProc, $sTableName);
                }
  





reply via email to

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