Extension:MakeArticle/Source

Extension
template.'"> '; return $html; }

static function errorHandler($name,$message) {   global $wgOut, $wTitle;

$wgTitle=Title::newFromText(wfMsgForContent($name)); $wgOut->errorPage($name,$message); }

}

function wfActionMakeArticle($action,$article) { global $wgRequest; if($action!='___makePage') return true; $title=trim($wgRequest->getVal('___title')); if($title=='') MakeArticle::errorHandler('Bad Page Title','Title is Null'); else {     $pageTitle=Title::newFromText($title); if(isset($pageTitle)&&$pageTitle->getArticleID==0) {

$values=$wgRequest->getValues; $html='';

//$preload=wfMakePageContents; $article=new Article($pageTitle); $status=$article->doEdit($html,"$title",EDIT_NEW); if($status->isOK) $article->doRedirect; else MakeArticle::errorHandler('Error Creating Page',$status->getWikiText); }     else MakeArticle::errorHandler('Bad Page Title',"Page $title already exists"); } return false; } ?>