Changeset 10703
- Timestamp:
- 08/06/08 13:15:00 (5 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.2/lib/autoload/sfSimpleAutoload.class.php
r10010 r10703 175 175 176 176 /** 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. 178 178 * 179 179 * @param string The directory to look for classes … … 183 183 { 184 184 $finder = sfFinder::type('file')->follow_link()->name('*'.$ext); 185 185 186 if($dirs = glob($dir)) 186 187 { 187 188 foreach ($dirs as $dir) 188 189 { 189 if ( in_array($dir, $this->dirs))190 if (false !== ($key = array_search($dir, $this->dirs))) 190 191 { 192 unset($this->dirs[$key]); 193 $this->dirs[] = $dir; 194 191 195 if ($this->cacheLoaded) 192 196 {