Show
Ignore:
Timestamp:
02/06/2008 06:35:45 PM (10 months ago)
Author:
Shadowhand
Message:

Tiny optimization to Router.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/libraries/Router.php

    r1976 r1977  
    242242                } 
    243243 
     244                // Remove slashes from the start and end of the URI 
     245                self::$current_uri = trim(self::$current_uri, '/'); 
     246 
    244247                if (self::$current_uri !== '') 
    245248                { 
     
    253256                        } 
    254257 
    255                         // Remove extra slashes from the segments that could cause fucked up routing 
    256                         self::$current_uri = preg_replace('!//+!', '/', trim(self::$current_uri, '/')); 
     258                        // Reduce multiple slashes into single slashes 
     259                        self::$current_uri = preg_replace('!//+!', '/', self::$current_uri); 
    257260                } 
    258261        }