Show
Ignore:
Timestamp:
10/31/2007 03:18:05 AM (13 months ago)
Author:
Geert
Message:

Implemented 'label' functionality in URI->rsegment() as well

Files:
1 modified

Legend:

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

    r845 r922  
    6464         * 
    6565         * @access      public 
    66          * @param       integer 
     66         * @param       mixed 
    6767         * @param       mixed 
    6868         * @return      mixed 
     
    7070        public function rsegment($index = 1, $default = FALSE) 
    7171        { 
     72                if (is_string($index)) 
     73                { 
     74                        if (($key = array_search($index, self::$rsegments)) === FALSE) 
     75                                return $default; 
     76 
     77                        $index = $key + 2; 
     78                } 
     79 
    7280                $index = (int) $index - 1; 
    7381