function execute($par) { global $wgOut, $wgRequest, $wgUseTidy; wfLoadExtensionMessages('SpecialCite'); // Having tidy on causes whitespace and <pre> tags to // be generated around the output of the CiteOutput // class TODO FIXME. $wgUseTidy = false; $this->setHeaders(); $this->outputHeader(); $page = isset($par) ? $par : $wgRequest->getText('page'); $id = $wgRequest->getInt('id'); $title = Title::newFromText($page); if ($title) { $article = new Article($title); } $cform = new CiteForm($title); if (!$title || !$article->exists()) { $cform->execute(); } else { $cform->execute(); $cout = new CiteOutput($title, $article, $id); $cout->execute(); } }
function execute($par) { global $wgUseTidy; // Having tidy on causes whitespace and <pre> tags to // be generated around the output of the CiteOutput // class TODO FIXME. $wgUseTidy = false; $this->setHeaders(); $this->outputHeader(); $page = $par !== null ? $par : $this->getRequest()->getText('page'); $title = Title::newFromText($page); $cform = new CiteForm($title); $cform->execute(); if ($title && $title->exists()) { $id = $this->getRequest()->getInt('id'); $cout = new CiteOutput($title, $id); $cout->execute(); } }