Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -3465,11 +3465,12 @@ |
3466 | 3466 | * @return PackageRepository |
3467 | 3467 | */ |
3468 | 3468 | function wfGetRepository() { |
3469 | | - global $wgRepository, $wgRepositoryApiLocation; |
| 3469 | + global $wgRepositoryApiLocation; |
| 3470 | + static $repository = false; |
3470 | 3471 | |
3471 | | - if ( !isset( $wgRepository ) ) { |
3472 | | - $wgRepository = new DistributionRepository( $wgRepositoryApiLocation ); |
| 3472 | + if ( $repository === false ) { |
| 3473 | + $repository = new DistributionRepository( $wgRepositoryApiLocation ); |
3473 | 3474 | } |
3474 | 3475 | |
3475 | | - return $wgRepository; |
| 3476 | + return $repository; |
3476 | 3477 | } |