Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 7 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
HookHandler | |
0.00% |
0 / 7 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
onAPIQuerySiteInfoGeneralInfo | |
0.00% |
0 / 7 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace MediaWiki\Extension\ReadingLists; |
4 | |
5 | use ApiQuerySiteinfo; |
6 | use MediaWiki\Api\Hook\APIQuerySiteInfoGeneralInfoHook; |
7 | |
8 | /** |
9 | * Static entry points for hooks. |
10 | */ |
11 | class HookHandler implements APIQuerySiteInfoGeneralInfoHook { |
12 | /** |
13 | * Add configuration data to the siteinfo API output. |
14 | * Used by the RESTBase proxy for help messages in the Swagger doc. |
15 | * @param ApiQuerySiteinfo $module |
16 | * @param array &$result |
17 | */ |
18 | public function onAPIQuerySiteInfoGeneralInfo( $module, &$result ) { |
19 | global $wgReadingListsMaxListsPerUser, $wgReadingListsMaxEntriesPerList, |
20 | $wgReadingListsDeletedRetentionDays; |
21 | $result['readinglists-config'] = [ |
22 | 'maxListsPerUser' => $wgReadingListsMaxListsPerUser, |
23 | 'maxEntriesPerList' => $wgReadingListsMaxEntriesPerList, |
24 | 'deletedRetentionDays' => $wgReadingListsDeletedRetentionDays, |
25 | ]; |
26 | } |
27 | } |