[Customisation Database Commits] r1114 - /trunk/titania/includes/core/url.php

Nathan Guse exreaction at phpbb.com
Sat Apr 24 19:30:20 BST 2010


Author: exreaction
Date: Sat Apr 24 19:30:20 2010
New Revision: 1114

Log:
Check for the ending slash in the final URL, not just the base (the base could be an empty string)

Modified:
    trunk/titania/includes/core/url.php

Modified: trunk/titania/includes/core/url.php
==============================================================================
*** trunk/titania/includes/core/url.php (original)
--- trunk/titania/includes/core/url.php Sat Apr 24 19:30:20 2010
***************
*** 84,98 ****
  		$base = array_map('urlencode', $base);
  		$base = implode('/', $base);
  
  		// Add a slash to the end if we do not have one
! 		if (substr($base, -1) != '/')
  		{
! 			$base .= '/';
  		}
  
- 		// Start building the final URL
- 		$final_url = self::$root_url . $base;
- 
  		// Add the Session ID if required.
  		global $_SID;
  		if ($_SID)
--- 84,98 ----
  		$base = array_map('urlencode', $base);
  		$base = implode('/', $base);
  
+ 		// Start building the final URL
+ 		$final_url = self::$root_url . $base;
+ 
  		// Add a slash to the end if we do not have one
! 		if (substr($final_url, -1) != '/')
  		{
! 			$final_url .= '/';
  		}
  
  		// Add the Session ID if required.
  		global $_SID;
  		if ($_SID)




More information about the customisationdb-commits mailing list