Index: trunk/extensions/CentralNotice/CentralNotice.php |
— | — | @@ -19,6 +19,11 @@ |
20 | 20 | /// All remaining options apply only to the infrastructure wiki. |
21 | 21 | $wgNoticeInfrastructure = false; |
22 | 22 | |
| 23 | +/// Enable the loader itself |
| 24 | +/// Allows to control the loader visibility, without destroying infrastructure |
| 25 | +/// for cached content |
| 26 | +$wgCentralNoticeLoader = true; |
| 27 | + |
23 | 28 | /// URL prefix to the raw-text loader special. |
24 | 29 | /// Project/language and timestamp epoch keys get appended to this |
25 | 30 | /// via the loader stub. |
— | — | @@ -55,7 +60,12 @@ |
56 | 61 | function efCentralNoticeSetup() { |
57 | 62 | global $wgHooks, $wgNoticeInfrastructure; |
58 | 63 | global $wgAutoloadClasses, $wgSpecialPages; |
59 | | - $wgHooks['SiteNoticeAfter'][] = 'efCentralNoticeLoader'; |
| 64 | + |
| 65 | + global $wgCentralNoticeLoader; |
| 66 | + |
| 67 | + if ($wgCentralNoticeLoader) { |
| 68 | + $wgHooks['SiteNoticeAfter'][] = 'efCentralNoticeLoader'; |
| 69 | + } |
60 | 70 | |
61 | 71 | $wgHooks['ArticleSaveComplete'][] = 'efCentralNoticeLocalSaveHook'; |
62 | 72 | $wgHooks['ArticleSaveComplete'][] = 'efCentralNoticeLocalDeleteHook'; |