[geeklog-cvs] geeklog-1.3/public_html/staticpages index.php,1.13,1.14

dhaun at geeklog.net dhaun at geeklog.net
Fri Jan 2 17:10:05 EST 2004


Update of /usr/cvs/geeklog/geeklog-1.3/public_html/staticpages
In directory geeklog_prod:/tmp/cvs-serv11415/staticpages

Modified Files:
	index.php 
Log Message:
Implemented option to have "plain" PHP in Static Pages, i.e. without the need for a 'return' statement.


Index: index.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/staticpages/index.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** index.php	29 Dec 2003 13:21:45 -0000	1.13
--- index.php	2 Jan 2004 22:10:03 -0000	1.14
***************
*** 6,11 ****
  // +---------------------------------------------------------------------------+
  // | index.php                                                                 |
- // | This is the main page for the Geeklog Static Page Plugin                  |
  // |                                                                           |
  // +---------------------------------------------------------------------------+
  // | Copyright (C) 2000-2003 by the following authors:                         |
--- 6,11 ----
  // +---------------------------------------------------------------------------+
  // | index.php                                                                 |
  // |                                                                           |
+ // | This is the main page for the Geeklog Static Page Plugin                  |
  // +---------------------------------------------------------------------------+
  // | Copyright (C) 2000-2003 by the following authors:                         |
***************
*** 13,16 ****
--- 13,17 ----
  // | Authors: Tony Bibbs       - tony at tonybibbs.com                            |
  // |          Tom Willett      - twillett at users.sourceforge.net                |
+ // |          Dirk Haun        - dirk at haun-online.de                           |
  // +---------------------------------------------------------------------------+
  // |                                                                           |
***************
*** 74,80 ****
          $retval .= COM_startBlock (stripslashes ($A['sp_title']));
      }
!     //Check for type (ie html or php)
      if ($A['sp_php'] == 1) {
          $retval .= eval (stripslashes ($A['sp_content']));
      } else {
          $retval .= stripslashes ($A['sp_content']);
--- 75,86 ----
          $retval .= COM_startBlock (stripslashes ($A['sp_title']));
      }
!     // Check for type (ie html or php)
      if ($A['sp_php'] == 1) {
          $retval .= eval (stripslashes ($A['sp_content']));
+     } else if ($A['sp_php'] == 2) {
+         ob_start ();
+         eval (stripslashes ($A['sp_content']));
+         $retval .= ob_get_contents ();
+         ob_end_clean ();
      } else {
          $retval .= stripslashes ($A['sp_content']);





More information about the geeklog-cvs mailing list