Index: branches/robchurch/reports/maintenance/updateReports.php |
— | — | @@ -11,7 +11,7 @@ |
12 | 12 | |
13 | 13 | $limit = isset( $options['limit'] ) |
14 | 14 | ? $options['limit'] |
15 | | - : 1000; |
| 15 | + : $GLOBALS['wgReportCacheLimit']; |
16 | 16 | |
17 | 17 | $reports = isset( $options['reports'] ) |
18 | 18 | ? explode( ',', $options['reports'] ) |
Index: branches/robchurch/reports/includes/reports/Report.php |
— | — | @@ -13,7 +13,7 @@ |
14 | 14 | * Constructor |
15 | 15 | */ |
16 | 16 | public function __construct() { |
17 | | - parent::__construct( $this->getName() ); |
| 17 | + parent::__construct( $this->getName(), $this->getPermission() ); |
18 | 18 | } |
19 | 19 | |
20 | 20 | /** |
— | — | @@ -24,6 +24,15 @@ |
25 | 25 | public function getName() {} |
26 | 26 | |
27 | 27 | /** |
| 28 | + * Permission required to view the report |
| 29 | + * |
| 30 | + * @return string |
| 31 | + */ |
| 32 | + public function getPermission() { |
| 33 | + return ''; |
| 34 | + } |
| 35 | + |
| 36 | + /** |
28 | 37 | * Should this report be cached? |
29 | 38 | * |
30 | 39 | * @return bool |
— | — | @@ -338,7 +347,7 @@ |
339 | 348 | 'RedirectReport', |
340 | 349 | 'ShortPagesReport', |
341 | 350 | 'UncategorisedPagesReport', |
342 | | - ); |
| 351 | + ) + GLOBALS['wgCustomReports']; |
343 | 352 | } |
344 | 353 | |
345 | 354 | } |
Index: branches/robchurch/reports/includes/DefaultSettings.php |
— | — | @@ -1350,16 +1350,29 @@ |
1351 | 1351 | |
1352 | 1352 | /** Disable database-intensive features */ |
1353 | 1353 | $wgMiserMode = false; |
1354 | | -/** Disable all query pages if miser mode is on, not just some */ |
1355 | | -$wgDisableQueryPages = false; |
1356 | | -/** Number of rows to cache in 'querycache' table when miser mode is on */ |
1357 | | -$wgQueryCacheLimit = 1000; |
1358 | 1354 | /** Number of links to a page required before it is deemed "wanted" */ |
1359 | 1355 | $wgWantedPagesThreshold = 1; |
1360 | 1356 | /** Enable slow parser functions */ |
1361 | 1357 | $wgAllowSlowParserFunctions = false; |
1362 | 1358 | |
1363 | 1359 | /** |
| 1360 | + * Default cache set size for report cache |
| 1361 | + */ |
| 1362 | +$wgReportCacheLimit = 1000; |
| 1363 | + |
| 1364 | +/** |
| 1365 | + * Set this to an array of report names to disable |
| 1366 | + * cache updates for those pages |
| 1367 | + */ |
| 1368 | +$wgDisabledReports = array(); |
| 1369 | + |
| 1370 | +/** |
| 1371 | + * Extensions can add to this to register custom |
| 1372 | + * Report classes |
| 1373 | + */ |
| 1374 | +$wgCustomReports = array(); |
| 1375 | + |
| 1376 | +/** |
1364 | 1377 | * Maps jobs to their handling classes; extensions |
1365 | 1378 | * can add to this to provide custom jobs |
1366 | 1379 | */ |
— | — | @@ -2646,12 +2659,6 @@ |
2647 | 2660 | $wgBreakFrames = false; |
2648 | 2661 | |
2649 | 2662 | /** |
2650 | | - * Set this to an array of report names to disable |
2651 | | - * cache updates for those pages |
2652 | | - */ |
2653 | | -$wgDisabledReports = array(); |
2654 | | - |
2655 | | -/** |
2656 | 2663 | * Set this to false to disable cascading protection |
2657 | 2664 | */ |
2658 | 2665 | $wgEnableCascadingProtection = true; |