Changeset 1517

Show
Ignore:
Timestamp:
12/13/2007 11:13:18 AM (10 months ago)
Author:
Shadowhand
Message:

Fixing the media controller to handle new View syntax for files.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/controllers/media.php

    r1297 r1517  
    2323                try 
    2424                { 
     25                        // Find the full filename 
     26                        $filename = $this->uri->string(); 
     27 
     28                        // Find the offset of the extension 
     29                        $offset = strrpos($filename, '.'); 
     30 
    2531                        // Attempt to load the resource using a view 
    26                         echo new View($this->uri->string()); 
     32                        echo new View(substr($filename, 0, $offset), NULL, substr($filename, $offset + 1)); 
    2733                } 
    2834                catch (Kohana_Exception $e)