Changeset 673
- Timestamp:
- 10/05/2007 03:12:01 PM (12 months ago)
- Location:
- trunk
- Files:
-
- 3 modified
-
application/config/config.php (modified) (1 diff)
-
system/helpers/inflector.php (modified) (3 diffs)
-
system/libraries/View.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/application/config/config.php
r658 r673 133 133 $config['autoload'] = array 134 134 ( 135 'libraries' => ' profiler',135 'libraries' => '', 136 136 'models' => '' 137 137 ); -
trunk/system/helpers/inflector.php
r671 r673 3 3 class inflector { 4 4 5 protected static $uncountables = array(); 5 public static function uncountable($str) 6 { 7 static $uncountables = NULL; 8 9 if ($uncountables === NULL) 10 { 11 // Makes a mirrored array, eg: foo => foo 12 $uncountables = array_combine(Kohana::lang('inflector'), Kohana::lang('inflector')); 13 } 14 15 return isset($uncountables[$str]); 16 } 6 17 7 18 public static function singular($str) … … 9 20 $str = trim($str); 10 21 11 if (empty(self::$uncountables))12 {13 self::$uncountables = Kohana::lang('inflector');14 }15 16 22 // We can just return uncountable words 17 if ( in_array(strtolower($str), self::$uncountables))23 if (self::uncountable($str)) 18 24 return $str; 19 25 … … 43 49 $str = trim($str); 44 50 45 if (empty(self::$uncountables))46 {47 self::$uncountables = Kohana::lang('inflector');48 }49 50 51 // We can just return uncountable words 51 if ( in_array(strtolower($str), self::$uncountables))52 if (self::uncountable($str)) 52 53 return $str; 53 54 -
trunk/system/libraries/View.php
r656 r673 48 48 $this->kohana_filename = Kohana::find_file('views', $name, TRUE, $type); 49 49 $this->kohana_filetype = current(Config::item('mimes.'.$type)); 50 51 // Clear output Events to be safe 52 Event::clear('system.output'); 50 53 } 51 54 else
