Show
Ignore:
Timestamp:
01/28/2008 10:02:04 AM (12 months ago)
Author:
Shadowhand
Message:

Quick changes:

  • Updated Kohana::auto_load() to handle the new driver structure
  • Switched driver loading format to handle new driver structure
  • Fixed some formatting issues with Payment drivers (bad JB!)
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/libraries/Image.php

    r1827 r1842  
    9494                $this->config = (array) $config + Config::item('image'); 
    9595 
    96                 try 
    97                 { 
    98                         // Set driver name 
    99                         $driver = 'Image_'.ucfirst($this->config['driver']).'_Driver'; 
    100  
    101                         // Manually load so that exceptions can be caught 
    102                         require_once Kohana::find_file('libraries/drivers', substr($driver, 0, -7), TRUE); 
    103                 } 
    104                 catch (Kohana_Exception $e) 
    105                 { 
     96                // Set driver class name 
     97                $driver = 'Image_'.ucfirst($this->config['driver']).'_Driver'; 
     98 
     99                // Load the driver 
     100                if ( ! Kohana::auto_load($driver)) 
    106101                        throw new Kohana_Exception('image.driver_not_supported', $this->config['driver']); 
    107                 } 
    108102 
    109103                // Initialize the driver