[geeklog-cvs] Geeklog-1.x/public_html/admin/install index.php, 1.52, 1.53

Michael Jervis mjervis at qs1489.pair.com
Thu Aug 14 12:52:03 EDT 2008


Update of /cvsroot/geeklog/Geeklog-1.x/public_html/admin/install
In directory qs1489.pair.com:/tmp/cvs-serv42344/public_html/admin/install

Modified Files:
	index.php 
Log Message:
Eliminated use of REPLACE INTO, introduced DB_checkTableExists.

Index: index.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/admin/install/index.php,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -d -r1.52 -r1.53
*** index.php	13 Aug 2008 07:39:47 -0000	1.52
--- index.php	14 Aug 2008 16:51:59 -0000	1.53
***************
*** 1168,1171 ****
--- 1168,1173 ----
   * Check if a table exists
   *
+  * @see DB_checkTableExists
+  *
   * @param   string $table   Table name
   * @return  boolean         True if table exists, false if it does not
***************
*** 1174,1194 ****
  function INST_checkTableExists ($table)
  {
!     global $_TABLES, $_DB_dbms;
! 
!     $exists = false;
! 
!     if ($_DB_dbms == 'mysql') {
!         $result = DB_query ("SHOW TABLES LIKE '{$_TABLES[$table]}'");
!         if (DB_numRows ($result) > 0) {
!             $exists = true;
!         }
!     } elseif ($_DB_dbms == 'mssql') {
!         $result = DB_Query("SELECT 1 FROM sysobjects WHERE name='{$_TABLES[$table]}' AND xtype='U'");
!         if (DB_numRows ($result) > 0) {
!             $exists = true;
!         }
!     }
! 
!     return $exists;
  }
  
--- 1176,1180 ----
  function INST_checkTableExists ($table)
  {
!     return DB_checkTableExists($table);
  }
  




More information about the geeklog-cvs mailing list