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 / includes [ view in CVS ]


Deprecated: Function gmstrftime() is deprecated in /home/mikespub/www/list.php on line 509
Date Directory [filter] File(s) [view] Author [filter]
07 Aug 2002 00:17:05postnuke_official/html/includespnBlocks.php,1.48,1.49Mike
 waiting for paul...

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

Modified Files:
	pnBlocks.php 
Log Message:
waiting for paul...


Index: pnBlocks.php
===================================================================
RCS file: /home/cvsroot/postnuke_official/html/includes/pnBlocks.php,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -d -r1.48 -r1.49
*** pnBlocks.php	5 Aug 2002 21:49:07 -0000	1.48
--- pnBlocks.php	7 Aug 2002 00:17:03 -0000	1.49
***************
*** 496,498 ****
--- 496,550 ----
  }
  
+ /**
+  * get block group information
+  * @access public
+  * @param module the module name
+  * @param type the block type
+  * @returns void
+  * @return when paul says how this is supposed to work
+  * @raise DATABASE_ERROR, BAD_PARAM
+  */
+ function pnBlockTypeRegister($module,$type)
+ {
+     if (empty($module)) {
+         $msg = pnML('Empty module name.');
+         pnExceptionSet(PN_SYSTEM_EXCEPTION, 'BAD_PARAM',
+                        new SystemException(__FILE__.'('.__LINE__.'): '.$msg));
+ 	    return NULL;
+     }
+     if (empty($type)) {
+         $msg = pnML('Empty block type.');
+         pnExceptionSet(PN_SYSTEM_EXCEPTION, 'BAD_PARAM',
+                        new SystemException(__FILE__.'('.__LINE__.'): '.$msg));
+ 	    return NULL;
+     }
+     
+     list ($dbconn) = pnDBGetConn();
+     $pntable = pnDBGetTables();
+ 
+     $block_types_table = $pntable['block_types'];
+ 
+     $query = "INSERT INTO $block_types_table
+               (pn_module, pn_type)
+               VALUES ('" . pnVarPrepForStore($module) . "',
+                       '" . pnVarPrepForStore($type) . "')";
+ 
+     $result = $dbconn->Execute($query);
+ 
+     // Check for db errors
+     if ($dbconn->ErrorNo() != 0) {
+         $msg = pnMLByKey('DATABASE_ERROR', $query);
+         pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE_ERROR',
+                        new SystemException(__FILE__.'('.__LINE__.'): '.$msg));
+         return NULL;
+     }
+ 
+ }
+ 
+ // TODO: pnBlockTypeUnregister (and all instances etc. too)
+ 
+ // BTW: registration/unregistration should happen when modules are activated
+ //      resp. deactivated, not when they're initialised if you ask me...
+ 
+ 
  ?>


Directory filter : [ all ] / postnuke_official / html / includes [ 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