| 241 | | self::$current_uri = (string) substr(self::$current_uri, $strpos_fc + strlen($fc)); |
| 242 | | } |
| 243 | | |
| 244 | | if ($suffix = Config::item('core.url_suffix') AND strpos(self::$current_uri, $suffix) !== FALSE) |
| 245 | | { |
| 246 | | // Remove the URL suffix |
| 247 | | self::$current_uri = preg_replace('!'.preg_quote($suffix).'$!u', '', self::$current_uri); |
| 248 | | |
| 249 | | // Set the URL suffix |
| 250 | | self::$url_suffix = $suffix; |
| 251 | | } |
| 252 | | |
| 253 | | // Remove extra slashes from the segments that could cause fucked up routing |
| 254 | | self::$current_uri = preg_replace('!//+!', '/', trim(self::$current_uri, '/')); |
| | 241 | self::$current_uri = substr(self::$current_uri, $strpos_fc + strlen($fc)); |
| | 242 | } |
| | 243 | |
| | 244 | if (self::$current_uri !== '') |
| | 245 | { |
| | 246 | if ($suffix = Config::item('core.url_suffix') AND strpos(self::$current_uri, $suffix) !== FALSE) |
| | 247 | { |
| | 248 | // Remove the URL suffix |
| | 249 | self::$current_uri = preg_replace('!'.preg_quote($suffix).'$!u', '', self::$current_uri); |
| | 250 | |
| | 251 | // Set the URL suffix |
| | 252 | self::$url_suffix = $suffix; |
| | 253 | } |
| | 254 | |
| | 255 | // Remove extra slashes from the segments that could cause fucked up routing |
| | 256 | self::$current_uri = preg_replace('!//+!', '/', trim(self::$current_uri, '/')); |
| | 257 | } |