Changeset 3396
- Timestamp:
- 08/29/2008 12:29:17 PM (3 months ago)
- Files:
-
- 1 modified
-
trunk/system/classes/router.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/classes/router.php
r3395 r3396 73 73 { 74 74 // If matches exist and there are keys for the URI, parse them 75 if ( $keys = Router::keys($route[0]))75 if (count($matches) > 1 AND $keys = Router::keys($route[0])) 76 76 { 77 77 // Remove the matched string … … 91 91 $route[$key] = $matches[$i]; 92 92 } 93 94 if (isset($route['prefix'][$key])) 93 } 94 } 95 96 if (isset($route['prefix'])) 97 { 98 foreach ($route['prefix'] as $key => $prefix) 99 { 100 if (isset($route[$key])) 95 101 { 96 102 // Add the prefix to the key 97 103 $route[$key] = $route['prefix'][$key].$route[$key]; 98 104 } 99 100 if ($key !== 'controller' AND $key !== 'method' AND isset($route[$key]))101 {102 // Add the value to the arguments103 self::$arguments[$key] = $route[$key];104 }105 105 } 106 } 107 108 foreach ($route as $key => $val) 109 { 110 if ( ! is_string($key) OR $key === 'controller' OR $key === 'method' OR in_array($key, self::$readonly_keys)) 111 { 112 // These keys are not arguments, skip them 113 continue; 114 } 115 116 self::$arguments[$key] = $val; 106 117 } 107 118 … … 122 133 // A matching route has been found! 123 134 self::$current_route = $name; 135 136 echo Kohana::debug($route, self::$arguments);exit; 124 137 125 138 return TRUE;
