tools/split_tables/tools/split_tables split_tables.php,1.3,1.4

Sebastian Bergmann <[email protected]>
Newsgroups gmane.comp.web.phpopentracker.cvs
Message-ID <[email protected]>
Update of /cvsroot/phpopencounter/tools/split_tables/tools/split_tables
In directory sc8-pr-cvs1:/tmp/cvs-serv9099/tools/split_tables

Modified Files:
	split_tables.php 
Log Message:
Add a safeguard against using the split_tables script with database handlers other than the one for MySQL Merge tables.

Index: split_tables.php
===================================================================
RCS file: /cvsroot/phpopencounter/tools/split_tables/tools/split_tables/split_tables.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** split_tables.php	13 Oct 2003 03:11:14 -0000	1.3
--- split_tables.php	5 Dec 2003 05:47:00 -0000	1.4
***************
*** 38,42 ****
  
  function splitTable($type, $name) {
!   $db     = &phpOpenTracker_DB::getInstance();
    $tables = array();
  
--- 38,50 ----
  
  function splitTable($type, $name) {
!   $db = &phpOpenTracker_DB::getInstance();
! 
!   if (!is_a($db, 'phpOpenTracker_DB_mysql_merge')) {
!     return phpOpenTracker::handleError(
!       'MySQL Merge Tables Handler not configured.',
!       E_USER_ERROR
!     );
!   }
! 
    $tables = array();
  




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.