Ejemplo n.º 1
0
 function view()
 {
     $request = $this->getContext()->getRequest();
     $diff = $request->getVal('diff');
     $diffOnly = $request->getBool('diffonly', $this->getContext()->getUser()->getOption('diffonly'));
     if ($diff !== null && $diffOnly) {
         parent::view();
         return;
     }
     if (!Hooks::run('CategoryPageView', [&$this])) {
         return;
     }
     $title = $this->getTitle();
     if ($title->inNamespace(NS_CATEGORY)) {
         $this->openShowCategory();
     }
     parent::view();
     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);
 }