r57290 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57289‎ | r57290 | r57291 >
Date:13:19, 2 October 2009
Author:demon
Status:ok
Tags:
Comment:
Support alpha and beta tags for releases as well
Modified paths:
  • /trunk/extensions/MWReleases/ApiMWReleases.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MWReleases/ApiMWReleases.php
@@ -5,6 +5,11 @@
66 */
77
88 class ApiMWReleases extends ApiBase {
 9+
 10+ // Possible releases. Current is the latest stable,
 11+ // Alpha is trunk, Beta is release candidates
 12+ private $tags = array( 'current', 'alpha', 'beta' );
 13+
914 public function __construct($main, $action) {
1015 parent :: __construct($main, $action);
1116 }
@@ -20,8 +25,8 @@
2126 if( strpos( $release, ':' ) !== false ) {
2227 list( $status, $version ) = explode( ':', $release, 2 );
2328 $r = array( 'version' => $version );
24 - if( $status == 'current' )
25 - $r['current'] = '';
 29+ if( in_array( $status, $this->tags ) )
 30+ $r[$status] = '';
2631 $results[] = $r;
2732 }
2833 }

Status & tagging log