Changeset 3210

Show
Ignore:
Timestamp:
07/27/2008 05:37:49 AM (4 months ago)
Author:
Geert
Message:

Follow-up to r3160. Re-added support for non-required config files/items.

Location:
trunk/system
Files:
2 modified

Legend:

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

    r3209 r3210  
    373373         * @return  mixed 
    374374         */ 
    375         public static function config($key, $slash = FALSE) 
     375        public static function config($key, $slash = FALSE, $required = TRUE) 
    376376        { 
    377377                if (self::$configuration === NULL) 
     
    391391                { 
    392392                        // Load the configuration group 
    393                         self::$configuration[$group] = self::config_load($group); 
     393                        self::$configuration[$group] = self::config_load($group, $required); 
    394394                } 
    395395 
     
    465465         * 
    466466         * @param   string   config filename, without extension 
     467         * @param   boolean  is the file required? 
    467468         * @return  array 
    468469         */ 
    469         public static function config_load($name) 
     470        public static function config_load($name, $required = TRUE) 
    470471        { 
    471472                if ($name === 'core') 
     
    489490                $configuration = array(); 
    490491 
    491                 if ($files = self::find_file('config', $name, TRUE)) 
     492                if ($files = self::find_file('config', $name, $required)) 
    492493                { 
    493494                        foreach ($files as $file) 
  • trunk/system/i18n/en_US/core.php

    r3164 r3210  
    2626 
    2727        // Resource names 
     28        'config'                => 'config file', 
    2829        'controller'            => 'controller', 
    2930        'helper'                => 'helper',