[geeklog-cvs] geeklog-1.3/public_html lib-common.php,1.227,1.228

geeklog-cvs-admin at lists.geeklog.net geeklog-cvs-admin at lists.geeklog.net
Thu Jun 19 07:00:31 EDT 2003


Update of /usr/cvs/geeklog/geeklog-1.3/public_html
In directory internal.geeklog.net:/tmp/cvs-serv16511

Modified Files:
	lib-common.php 
Log Message:
Added topicoption.thtml and topicoption_off.thtml template files for entries in the Topics (Sections) menu.


Index: lib-common.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/lib-common.php,v
retrieving revision 1.227
retrieving revision 1.228
diff -C2 -d -r1.227 -r1.228
*** lib-common.php	16 Jun 2003 20:08:50 -0000	1.227
--- lib-common.php	19 Jun 2003 11:00:29 -0000	1.228
***************
*** 1926,1931 ****
      $retval = '';
      $sections = new Template( $_CONF['path_layout'] );
!     $sections->set_file( array( 'option' => 'useroption.thtml',
!                                 'inactive' => 'useroption_off.thtml' ));
      $sections->set_var( 'site_url', $_CONF['site_url'] );
      $sections->set_var( 'layout_url', $_CONF['layout_url'] );
--- 1926,1931 ----
      $retval = '';
      $sections = new Template( $_CONF['path_layout'] );
!     $sections->set_file( array( 'option' => 'topicoption.thtml',
!                                 'inactive' => 'topicoption_off.thtml' ));
      $sections->set_var( 'site_url', $_CONF['site_url'] );
      $sections->set_var( 'layout_url', $_CONF['layout_url'] );
***************
*** 2071,2074 ****
--- 2071,2090 ----
              $thisUrl .= '?' . $HTTP_SERVER_VARS['QUERY_STRING'];
          }
+         if( empty( $thisUrl ))
+         {
+             $firstslash = strpos( $_CONF['site_url'], '/' );
+             if( $firstslash + 1 == strrpos( $_CONF['site_url'], '/' ))
+             {
+                 // site is in the document root
+                 $thisUrl = $_CONF['site_url'] . $HTTP_SERVER_VARS['REQUEST_URI'];
+             }
+             else
+             {
+                 // extract server name first
+                 $pos = strpos( $_CONF['site_url'], '/', $firstslash + 2 );
+                 $thisUrl = substr( $_CONF['site_url'], 0, $pos )
+                          . $HTTP_SERVER_VARS['REQUEST_URI'];
+             }
+         }
  
          $retval .= COM_startBlock( $title, $help, COM_getBlockTemplate( 'user_block', 'header' ));
***************
*** 2217,2220 ****
--- 2233,2252 ----
          {
              $thisUrl .= '?' . $HTTP_SERVER_VARS['QUERY_STRING'];
+         }
+         if( empty( $thisUrl ))
+         {
+             $firstslash = strpos( $_CONF['site_url'], '/' );
+             if( $firstslash + 1 == strrpos( $_CONF['site_url'], '/' ))
+             {
+                 // site is in the document root
+                 $thisUrl = $_CONF['site_url'] . $HTTP_SERVER_VARS['REQUEST_URI'];
+             }
+             else
+             {
+                 // extract server name first
+                 $pos = strpos( $_CONF['site_url'], '/', $firstslash + 2 );
+                 $thisUrl = substr( $_CONF['site_url'], 0, $pos )
+                          . $HTTP_SERVER_VARS['REQUEST_URI'];
+             }
          }
  





More information about the geeklog-cvs mailing list