Development

Changeset 10703

You must first sign up to be able to contribute.

Changeset 10703

Show
Ignore:
Timestamp:
08/06/08 13:15:00 (5 months ago)
Author:
hartym
Message:

[1.2] ported r10702 to 1.2

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.2/lib/autoload/sfSimpleAutoload.class.php

    r10010 r10703  
    175175 
    176176  /** 
    177    * Adds a directory to the autoloading system
     177   * Adds a directory to the autoloading system if not yet present and give it the highest possible precedence
    178178   * 
    179179   * @param string The directory to look for classes 
     
    183183  { 
    184184    $finder = sfFinder::type('file')->follow_link()->name('*'.$ext); 
     185 
    185186    if($dirs = glob($dir)) 
    186187    { 
    187188      foreach ($dirs as $dir) 
    188189      { 
    189         if (in_array($dir, $this->dirs)) 
     190        if (false !== ($key = array_search($dir, $this->dirs))) 
    190191        { 
     192          unset($this->dirs[$key]); 
     193          $this->dirs[] = $dir; 
     194 
    191195          if ($this->cacheLoaded) 
    192196          {