Index: trunk/extensions/Validator/includes/Validator.php |
— | — | @@ -299,13 +299,23 @@ |
300 | 300 | } |
301 | 301 | } |
302 | 302 | |
303 | | - $dependencies = array(); |
| 303 | + $dependencyList = array(); |
304 | 304 | |
| 305 | + // Loop over the parameters to handle to create a dependency list. |
305 | 306 | foreach ( $this->paramsTohandle as $paramName ) { |
306 | | - $dependencies[$paramName] = array(); //$this->parameters[$paramName]->getDependencies(); |
| 307 | + $dependencies = array(); |
| 308 | + |
| 309 | + // Only include dependencies that are in the list of parameters to handle. |
| 310 | + foreach ( $this->parameters[$paramName]->getDependencies() as $dependency ) { |
| 311 | + if ( in_array( $dependency, $this->paramsTohandle ) ) { |
| 312 | + $dependencies[] = $dependency; |
| 313 | + } |
| 314 | + } |
| 315 | + |
| 316 | + $dependencyList[$paramName] = array(); |
307 | 317 | } |
308 | 318 | |
309 | | - $sorter = new TopologicalSort( $dependencies, true ); |
| 319 | + $sorter = new TopologicalSort( $dependencyList, true ); |
310 | 320 | |
311 | 321 | $this->paramsTohandle = $sorter->doSort(); |
312 | 322 | } |