Changeset 3383

Show
Ignore:
Timestamp:
08/28/2008 03:22:02 PM (3 months ago)
Author:
Shadowhand
Message:

Follow up to r3366, fixes for ORM and Router

Location:
trunk/system/classes
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/classes/orm.php

    r3379 r3383  
    7777        { 
    7878                // Set the object name 
    79                 $this->object_name = strtolower(substr(get_class($this), 0, -6)); 
     79                $this->object_name = strtolower(substr(get_class($this), 6)); 
    8080 
    8181                // Initialize database 
     
    454454                } 
    455455 
     456                if ( ! isset($this->db_applied['orderby'])) 
     457                { 
     458                        // Apply sorting 
     459                        $this->db->orderby($this->sorting); 
     460                } 
     461 
    456462                return $this->load_result(); 
    457463        } 
  • trunk/system/classes/router.php

    r3381 r3383  
    7070                        if (preg_match('#^'.$regex.'$#u', self::$current_uri, $matches)) 
    7171                        { 
     72                                echo Kohana::debug($regex, $name); 
     73 
    7274                                // If matches exist and there are keys for the URI, parse them 
    7375                                if (count($matches) > 1 AND $keys = Router::keys($route[0])) 
     
    104106                                } 
    105107 
     108                                // Set controller name 
     109                                self::$controller = $route['controller']; 
     110 
    106111                                if (isset($route['method'])) 
    107112                                {