function execute($par) { global $wgOut, $wgMemc; $wgOut->setRobotPolicy("index,follow"); list($limit, $offset) = wfCheckLimits(); $llr = new NewHowtoArticlesPage(); $result = $llr->doQuery($offset, $limit); return $result; }
function execute($par) { global $wgOut, $wgMemc, $wgRequest, $wgUser; $wgOut->setRobotPolicy("index,follow"); if ($wgRequest->wasPosted()) { $dbw =& wfGetDB(DB_MASTER); $pageId = $dbw->addQuotes($wgRequest->getVal('pageId')); $sql = "UPDATE newarticles SET na_timestamp = " . wfTimestampNow() . ", na_valid = 0, na_user_text = '" . $wgUser->getName() . "' WHERE na_page = " . $pageId; $dbw->query($sql); $key = wfMemcKey("newarticleslist"); $wgMemc->delete($key); } $llr = new NewHowtoArticlesPage(); $llr->getList(); return; }