Development

Changeset 7826

You must first sign up to be able to contribute.

Changeset 7826

Show
Ignore:
Timestamp:
03/12/08 16:02:22 (1 year ago)
Author:
fabien
Message:

fixed sfConfigHandler::replacePath() to work with array of paths (like ::replaceConstants())

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/lib/config/sfConfigHandler.class.php

    r7811 r7826  
    9595  public static function replacePath($path) 
    9696  { 
    97     if (!sfToolkit::isPathAbsolute($path)) 
     97    if (is_array($path)) 
    9898    { 
    99       // not an absolute path so we'll prepend to it 
    100       $path = sfConfig::get('sf_app_dir').'/'.$path; 
     99      array_walk_recursive($path, create_function('&$path', '$path = sfConfigHandler::replacePath($path);')); 
     100    } 
     101    else 
     102    { 
     103      if (!sfToolkit::isPathAbsolute($path)) 
     104      { 
     105        // not an absolute path so we'll prepend to it 
     106        $path = sfConfig::get('sf_app_dir').'/'.$path; 
     107      } 
    101108    } 
    102109 

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting, and supporting several large Open-Source projects.