Show
Ignore:
Timestamp:
02/22/2008 12:21:12 PM (11 months ago)
Author:
Shadowhand
Message:

A few small cleanups and optimizations that I've been holding on to.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/core/Kohana.php

    r2135 r2138  
    739739                        foreach(Config::include_paths() as $path) 
    740740                        { 
     741                                // Recursively get and merge all files 
    741742                                $files = array_merge($files, self::list_files($directory, $recursive, $path.$directory)); 
    742743                        } 
     
    779780                static $language = array(); 
    780781 
    781                 $group = current(explode('.', $key)); 
    782  
    783                 if ( ! isset($language[$group])) 
     782                // Extract the main group from the key 
     783                $group = explode('.', $key, 1); 
     784                $group = $group[0]; 
     785 
     786                if (empty($language[$group])) 
    784787                { 
    785788                        // Messages from this file 
     
    809812                } 
    810813 
     814                // Get the line from the language 
    811815                $line = self::key_string($key, $language); 
    812816 
     
    881885        /** 
    882886         * Retrieves current user agent information: 
    883          * keys:        browser, version, platform, mobile, robot, referrer, languages, charsets 
    884          * tests:       is_browser, is_mobile, is_robot, accept_ 
     887         * keys:  browser, version, platform, mobile, robot, referrer, languages, charsets 
     888         * tests: is_browser, is_mobile, is_robot, accept_lang, accept_charset 
    885889         * 
    886890         * @param   string   key or test name