Index: trunk/phase3/CREDITS |
— | — | @@ -58,6 +58,7 @@ |
59 | 59 | * Agbad |
60 | 60 | * Brad Jorsch |
61 | 61 | * Brent G |
| 62 | +* Brianna Laugher |
62 | 63 | * Daniel Arnold |
63 | 64 | * Danny B. |
64 | 65 | * FunPika |
Index: trunk/phase3/includes/api/ApiQuerySiteinfo.php |
— | — | @@ -79,6 +79,9 @@ |
80 | 80 | case 'fileextensions': |
81 | 81 | $this->appendFileExtensions( $p ); |
82 | 82 | break; |
| 83 | + case 'rightsinfo': |
| 84 | + $this->appendRightsInfo( $p ); |
| 85 | + break; |
83 | 86 | default : |
84 | 87 | ApiBase :: dieDebug( __METHOD__, "Unknown prop=$p" ); |
85 | 88 | } |
— | — | @@ -335,6 +338,24 @@ |
336 | 339 | } |
337 | 340 | |
338 | 341 | |
| 342 | + protected function appendRightsInfo( $property ) { |
| 343 | + global $wgRightsPage, $wgRightsUrl, $wgRightsText; |
| 344 | + $title = Title::newFromText( $wgRightsPage ); |
| 345 | + $url = $title ? $title->getFullURL() : $wgRightsUrl; |
| 346 | + $text = $wgRightsText; |
| 347 | + if( !$text && $title ) { |
| 348 | + $text = $title->getPrefixedText(); |
| 349 | + } |
| 350 | + |
| 351 | + $data = array( |
| 352 | + 'url' => $url ? $url : '', |
| 353 | + 'text' => $text ? $text : '' |
| 354 | + ); |
| 355 | + |
| 356 | + $this->getResult()->addValue( 'query', $property, $data ); |
| 357 | + } |
| 358 | + |
| 359 | + |
339 | 360 | public function getAllowedParams() { |
340 | 361 | return array( |
341 | 362 | 'prop' => array( |
— | — | @@ -352,6 +373,7 @@ |
353 | 374 | 'usergroups', |
354 | 375 | 'extensions', |
355 | 376 | 'fileextensions', |
| 377 | + 'rightsinfo', |
356 | 378 | ) |
357 | 379 | ), |
358 | 380 | 'filteriw' => array( |
— | — | @@ -379,6 +401,7 @@ |
380 | 402 | ' "usergroups" - Returns user groups and the associated permissions', |
381 | 403 | ' "extensions" - Returns extensions installed on the wiki', |
382 | 404 | ' "fileextensions" - Returns list of file extensions allowed to be uploaded', |
| 405 | + ' "rightsinfo" - Returns wiki rights (license) information if available', |
383 | 406 | ), |
384 | 407 | 'filteriw' => 'Return only local or only nonlocal entries of the interwiki map', |
385 | 408 | 'showalldb' => 'List all database servers, not just the one lagging the most', |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -138,6 +138,7 @@ |
139 | 139 | Building query properly now using makeList() |
140 | 140 | * (bug 17182) Fix pretty printer so URLs with parentheses in them are |
141 | 141 | autolinked correctly |
| 142 | +* (bug 17224) Added siprop=rightsinfo to meta=siteinfo |
142 | 143 | |
143 | 144 | === Languages updated in 1.15 === |
144 | 145 | |