[geeklog-cvs] geeklog-1.3/plugins/staticpages config.php,1.5,1.6 functions.inc,1.27,1.28

dhaun at geeklog.net dhaun at geeklog.net
Wed Jan 14 13:05:44 EST 2004


Update of /usr/cvs/geeklog/geeklog-1.3/plugins/staticpages
In directory geeklog_prod:/tmp/cvs-serv29176/plugins/staticpages

Modified Files:
	config.php functions.inc 
Log Message:
You can now disable PHP in static pages entirely by setting $_SP_CONF['allow_php'] = 0;


Index: config.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/plugins/staticpages/config.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** config.php	28 Dec 2003 18:53:59 -0000	1.5
--- config.php	14 Jan 2004 18:05:42 -0000	1.6
***************
*** 3,6 ****
--- 3,12 ----
  $_SP_CONF['version'] = '1.4';
  
+ // If you don't plan on using PHP code in static pages, you should set this
+ // to 0, thus disabling the execution of PHP.
+ 
+ $_SP_CONF['allow_php'] = 1;
+ 
+ 
  // If you have more than one static page that is to be displayed in Geeklog's 
  // center area, you can specify how to sort them:

Index: functions.inc
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/plugins/staticpages/functions.inc,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** functions.inc	2 Jan 2004 22:08:59 -0000	1.27
--- functions.inc	14 Jan 2004 18:05:42 -0000	1.28
***************
*** 3,7 ****
  /* Reminder: always indent with 4 spaces (no tabs). */
  // +---------------------------------------------------------------------------+
! // | Static Pages Plugin 1.3 for Geeklog - The Ultimate Weblog                 |
  // +---------------------------------------------------------------------------+
  // | functions.inc                                                             |
--- 3,7 ----
  /* Reminder: always indent with 4 spaces (no tabs). */
  // +---------------------------------------------------------------------------+
! // | Static Pages Plugin 1.4 for Geeklog - The Ultimate Weblog                 |
  // +---------------------------------------------------------------------------+
  // | functions.inc                                                             |
***************
*** 11,15 ****
  // | Pages' PHP files.                                                         |
  // +---------------------------------------------------------------------------+
! // | Copyright (C) 2000-2003 by the following authors:                         |
  // |                                                                           |
  // | Authors: Tony Bibbs       - tony at tonybibbs.com                            |
--- 11,15 ----
  // | Pages' PHP files.                                                         |
  // +---------------------------------------------------------------------------+
! // | Copyright (C) 2000-2004 by the following authors:                         |
  // |                                                                           |
  // | Authors: Tony Bibbs       - tony at tonybibbs.com                            |
***************
*** 407,418 ****
              }
  
!             // Check for type (ie html or php)
!             if ($spresult['sp_php'] == 1) {
!                 $retval .= eval (stripslashes ($spresult['sp_content']));
!             } else if ($spresult['sp_php'] == 2) {
!                 ob_start ();
!                 eval (stripslashes ($spresult['sp_content']));
!                 $retval .= ob_get_contents ();
!                 ob_end_clean ();
              } else {
                  $retval .= stripslashes ($spresult['sp_content']);
--- 407,422 ----
              }
  
!             if ($_SP_CONF['allow_php'] == 1) {
!                 // Check for type (ie html or php)
!                 if ($spresult['sp_php'] == 1) {
!                     $retval .= eval (stripslashes ($spresult['sp_content']));
!                 } else if ($spresult['sp_php'] == 2) {
!                     ob_start ();
!                     eval (stripslashes ($spresult['sp_content']));
!                     $retval .= ob_get_contents ();
!                     ob_end_clean ();
!                 } else {
!                     $retval .= stripslashes ($spresult['sp_content']);
!                 }
              } else {
                  $retval .= stripslashes ($spresult['sp_content']);





More information about the geeklog-cvs mailing list