[geeklog-cvs] geeklog-1.3/public_html/admin plugins.php,1.39,1.40

blaine at iowaoutdoors.org blaine at iowaoutdoors.org
Sun Oct 3 11:03:41 EDT 2004


Update of /var/cvs/geeklog-1.3/public_html/admin
In directory www:/tmp/cvs-serv5483/public_html/admin

Modified Files:
	plugins.php 
Log Message:
Updates to the do_update() to allow plugins to return a message number - which corresponds to a message  string in the plugins language file. The redirect to index.php will then show it as a system message.

Index: plugins.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/admin/plugins.php,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** plugins.php	25 Sep 2004 03:03:10 -0000	1.39
--- plugins.php	3 Oct 2004 15:03:39 -0000	1.40
***************
*** 409,416 ****
          return $retval;
      }
! 
!     if (PLG_upgrade ($pi_name)) {
!         $retval .= COM_showMessage (60);
!     } else {
          $timestamp = strftime ($_CONF['daytime']);
          $retval .= COM_startBlock ($MESSAGE[40] . ' - ' . $timestamp, '',
--- 409,420 ----
          return $retval;
      }
!     $result = PLG_upgrade ($pi_name);
!     if ($result > 0 ) {
!         if ($result === TRUE) { // Catch returns that are just true/false
!             $retval .= COM_showMessage (60);
!         } else {  // Plugin returned a message number
!             $retval = COM_refresh($_CONF['site_url'] .'/index.php?msg='.$result.'&plugin='.$pi_name);
!         }
!     } else {  // Plugin function returned a false
          $timestamp = strftime ($_CONF['daytime']);
          $retval .= COM_startBlock ($MESSAGE[40] . ' - ' . $timestamp, '',
***************
*** 533,535 ****
  echo $display;
  
! ?>
--- 537,539 ----
  echo $display;
  
! ?>
\ No newline at end of file




More information about the geeklog-cvs mailing list