Changeset 1621 for trunk/modules/kodoc/controllers/kodoc.php
- Timestamp:
- 12/27/2007 10:12:51 AM (13 months ago)
- Files:
-
- 1 modified
-
trunk/modules/kodoc/controllers/kodoc.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/kodoc/controllers/kodoc.php
r1330 r1621 25 25 public function media() 26 26 { 27 if (isset($this->profiler)) $this->profiler->disable(); 28 27 29 // Get the filename 28 30 $file = implode('/', $this->uri->segment_array(1)); 31 $ext = strrchr($file, '.'); 32 33 if ($ext !== FALSE) 34 { 35 $file = substr($file, 0, -strlen($ext)); 36 $ext = substr($ext, 1); 37 } 29 38 30 39 // Disable auto-rendering … … 34 43 { 35 44 // Attempt to display the output 36 echo new View('kodoc/'.$file );45 echo new View('kodoc/'.$file, NULL, $ext); 37 46 } 38 47 catch (Kohana_Exception $e)
