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 ]


Deprecated: Function gmstrftime() is deprecated in /home/mikespub/www/list.php on line 509
Date Directory [filter] File(s) [view] Author [filter]
09 Aug 2002 03:08:15postnuke_official/html/modules/modulespnadminapi.php,1.43,1.44Paul Rosania
 fixed bug where syntax errors in pninit.php would cause a module to report successful initialization without even calling its initialization function. also, better checking for user/admin capability, since some modules have pnuser.php user funcs but no us

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

Modified Files:
	pnadminapi.php 
Log Message:
fixed bug where syntax errors in pninit.php would cause a module to report successful initialization without even calling its initialization function. also, better checking for user/admin capability, since some modules have pnuser.php user funcs but no user_main and were being reported as user-capable. Now you can override the autodetection in your pnversion.php file. blegh. sorry for the long report.


Index: pnadminapi.php
===================================================================
RCS file: /home/cvsroot/postnuke_official/html/modules/modules/pnadminapi.php,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** pnadminapi.php	2 Aug 2002 00:11:50 -0000	1.43
--- pnadminapi.php	9 Aug 2002 03:08:13 -0000	1.44
***************
*** 409,412 ****
--- 409,421 ----
                  continue;
              }
+             
+             if (isset($modversion['admin'])) {
+                 $adminCapable = $modversion['admin'];
+             }
+             
+             if (isset($modversion['user'])) {
+                 $userCapable = $modversion['user'];
+             }
+ 
              $version = $modversion['version'];
              $description = $modversion['description'];
***************
*** 550,557 ****
      // Argument check
      if (!isset($regid)) {
!        $msg = pnML('Empty regid (#(1)).', $regid);	
          pnExceptionSet(PN_SYSTEM_EXCEPTION, 'BAD_PARAM',
!                        new SystemException(__FILE__.'('.__LINE__.'): '.$msg));
!         return;
      }
  
--- 559,565 ----
      // Argument check
      if (!isset($regid)) {
!        $msg = pnML('Missing module regid (#(1)).', $regid);	
          pnExceptionSet(PN_SYSTEM_EXCEPTION, 'BAD_PARAM',
!                        new SystemException(__FILE__.'('.__LINE__.'): '.$msg));return;
      }
  
***************
*** 559,564 ****
      $modinfo = pnModGetInfo($regid);
      if (empty($modinfo)) {
!         pnSessionSetVar('errormsg', _MODNOSUCHMOD);
!         return false;
      }
  
--- 567,572 ----
      $modinfo = pnModGetInfo($regid);
      if (empty($modinfo)) {
!         pnExceptionSet(PN_SYSTEM_EXCEPTION, 'MODULE_NOT_EXIST',
!                        new SystemException(__FILE__."(".__LINE__."): Module (regid: $regid) does not exist."));return;
      }
  
***************
*** 568,581 ****
      // Module initialisation function
      $osdir = pnVarPrepForOS($modinfo['directory']);
!     @include("modules/$osdir/pninit.php");
!     @include("modules/$osdir/pnlang/" . pnVarPrepForOS(pnUserGetLang()) . "/init.php");
!     $func = $modinfo['name'] . '_init';
!     if (function_exists($func)) {
!         if ($func() != true) {
              pnSessionSetVar('errormsg', _MODINITFAILED);
              return false;
          }
      }
! 
      // Update state of module
      if (!modules_adminapi_setstate(array('regid' => $regid,
--- 576,596 ----
      // Module initialisation function
      $osdir = pnVarPrepForOS($modinfo['directory']);
!     $init_file = "modules/$osdir/pninit.php";
!     if (file_exists($init_file)) {
!         @include($init_file);
!         @include("modules/$osdir/pnlang/" . pnVarPrepForOS(pnUserGetLang()) . "/init.php");
!         $func = $modinfo['name'] . '_init';
!         if (function_exists($func)) {
!             if ($func() != true) {
!                 pnSessionSetVar('errormsg', _MODINITFAILED);
!                 return false;
!             }
!         } else {
!             // file exists, but function not found. Exception!
              pnSessionSetVar('errormsg', _MODINITFAILED);
              return false;
          }
      }
!     
      // Update state of module
      if (!modules_adminapi_setstate(array('regid' => $regid,


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