Development

Changeset 7334

You must first sign up to be able to contribute.

Changeset 7334

Show
Ignore:
Timestamp:
02/04/08 15:51:20 (10 months ago)
Author:
KRavEN
Message:

Fixed a bug with the cache path in the serve method. Path relative to sf_web_dir is no good because sf_root_dir can be modified. Best to start with sf_root_dir.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfPropelFileStoragePlugin/modules/sfPropelFileStorage/lib/BasesfPropelFileStorageActions.class.php

    r4122 r7334  
    3636  protected function serve($file_info)  
    3737  { 
    38     //get an instance of the file cache object. We grab the web directory, jump back one (which 
    39     //puts us in the root of our project), then get the name of the cache folder 
     38    //get an instance of the file cache object. We grab the web root then get the name of the cache folder 
    4039     
    4140    //we don't want to use sf_cache_dir because that is application and environment specific 
     41    //we don't want to a path relative to sf_web_dir because the sf_root_dir can be changed, better to start from there     
    4242     
    43      
    44     $cache = new sfFileCache(sfConfig::get('sf_web_dir').DIRECTORY_SEPARATOR."..".DIRECTORY_SEPARATOR.sfConfig::get('sf_cache_dir_name')); 
     43    $cache = new sfFileCache(sfConfig::get('sf_root_dir').DIRECTORY_SEPARATOR.sfConfig::get('sf_cache_dir_name')); 
    4544     
    4645    //The last parameter for the cache methods is the name space. We're going to be putting our