[geeklog-cvs] geeklog-1.3/public_html lib-common.php,1.257,1.258

geeklog-cvs-admin at lists.geeklog.net geeklog-cvs-admin at lists.geeklog.net
Fri Sep 12 05:31:36 EDT 2003


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

Modified Files:
	lib-common.php 
Log Message:
Changed COM_siteHeader() to use output buffering for the eval().


Index: lib-common.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/lib-common.php,v
retrieving revision 1.257
retrieving revision 1.258
diff -C2 -d -r1.257 -r1.258
*** lib-common.php	8 Sep 2003 17:33:00 -0000	1.257
--- lib-common.php	12 Sep 2003 09:31:34 -0000	1.258
***************
*** 823,830 ****
      else
      {
!         $contributelink = $_CONF['site_url'] . '/submit.php?type=story&topic=' . $topic;
          $header->set_var( 'current_topic', '&topic=' . $topic );
      }
!     $header->set_var( 'menuitem_url', $contributelink);
      $header->set_var( 'menuitem_text', $LANG01[71] );
      $header->parse( 'menu_elements', 'menuitem', true );
--- 823,831 ----
      else
      {
!         $contributelink = $_CONF['site_url']
!                         . '/submit.php?type=story&topic=' . $topic;
          $header->set_var( 'current_topic', '&topic=' . $topic );
      }
!     $header->set_var( 'menuitem_url', $contributelink );
      $header->set_var( 'menuitem_text', $LANG01[71] );
      $header->parse( 'menu_elements', 'menuitem', true );
***************
*** 853,857 ****
      }
  
!     if( count($plugin_menu) == 0 )
      {
          $header->parse( 'plg_menu_elements', 'menuitem_none', true );
--- 854,858 ----
      }
  
!     if( count( $plugin_menu ) == 0 )
      {
          $header->parse( 'plg_menu_elements', 'menuitem_none', true );
***************
*** 859,868 ****
      else
      {
!         for( $i = 1; $i <= count($plugin_menu); $i++ )
          {
!             $header->set_var( 'menuitem_url', current($plugin_menu) );
!             $header->set_var( 'menuitem_text', key($plugin_menu) );
  
!             if( $i == count($plugin_menu) )
              {
                  $header->parse( 'plg_menu_elements', 'menuitem_last', true );
--- 860,869 ----
      else
      {
!         for( $i = 1; $i <= count( $plugin_menu ); $i++ )
          {
!             $header->set_var( 'menuitem_url', current( $plugin_menu ));
!             $header->set_var( 'menuitem_text', key( $plugin_menu ));
  
!             if( $i == count( $plugin_menu ))
              {
                  $header->parse( 'plg_menu_elements', 'menuitem_last', true );
***************
*** 890,907 ****
      {
          // Now show any blocks -- need to get the topic if not on home page
!         if (!isset($HTTP_GET_VARS['topic'])) {
!             if (isset($HTTP_GET_VARS['story'])) {
                  $sid = $HTTP_GET_VARS['story'];
!             } elseif (isset($HTTP_GET_VARS['sid'])) {
                  $sid = $HTTP_GET_VARS['sid'];
!             } elseif (isset($HTTP_POST_VARS['story'])) {
                  $sid = $HTTP_POST_VARS['story'];
              }
!             if (isset($sid)) {
!               $topic = DB_getItem($_TABLES['stories'], "tid", "sid='$sid'");
              }
! 
!         } else {
!                 $topic = $HTTP_GET_VARS['topic'];
          }
          $header->set_var( 'geeklog_blocks', COM_showBlocks( 'left', $topic ));
--- 891,916 ----
      {
          // Now show any blocks -- need to get the topic if not on home page
!         if( !isset( $HTTP_GET_VARS['topic'] ))
!         {
!             if( isset( $HTTP_GET_VARS['story'] ))
!             {
                  $sid = $HTTP_GET_VARS['story'];
!             }
!             elseif( isset( $HTTP_GET_VARS['sid'] ))
!             {
                  $sid = $HTTP_GET_VARS['sid'];
!             }
!             elseif( isset( $HTTP_POST_VARS['story'] ))
!             {
                  $sid = $HTTP_POST_VARS['story'];
              }
!             if( isset( $sid ))
!             {
!                 $topic = DB_getItem( $_TABLES['stories'], 'tid', "sid='$sid'" );
              }
!         }
!         else
!         {
!             $topic = $HTTP_GET_VARS['topic'];
          }
          $header->set_var( 'geeklog_blocks', COM_showBlocks( 'left', $topic ));
***************
*** 923,928 ****
      $tmp = $header->parse( 'index_header', 'header' );
  
!     return eval( "?>" . $tmp );
!     return $header->finish( $header->get_var( 'index_header' ));
  }
  
--- 932,941 ----
      $tmp = $header->parse( 'index_header', 'header' );
  
!     ob_start();
!     eval( '?>' . $tmp );
!     $retval = ob_get_contents();
!     ob_end_clean();
! 
!     return $retval;
  }
  
***************
*** 3797,3801 ****
  function COM_emailUserTopics()
  {
!     global $_TABLES, $LANG08, $LANG24, $_CONF, $LANG_CHARSET;
  
      $subject = strip_tags( $_CONF['site_name'] . $LANG08[30] . strftime( '%Y-%m-%d', time() ));
--- 3810,3814 ----
  function COM_emailUserTopics()
  {
!     global $_CONF, $_TABLES, $LANG08, $LANG24;
  
      $subject = strip_tags( $_CONF['site_name'] . $LANG08[30] . strftime( '%Y-%m-%d', time() ));





More information about the geeklog-cvs mailing list