Changeset 2888

Show
Ignore:
Timestamp:
06/24/2008 07:57:11 AM (4 months ago)
Author:
OscarB
Message:

fix for r2886 where _default or 404 is returned if index method not explicitly supplied

Files:
1 modified

Legend:

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

    r2886 r2888  
    7474                // Explode the segments by slashes 
    7575                self::$segments = ($default_route === TRUE OR self::$segments === '') ? array() : explode('/', self::$segments); 
    76  
     76                 
    7777                if ($default_route === FALSE AND count(self::$routes) > 1) 
    7878                { 
     
    110110                } 
    111111 
     112                 
    112113                if (self::$controller !== NULL AND isset(self::$rsegments[$key])) 
    113114                { 
    114115                        // Set method 
    115                         self::$method = self::$rsegments[$key]; 
     116                        self::$method = isset(self::$rsegments[1]) ? self::$rsegments[1] : 'index';  
    116117 
    117118                        if (isset(self::$rsegments[$key + 1])) 
     
    121122                        } 
    122123                } 
    123  
     124                 
    124125                // Last chance to set routing before a 404 is triggered 
    125126                Event::run('system.post_routing');