Note: this list is kept only as a demonstration for CVSNotice. For the latest CVS notices, see the Xaraya and Postnuke sites
View Statistics - Next Notice - Previous NoticeDirectory filter : [ all ] / postnuke_official / html / modules / template [ view in CVS ]
| Date | Directory [filter] | File(s) [view] | Author [filter] | 
| 28 Jul 2002 01:19:22 | postnuke_official/html/modules/template | pninit.php,1.8,1.9 | Gary Mitchell | 
| Update template module to use pnDBDropTable | |||
Update of /home/cvsroot/postnuke_official/html/modules/template
In directory ns7.hostnuke.net:/tmp/cvs-serv27042
Modified Files:
	pninit.php 
Log Message:
Update template module to use pnDBDropTable
Index: pninit.php
===================================================================
RCS file: /home/cvsroot/postnuke_official/html/modules/template/pninit.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** pninit.php	17 Jul 2002 09:02:03 -0000	1.8
--- pninit.php	28 Jul 2002 01:19:20 -0000	1.9
***************
*** 234,243 ****
      $pntable = pnDBGetTables();
  
!     // Drop the table - for such a simple command the advantages of separating
!     // out the SQL statement from the Execute() command are minimal, but as
!     // this has been done elsewhere it makes sense to stick to a single method
!     $sql = "DROP TABLE $pntable[template]";
!     $dbconn->Execute($sql);
  
      // Check for an error with the database code, and if so set an
      // appropriate error message and return
--- 234,251 ----
      $pntable = pnDBGetTables();
  
!     // adodb does not provide the functionality to abstract table creates
!     // across multiple databases.  Postnuke offers the pnDropeTable function
!     // contained in the following file to provide this functionality.
!     include ('pnadodb/pnTableDDL.php');
  
+     // Generate the SQL to drop the table using the API
+     $sql = pnDBDropTable($pntable['template']);
+     if ($dbconn->ErrorNo() != 0) {
+         // Report failed deletion attempt
+         return false;
+     }
+ 
+     // Drop the table
+     $dbconn->Execute($sql);
      // Check for an error with the database code, and if so set an
      // appropriate error message and return
View Statistics - Next Notice - Previous Notice
| Visit Developer Site - Browse CVS Repository | 
Syndicate via backend.rss (max. once per hour please)  | Powered by CVSNotice 0.1.3 |