Xaraya / Postnuke CVS Notices - Message

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 Notice

Directory filter : [ all ] / postnuke_official / html / modules / modules [ view in CVS ]

Date Directory [filter] File(s) [view] Author [filter]
10 Aug 2002 16:29:57postnuke_official/html/modules/modulespnadminapi.php,1.44,1.45Mike
 make sure *all* hooks of a module are assigned to the module being updated

Update of /home/cvsroot/postnuke_official/html/modules/modules
In directory ns7.hostnuke.net:/tmp/cvs-serv589

Modified Files:
	pnadminapi.php 
Log Message:
make sure *all* hooks of a module are assigned to the module being updated


Index: pnadminapi.php
===================================================================
RCS file: /home/cvsroot/postnuke_official/html/modules/modules/pnadminapi.php,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -d -r1.44 -r1.45
*** pnadminapi.php	9 Aug 2002 03:08:13 -0000	1.44
--- pnadminapi.php	10 Aug 2002 16:29:55 -0000	1.45
***************
*** 75,78 ****
--- 75,88 ----
      $modinfo = pnModGetInfo($regid);
  
+     // Delete hook regardless
+     $sql = "DELETE FROM $pntable[hooks]
+             WHERE pn_smodule = '" . pnVarPrepForStore($modinfo['name']) . "'";
+     $dbconn->Execute($sql);
+     if($dbconn->ErrorNo() != 0){
+         pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE_ERROR',
+             new SystemException(__FILE__."(".__LINE__."): pnML('Database error while querying'): $sql"));
+         return;
+     }
+ 
      $sql = "SELECT DISTINCT pn_id,
                              pn_smodule,
***************
*** 85,93 ****
                              pn_tfunc
              FROM $pntable[hooks]
!             WHERE pn_smodule IS NULL
!             ORDER BY pn_tmodule,
!                      pn_smodule DESC";
      $result = $dbconn->Execute($sql);
-     $displayed = array();
      for (; !$result->EOF; $result->MoveNext()) {
          list($hookid,
--- 95,100 ----
                              pn_tfunc
              FROM $pntable[hooks]
!             WHERE pn_smodule IS NULL";
      $result = $dbconn->Execute($sql);
      for (; !$result->EOF; $result->MoveNext()) {
          list($hookid,
***************
*** 99,109 ****
               $hooktmodule,
               $hookttype,
!              $hooktfunc,) = $result->fields;
! 
!         // Delete hook regardless
!         $sql = "DELETE FROM $pntable[hooks]
!                 WHERE pn_smodule = '" . pnVarPrepForStore($modinfo['name']) . "'
!                   AND pn_tmodule = '" . pnVarPrepForStore($hooktmodule) . "'";
!         $dbconn->Execute($sql);
  
          // Get selected value of hook
--- 106,110 ----
               $hooktmodule,
               $hookttype,
!              $hooktfunc) = $result->fields;
  
          // Get selected value of hook


Directory filter : [ all ] / postnuke_official / html / modules / modules [ view in CVS ]

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