Changeset 466 for trunk/system/libraries/View.php
- Timestamp:
- 09/01/2007 05:04:16 PM (15 months ago)
- Files:
-
- 1 modified
-
trunk/system/libraries/View.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/libraries/View.php
r462 r466 1 <?php if (!defined('SYSPATH')) exit('No direct script access allowed');1 <?php defined('SYSPATH') or die('No direct access allowed.'); 2 2 /** 3 3 * Kohana … … 33 33 class View_Core { 34 34 35 // The view file name and type 35 36 private $kohana_filename = FALSE; 36 private $kohana_renderer = FALSE;37 37 private $kohana_filetype = FALSE; 38 private $kohana_protected = FALSE; 38 39 // Set variables 39 40 private $data = array(); 40 41 … … 44 45 { 45 46 $type = $type[1]; 47 46 48 $this->kohana_filename = Kohana::find_file('views', $name, TRUE, $type); 47 48 if (function_exists('exif_imagetype')) 49 { 50 $this->kohana_filetype = image_type_to_mime_type(exif_imagetype($this->kohana_filename)); 51 } 52 else 53 { 54 $this->kohana_filetype = 'image/'.$type; 55 } 49 $this->kohana_filetype = current(Config::item('mimes.'.$type)); 56 50 } 57 51 else 58 52 { 59 53 $this->kohana_filename = Kohana::find_file('views', $name, TRUE); 54 $this->kohana_filetype = EXT; 60 55 } 61 56 … … 105 100 public function render($print = FALSE, $callback = FALSE) 106 101 { 107 if ($this->kohana_filetype == FALSE)102 if ($this->kohana_filetype == EXT) 108 103 { 109 104 $output = Kohana::instance()->kohana_include_view($this->kohana_filename, $this->data);
