r71564 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71563‎ | r71564 | r71565 >
Date:14:58, 24 August 2010
Author:jeroendedauw
Status:reverted
Tags:
Comment:
Follow up to r71110, use of static var instead of global var, as suggested by Platonides
Modified paths:
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/GlobalFunctions.php
@@ -3465,11 +3465,12 @@
34663466 * @return PackageRepository
34673467 */
34683468 function wfGetRepository() {
3469 - global $wgRepository, $wgRepositoryApiLocation;
 3469+ global $wgRepositoryApiLocation;
 3470+ static $repository = false;
34703471
3471 - if ( !isset( $wgRepository ) ) {
3472 - $wgRepository = new DistributionRepository( $wgRepositoryApiLocation );
 3472+ if ( $repository === false ) {
 3473+ $repository = new DistributionRepository( $wgRepositoryApiLocation );
34733474 }
34743475
3475 - return $wgRepository;
 3476+ return $repository;
34763477 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r77883Remove "checking for latest version" feature from the new installer. Original...demon15:32, 6 December 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r71110Follow up to r71107 - added forgotten global function and corrected @since an...jeroendedauw09:49, 15 August 2010

Status & tagging log