[geeklog-cvs] geeklog-1.3/public_html lib-common.php,1.270,1.271

dhaun at geeklog.net dhaun at geeklog.net
Fri Jan 2 17:06:24 EST 2004


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

Modified Files:
	lib-common.php 
Log Message:
Try to guess the correct path separator for the PHP include path. Also fixed a warning message in case the site_url does not contain slashes.


Index: lib-common.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/lib-common.php,v
retrieving revision 1.270
retrieving revision 1.271
diff -C2 -d -r1.270 -r1.271
*** lib-common.php	2 Jan 2004 02:51:18 -0000	1.270
--- lib-common.php	2 Jan 2004 22:06:22 -0000	1.271
***************
*** 195,199 ****
  {
      $curPHPIncludePath = ini_get( 'include_path' );
!     ini_set( 'include_path', $curPHPIncludePath . ':' . $_CONF['path_pear'] );  
  }
  
--- 195,205 ----
  {
      $curPHPIncludePath = ini_get( 'include_path' );
!     $separator = ';';
!     if( strpos( $curPHPIncludePath, ';' ) === false )
!     {
!         $separator = ':';
!     }
!     ini_set( 'include_path',
!              $curPHPIncludePath . $separator . $_CONF['path_pear'] );  
  }
  
***************
*** 1967,1971 ****
  
              $firstslash = strpos( $_CONF['site_url'], '/' );
!             if( $firstslash + 1 == strrpos( $_CONF['site_url'], '/' ))
              {
                  // site is in the document root
--- 1973,1982 ----
  
              $firstslash = strpos( $_CONF['site_url'], '/' );
!             if( $firstslash === false )
!             {
!                 // special case - assume it's okay
!                 $thisUrl = $_CONF['site_url'] . $requestUri;
!             }
!             else if( $firstslash + 1 == strrpos( $_CONF['site_url'], '/' ))
              {
                  // site is in the document root
***************
*** 2137,2141 ****
  
              $firstslash = strpos( $_CONF['site_url'], '/' );
!             if( $firstslash + 1 == strrpos( $_CONF['site_url'], '/' ))
              {
                  // site is in the document root
--- 2148,2157 ----
  
              $firstslash = strpos( $_CONF['site_url'], '/' );
!             if( $firstslash === false )
!             {
!                 // special case - assume it's okay
!                 $thisUrl = $_CONF['site_url'] . $requestUri;
!             }
!             else if( $firstslash + 1 == strrpos( $_CONF['site_url'], '/' ))
              {
                  // site is in the document root
***************
*** 2986,2993 ****
  * Makes an ID based on current date/time
  *
! * This function COM_creates a 17 digit sid for stories based on the 14 digit date
  * and a 3 digit random number that was seeded with the number of microseconds
! * (.000001th of a second) since the last full second. NOTE: this is now used for more than
! * just stories!
  *
  * @return   string  $sid  Story ID
--- 3002,3009 ----
  * Makes an ID based on current date/time
  *
! * This function creates a 17 digit sid for stories based on the 14 digit date
  * and a 3 digit random number that was seeded with the number of microseconds
! * (.000001th of a second) since the last full second.
! * NOTE: this is now used for more than just stories!
  *
  * @return   string  $sid  Story ID





More information about the geeklog-cvs mailing list