/** * * Gets the html for editing an article * */ function getArticleEdit($articleId) { $title = Title::newFromID($articleId); if ($title) { $revision = Revision::newFromTitle($title); $article = new Article($title); if ($revision) { $text = $revision->getRawText(); $text = self::markBreaks($text); $text = self::replaceNewlines($text); $content['html'] = "<p>{$text}</p>"; $content['title'] = "<a href='{$title->getFullURL()}' target='new'>" . wfMsg('howto', $title->getText()) . "</a>"; //$content['title'] = $title->getText(); $ep = new EditPageWrapper($article); $content['summary'] = "<span id='wpSummaryLabel'><label for='wpSummary'>Summary:</label></span><br /><input tabindex='10' type='text' value='" . wfMsg('spch-summary') . "' name='wpSummary' id='wpSummary' maxlength='200' size='60' /><br />"; $content['buttons'] = $ep->getEditButtons(0); $content['buttons']['cancel'] = "<a href='#' id='spch-cancel' class='button secondary'>Done</a>"; $content['articleId'] = $title->getArticleID(); return $content; } } //return an error message }