| 34 | | // Removes the period from the beginning of the type |
| 35 | | $type = substr($type[0], 1); |
| 36 | | |
| 37 | | $this->kohana_filename = Kohana::find_file('views', $name, TRUE, $type); |
| 38 | | $this->kohana_filetype = current(Config::item('mimes.'.$type)); |
| 39 | | |
| 40 | | // Clear output Events to be safe |
| 41 | | Event::clear('system.display'); |
| | 34 | // Load the filename and set the content type |
| | 35 | $this->kohana_filename = Kohana::find_file('views', $name, TRUE); |
| | 36 | $this->kohana_filetype = EXT; |
| 45 | | $this->kohana_filename = Kohana::find_file('views', $name, TRUE); |
| 46 | | $this->kohana_filetype = EXT; |
| | 40 | // Check if the filetype is allowed by the configuration |
| | 41 | if ( ! in_array($type, Config::item('view.allowed_filetypes'))) |
| | 42 | throw new Kohana_Exception('core.invalid_filetype', $type); |
| | 43 | |
| | 44 | // Load the filename and set the content type |
| | 45 | $this->kohana_filename = Kohana::find_file('views', $name.'.'.$type, TRUE, $type); |
| | 46 | $this->kohana_filetype = Config::item('mimes.'.$type); |