Index: trunk/extensions/MWReleases/ApiMWReleases.php |
— | — | @@ -5,6 +5,11 @@ |
6 | 6 | */ |
7 | 7 | |
8 | 8 | 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 | + |
9 | 14 | public function __construct($main, $action) { |
10 | 15 | parent :: __construct($main, $action); |
11 | 16 | } |
— | — | @@ -20,8 +25,8 @@ |
21 | 26 | if( strpos( $release, ':' ) !== false ) { |
22 | 27 | list( $status, $version ) = explode( ':', $release, 2 ); |
23 | 28 | $r = array( 'version' => $version ); |
24 | | - if( $status == 'current' ) |
25 | | - $r['current'] = ''; |
| 29 | + if( in_array( $status, $this->tags ) ) |
| 30 | + $r[$status] = ''; |
26 | 31 | $results[] = $r; |
27 | 32 | } |
28 | 33 | } |