return;
}
- if ( !Hooks::run( 'CategoryPageView', [ &$this ] ) ) {
+ // Avoid PHP 7.1 warning of passing $this by reference
+ $categoryPage = $this;
+
+ if ( !Hooks::run( 'CategoryPageView', [ &$categoryPage ] ) ) {
return;
}
if ( $title->inNamespace( NS_CATEGORY ) ) {
$this->closeShowCategory();
}
+
+ # Use adaptive TTLs for CDN so delayed/failed purges are noticed less often
+ $outputPage = $this->getContext()->getOutput();
+ $outputPage->adaptCdnTTL( $this->mPage->getTouched(), IExpiringStore::TTL_MINUTE );
}
function openShowCategory() {
$out->addHTML( $viewer->getHTML() );
$this->addHelpLink( 'Help:Categories' );
}
+
+ function getCategoryViewerClass() {
+ return $this->mCategoryViewerClass;
+ }
+
+ function setCategoryViewerClass( $class ) {
+ $this->mCategoryViewerClass = $class;
+ }
}