Index: trunk/phase3/includes/filerepo/RepoGroup.php |
— | — | @@ -176,6 +176,11 @@ |
177 | 177 | return $this->getRepo( 'local' ); |
178 | 178 | } |
179 | 179 | |
| 180 | + /** |
| 181 | + * Run a function across all foreign repos. |
| 182 | + * @param $callback string Name of method to call |
| 183 | + * @param $params array Optional params to pass to the function |
| 184 | + */ |
180 | 185 | function forEachForeignRepo( $callback, $params = array() ) { |
181 | 186 | foreach( $this->foreignRepos as $repo ) { |
182 | 187 | $args = array_merge( array( $repo ), $params ); |
— | — | @@ -186,6 +191,10 @@ |
187 | 192 | return false; |
188 | 193 | } |
189 | 194 | |
| 195 | + /** |
| 196 | + * Does the installation have foreign repos set up? |
| 197 | + * @return bool |
| 198 | + */ |
190 | 199 | function hasForeignRepos() { |
191 | 200 | return !empty( $this->foreignRepos ); |
192 | 201 | } |