* redirects go to, etc. $this->mTitle (as well as $mArticle) is the
* page in the database that is actually being edited. These are
* usually the same, but they are now allowed to be different.
* redirects go to, etc. $this->mTitle (as well as $mArticle) is the
* page in the database that is actually being edited. These are
* usually the same, but they are now allowed to be different.
$undotext = $this->mArticle->getUndoText( $undorev, $oldrev );
if ( $undotext === false ) {
# Warn the user that something went wrong
$undotext = $this->mArticle->getUndoText( $undorev, $oldrev );
if ( $undotext === false ) {
# Warn the user that something went wrong
- $this->editFormPageTop .= $wgOut->parse( '<div class="error mw-undo-failure">' . wfMsgNoTrans( 'undo-failure' ) . '</div>' );
+ $this->editFormPageTop .= $wgOut->parse( '<div class="error mw-undo-failure">' .
+ wfMsgNoTrans( 'undo-failure' ) . '</div>', true, /* interface */true );
- $this->editFormPageTop .= $wgOut->parse( '<div class="mw-undo-success">' . wfMsgNoTrans( 'undo-success' ) . '</div>' );
+ $this->editFormPageTop .= $wgOut->parse( '<div class="mw-undo-success">' .
+ wfMsgNoTrans( 'undo-success' ) . '</div>', true, /* interface */true );
$firstrev = $oldrev->getNext();
# If we just undid one rev, use an autosummary
if ( $firstrev->mId == $undo ) {
$firstrev = $oldrev->getNext();
# If we just undid one rev, use an autosummary
if ( $firstrev->mId == $undo ) {
// Failed basic sanity checks.
// Older revisions may have been removed since the link
// was created, or we may simply have got bogus input.
// Failed basic sanity checks.
// Older revisions may have been removed since the link
// was created, or we may simply have got bogus input.
- $this->editFormPageTop .= $wgOut->parse( '<div class="error mw-undo-norev">' . wfMsgNoTrans( 'undo-norev' ) . '</div>' );
+ $this->editFormPageTop .= $wgOut->parse( '<div class="error mw-undo-norev">' .
+ wfMsgNoTrans( 'undo-norev' ) . '</div>', true, /* interface */true );
+ } else {
+ # Even if there are no subpages in namespace, we still don't want / in MW ns.
+ $editnoticeText = $editnotice_ns . '-' . str_replace( '/', '-', $this->mTitle->getDBkey() );
+ $editnoticeMsg = wfMessage( $editnoticeText )->inContentLanguage();
+ if ( $editnoticeMsg->exists() ) {
+ $wgOut->addWikiText( $editnoticeMsg->plain() );
+ }
- LogEventsList::showLogExtract( $wgOut, array( 'delete', 'move' ), $this->mTitle->getPrefixedText(),
+ LogEventsList::showLogExtract( $wgOut, array( 'delete', 'move' ), $this->mTitle,
- * @return int one of the constants describing the result
+ * @return Status object, possibly with a message, but always with one of the AS_* constants in $status->value,
+ *
+ * FIXME: This interface is TERRIBLE, but hard to get rid of due to various error display idiosyncrasies. There are
+ * also lots of cases where error metadata is set in the object and retrieved later instead of being returned, e.g.
+ * AS_CONTENT_TOO_BIG and AS_BLOCKED_PAGE_FOR_USER. All that stuff needs to be cleaned up some time.
- global $wgFilterCallback, $wgUser, $wgParser;
+ global $wgFilterCallback, $wgUser, $wgRequest, $wgParser;
wfProfileIn( __METHOD__ );
wfProfileIn( __METHOD__ . '-checks' );
if ( !wfRunHooks( 'EditPage::attemptSave', array( $this ) ) ) {
wfDebug( "Hook 'EditPage::attemptSave' aborted article saving\n" );
wfProfileIn( __METHOD__ );
wfProfileIn( __METHOD__ . '-checks' );
if ( !wfRunHooks( 'EditPage::attemptSave', array( $this ) ) ) {
wfDebug( "Hook 'EditPage::attemptSave' aborted article saving\n" );
}
# Check image redirect
if ( $this->mTitle->getNamespace() == NS_FILE &&
Title::newFromRedirect( $this->textbox1 ) instanceof Title &&
!$wgUser->isAllowed( 'upload' ) ) {
}
# Check image redirect
if ( $this->mTitle->getNamespace() == NS_FILE &&
Title::newFromRedirect( $this->textbox1 ) instanceof Title &&
!$wgUser->isAllowed( 'upload' ) ) {
$pdbk = $this->mTitle->getPrefixedDBkey();
$match = str_replace( "\n", '', $match );
wfDebugLog( 'SpamRegex', "$ip spam regex hit [[$pdbk]]: \"$match\"" );
$pdbk = $this->mTitle->getPrefixedDBkey();
$match = str_replace( "\n", '', $match );
wfDebugLog( 'SpamRegex', "$ip spam regex hit [[$pdbk]]: \"$match\"" );
}
if ( $wgFilterCallback && $wgFilterCallback( $this->mTitle, $this->textbox1, $this->section, $this->hookError, $this->summary ) ) {
# Error messages or other handling should be performed by the filter function
}
if ( $wgFilterCallback && $wgFilterCallback( $this->mTitle, $this->textbox1, $this->section, $this->hookError, $this->summary ) ) {
# Error messages or other handling should be performed by the filter function
}
if ( !wfRunHooks( 'EditFilter', array( $this, $this->textbox1, $this->section, &$this->hookError, $this->summary ) ) ) {
# Error messages etc. could be handled within the hook...
}
if ( !wfRunHooks( 'EditFilter', array( $this, $this->textbox1, $this->section, &$this->hookError, $this->summary ) ) ) {
# Error messages etc. could be handled within the hook...
if ( $wgUser->isBlockedFrom( $this->mTitle, false ) ) {
# Check block state against master, thus 'false'.
if ( $wgUser->isBlockedFrom( $this->mTitle, false ) ) {
# Check block state against master, thus 'false'.
$this->kblength = (int)( strlen( $this->textbox1 ) / 1024 );
if ( $this->kblength > $wgMaxArticleSize ) {
// Error will be displayed by showEditForm()
$this->tooBig = true;
$this->kblength = (int)( strlen( $this->textbox1 ) / 1024 );
if ( $this->kblength > $wgMaxArticleSize ) {
// Error will be displayed by showEditForm()
$this->tooBig = true;
}
# If the article has been deleted while editing, don't save it without
# confirmation
if ( $this->wasDeletedSinceLastEdit() && !$this->recreate ) {
}
# If the article has been deleted while editing, don't save it without
# confirmation
if ( $this->wasDeletedSinceLastEdit() && !$this->recreate ) {
if ( $new ) {
// Late check for create permission, just in case *PARANOIA*
if ( !$this->mTitle->userCan( 'create' ) ) {
if ( $new ) {
// Late check for create permission, just in case *PARANOIA*
if ( !$this->mTitle->userCan( 'create' ) ) {
}
// Run post-section-merge edit filter
if ( !wfRunHooks( 'EditFilterMerged', array( $this, $this->textbox1, &$this->hookError, $this->summary ) ) ) {
# Error messages etc. could be handled within the hook...
}
// Run post-section-merge edit filter
if ( !wfRunHooks( 'EditFilterMerged', array( $this, $this->textbox1, &$this->hookError, $this->summary ) ) ) {
# Error messages etc. could be handled within the hook...
}
# Handle the user preference to force summaries here. Check if it's not a redirect.
if ( !$this->allowBlankSummary && !Title::newFromRedirect( $this->textbox1 ) ) {
if ( md5( $this->summary ) == $this->autoSumm ) {
$this->missingSummary = true;
}
# Handle the user preference to force summaries here. Check if it's not a redirect.
if ( !$this->allowBlankSummary && !Title::newFromRedirect( $this->textbox1 ) ) {
if ( md5( $this->summary ) == $this->autoSumm ) {
$this->missingSummary = true;
+ } elseif ( $this->section == '' && $this->userWasLastToEdit( $wgUser->getId(), $this->edittime ) ) {
+ # Suppress edit conflict with self, except for section edits where merging is required.
+ wfDebug( __METHOD__ . ": Suppressing edit conflict, same user.\n" );
+ $this->isConflict = false;
- $userid = $wgUser->getId();
-
- # Suppress edit conflict with self, except for section edits where merging is required.
- if ( $this->isConflict && $this->section == '' && $this->userWasLastToEdit( $userid, $this->edittime ) ) {
- wfDebug( __METHOD__ . ": Suppressing edit conflict, same user.\n" );
- $this->isConflict = false;
- }
if ( $this->isConflict ) {
wfDebug( __METHOD__ . ": conflict! getting section '$this->section' for time '$this->edittime' (article time '" .
if ( $this->isConflict ) {
wfDebug( __METHOD__ . ": conflict! getting section '$this->section' for time '$this->edittime' (article time '" .
// Run post-section-merge edit filter
if ( !wfRunHooks( 'EditFilterMerged', array( $this, $text, &$this->hookError, $this->summary ) ) ) {
# Error messages etc. could be handled within the hook...
// Run post-section-merge edit filter
if ( !wfRunHooks( 'EditFilterMerged', array( $this, $text, &$this->hookError, $this->summary ) ) ) {
# Error messages etc. could be handled within the hook...
- if ( $this->section != 'new' && !$this->allowBlankSummary && 0 != strcmp( $oldtext, $text )
+ if ( $this->section != 'new' && !$this->allowBlankSummary
+ && 0 != strcmp( $this->mArticle->getContent(), $text )
&& !Title::newFromRedirect( $text ) ) # check if it's not a redirect
{
if ( md5( $this->summary ) == $this->autoSumm ) {
$this->missingSummary = true;
&& !Title::newFromRedirect( $text ) ) # check if it's not a redirect
{
if ( md5( $this->summary ) == $this->autoSumm ) {
$this->missingSummary = true;
if ( $this->section == 'new' && !$this->allowBlankSummary ) {
if ( trim( $this->summary ) == '' ) {
$this->missingSummary = true;
if ( $this->section == 'new' && !$this->allowBlankSummary ) {
if ( trim( $this->summary ) == '' ) {
$this->missingSummary = true;
if ( $this->section == 'new' ) {
if ( $this->textbox1 == '' ) {
$this->missingComment = true;
if ( $this->section == 'new' ) {
if ( $this->textbox1 == '' ) {
$this->missingComment = true;
}
if ( $this->summary != '' ) {
$sectionanchor = $wgParser->guessLegacySectionNameFromWikiText( $this->summary );
}
if ( $this->summary != '' ) {
$sectionanchor = $wgParser->guessLegacySectionNameFromWikiText( $this->summary );
}
// Check for length errors again now that the section is merged in
$this->kblength = (int)( strlen( $text ) / 1024 );
if ( $this->kblength > $wgMaxArticleSize ) {
$this->tooBig = true;
}
// Check for length errors again now that the section is merged in
$this->kblength = (int)( strlen( $text ) / 1024 );
if ( $this->kblength > $wgMaxArticleSize ) {
$this->tooBig = true;
#need to parse the preview early so that we know which templates are used,
#otherwise users with "show preview after edit box" will get a blank list
#we parse this near the beginning so that setHeaders can do the title
#need to parse the preview early so that we know which templates are used,
#otherwise users with "show preview after edit box" will get a blank list
#we parse this near the beginning so that setHeaders can do the title
'<div class="mw-confirm-recreate">' .
wfMsgExt( $key, 'parseinline', $username, "<nowiki>$comment</nowiki>" ) .
Xml::checkLabel( wfMsg( 'recreate' ), 'wpRecreate', 'wpRecreate', false,
'<div class="mw-confirm-recreate">' .
wfMsgExt( $key, 'parseinline', $username, "<nowiki>$comment</nowiki>" ) .
Xml::checkLabel( wfMsg( 'recreate' ), 'wpRecreate', 'wpRecreate', false,
- LogEventsList::showLogExtract( $wgOut, 'protect', $this->mTitle->getPrefixedText(), '',
+ LogEventsList::showLogExtract( $wgOut, 'protect', $this->mTitle, '',
array( 'lim' => 1, 'msgKey' => array( $noticeMsg ) ) );
}
if ( $this->mTitle->isCascadeProtected() ) {
array( 'lim' => 1, 'msgKey' => array( $noticeMsg ) ) );
}
if ( $this->mTitle->isCascadeProtected() ) {
$wgOut->wrapWikiMsg( $notice, array( 'cascadeprotectedwarning', $cascadeSourcesCount ) );
}
if ( !$this->mTitle->exists() && $this->mTitle->getRestrictions( 'create' ) ) {
$wgOut->wrapWikiMsg( $notice, array( 'cascadeprotectedwarning', $cascadeSourcesCount ) );
}
if ( !$this->mTitle->exists() && $this->mTitle->getRestrictions( 'create' ) ) {
- LogEventsList::showLogExtract( $wgOut, 'protect', $this->mTitle->getPrefixedText(), '',
+ LogEventsList::showLogExtract( $wgOut, 'protect', $this->mTitle, '',
* @return array An array in the format array( $label, $input )
*/
function getSummaryInput($summary = "", $labelText = null, $inputAttrs = null, $spanLabelAttrs = null) {
* @return array An array in the format array( $label, $input )
*/
function getSummaryInput($summary = "", $labelText = null, $inputAttrs = null, $spanLabelAttrs = null) {
//Note: the maxlength is overriden in JS to 250 and to make it use UTF-8 bytes, not characters.
$inputAttrs = ( is_array($inputAttrs) ? $inputAttrs : array() ) + array(
'id' => 'wpSummary',
//Note: the maxlength is overriden in JS to 250 and to make it use UTF-8 bytes, not characters.
$inputAttrs = ( is_array($inputAttrs) ? $inputAttrs : array() ) + array(
'id' => 'wpSummary',
$spanLabelAttrs = ( is_array($spanLabelAttrs) ? $spanLabelAttrs : array() ) + array(
'class' => $this->missingSummary ? 'mw-summarymissed' : 'mw-summary',
$spanLabelAttrs = ( is_array($spanLabelAttrs) ? $spanLabelAttrs : array() ) + array(
'class' => $this->missingSummary ? 'mw-summarymissed' : 'mw-summary',
if ( $isSubjectPreview )
$summary = wfMsgForContent( 'newsectionsummary', $wgParser->stripSectionName( $summary ) );
$message = $isSubjectPreview ? 'subject-preview' : 'summary-preview';
if ( $isSubjectPreview )
$summary = wfMsgForContent( 'newsectionsummary', $wgParser->stripSectionName( $summary ) );
$message = $isSubjectPreview ? 'subject-preview' : 'summary-preview';
- $summary = wfMsgExt( $message, 'parseinline' ) . $sk->commentBlock( $summary, $this->mTitle, $isSubjectPreview );
+ $summary = wfMsgExt( $message, 'parseinline' ) . Linker::commentBlock( $summary, $this->mTitle, $isSubjectPreview );
- global $wgBetterDirectionality;
- if( $wgBetterDirectionality ) {
- $pageLang = $this->mTitle->getPageLanguage();
- $attribs['lang'] = $pageLang->getCode();
- $attribs['dir'] = $pageLang->getDir();
- }
+ $pageLang = $this->mTitle->getPageLanguage();
+ $attribs['lang'] = $pageLang->getCode();
+ $attribs['dir'] = $pageLang->getDir();
- $wgOut->addHTML( '<div class="mw-editTools">' );
- $wgOut->addWikiMsgArray( 'edittools', array(), array( 'content' ) );
- $wgOut->addHTML( '</div>' );
+ $wgOut->addHTML( '<div class="mw-editTools">' .
+ wfMessage( 'edittools' )->inContentLanguage()->parse() .
+ '</div>' );
array( 'minor' => $this->minoredit, 'watch' => $this->watchthis ) );
$wgOut->addHTML( "<div class='editCheckboxes'>" . implode( $checkboxes, "\n" ) . "</div>\n" );
$wgOut->addHTML( "<div class='editButtons'>\n" );
$wgOut->addHTML( implode( $this->getEditButtons( $tabindex ), "\n" ) . "\n" );
$cancel = $this->getCancelLink();
array( 'minor' => $this->minoredit, 'watch' => $this->watchthis ) );
$wgOut->addHTML( "<div class='editCheckboxes'>" . implode( $checkboxes, "\n" ) . "</div>\n" );
$wgOut->addHTML( "<div class='editButtons'>\n" );
$wgOut->addHTML( implode( $this->getEditButtons( $tabindex ), "\n" ) . "\n" );
$cancel = $this->getCancelLink();
$edithelpurl = Skin::makeInternalOrExternalUrl( wfMsgForContent( 'edithelppage' ) );
$edithelp = '<a target="helpwindow" href="'.$edithelpurl.'">'.
htmlspecialchars( wfMsg( 'edithelp' ) ).'</a> '.
htmlspecialchars( wfMsg( 'newwindow' ) );
$edithelpurl = Skin::makeInternalOrExternalUrl( wfMsgForContent( 'edithelppage' ) );
$edithelp = '<a target="helpwindow" href="'.$edithelpurl.'">'.
htmlspecialchars( wfMsg( 'edithelp' ) ).'</a> '.
htmlspecialchars( wfMsg( 'newwindow' ) );
// string, which happens when you initially edit
// a category page, due to automatic preview-on-open.
$parsedNote = $wgOut->parse( "<div class='previewnote'>" .
// string, which happens when you initially edit
// a category page, due to automatic preview-on-open.
$parsedNote = $wgOut->parse( "<div class='previewnote'>" .
- if ( $this->isCssJsSubpage || $this->mTitle->isCssOrJsPage() ) {
- $level = 'user';
- if ( $this->mTitle->getNamespace() == NS_MEDIAWIKI ) {
+ if ( $this->isCssJsSubpage || !$this->mTitle->isWikitextPage() ) {
+ if( $this->mTitle->isCssJsSubpage() ) {
+ $level = 'user';
+ } elseif( $this->mTitle->isCssOrJsPage() ) {
}
# Used messages to make sure grep find them:
# Messages: usercsspreview, userjspreview, sitecsspreview, sitejspreview
}
# Used messages to make sure grep find them:
# Messages: usercsspreview, userjspreview, sitecsspreview, sitejspreview
- if (preg_match( "/\\.css$/", $this->mTitle->getText() ) ) {
- $previewtext = "<div id='mw-{$level}csspreview'>\n" . wfMsg( "{$level}csspreview" ) . "\n</div>";
- $class = "mw-code mw-css";
- } elseif (preg_match( "/\\.js$/", $this->mTitle->getText() ) ) {
- $previewtext = "<div id='mw-{$level}jspreview'>\n" . wfMsg( "{$level}jspreview" ) . "\n</div>";
- $class = "mw-code mw-js";
- } else {
- throw new MWException( 'A CSS/JS (sub)page but which is not css nor js!' );
+ if( $level ) {
+ if (preg_match( "/\\.css$/", $this->mTitle->getText() ) ) {
+ $previewtext = "<div id='mw-{$level}csspreview'>\n" . wfMsg( "{$level}csspreview" ) . "\n</div>";
+ $class = "mw-code mw-css";
+ } elseif (preg_match( "/\\.js$/", $this->mTitle->getText() ) ) {
+ $previewtext = "<div id='mw-{$level}jspreview'>\n" . wfMsg( "{$level}jspreview" ) . "\n</div>";
+ $class = "mw-code mw-js";
+ } else {
+ throw new MWException( 'A CSS/JS (sub)page but which is not css nor js!' );
+ }
$previewhead = "<div class='previewnote'>\n" .
'<h2 id="mw-previewheader">' . htmlspecialchars( wfMsg( 'preview' ) ) . "</h2>" .
$previewhead = "<div class='previewnote'>\n" .
'<h2 id="mw-previewheader">' . htmlspecialchars( wfMsg( 'preview' ) ) . "</h2>" .
- $wgOut->parse( $note ) . $conflict . "</div>\n";
+ $wgOut->parse( $note, true, /* interface */true ) . $conflict . "</div>\n";
+
+ $pageLang = $this->mTitle->getPageLanguage();
+ $attribs = array( 'lang' => $pageLang->getCode(), 'dir' => $pageLang->getDir(),
+ 'class' => 'mw-content-'.$pageLang->getDir() );
+ $previewHTML = Html::rawElement( 'div', $attribs, $previewHTML );
- global $wgBetterDirectionality;
- if( $wgBetterDirectionality ) {
- $pageLang = $this->mTitle->getPageLanguage();
- $attribs = array( 'lang' => $pageLang->getCode(), 'dir' => $pageLang->getDir(),
- 'class' => 'mw-content-'.$pageLang->getDir() );
- $previewHTML = Html::rawElement( 'div', $attribs, $previewHTML );
- }
);
$wgOut->setPageTitle( wfMsg( 'whitelistedittitle' ) );
$wgOut->setRobotPolicy( 'noindex,nofollow' );
$wgOut->setArticleRelated( false );
);
$wgOut->setPageTitle( wfMsg( 'whitelistedittitle' ) );
$wgOut->setRobotPolicy( 'noindex,nofollow' );
$wgOut->setArticleRelated( false );
* filename of the button image (without path), the opening
* tag, the closing tag, optionally a sample text that is
* inserted between the two when no selection is highlighted
* filename of the button image (without path), the opening
* tag, the closing tag, optionally a sample text that is
* inserted between the two when no selection is highlighted
- * and an option to select which switches the automatic
- * selection of inserted text (default is true, see
- * mw-editbutton-image). The tip text is shown when the user
- * moves the mouse over the button.
+ * and. The tip text is shown when the user moves the mouse
+ * over the button.
*
* Also here: accesskeys (key), which are not used yet until
* someone can figure out a way to make them work in
*
* Also here: accesskeys (key), which are not used yet until
* someone can figure out a way to make them work in
'sample' => wfMsg( 'image_sample' ),
'tip' => wfMsg( 'image_tip' ),
'key' => 'D',
'sample' => wfMsg( 'image_sample' ),
'tip' => wfMsg( 'image_tip' ),
'key' => 'D',
) : false,
$imagesAvailable ? array(
'image' => $wgLang->getImageFile( 'button-media' ),
) : false,
$imagesAvailable ? array(
'image' => $wgLang->getImageFile( 'button-media' ),
$params = array(
$image = $wgStylePath . '/common/images/' . $tool['image'],
// Note that we use the tip both for the ALT tag and the TITLE tag of the image.
$params = array(
$image = $wgStylePath . '/common/images/' . $tool['image'],
// Note that we use the tip both for the ALT tag and the TITLE tag of the image.
- $paramList = implode( ',',
- array_map( array( 'Xml', 'encodeJsVar' ), $params ) );
- $script .= "mw.toolbar.addButton($paramList);\n";
+ $script .= Xml::encodeJsCall( 'mw.toolbar.addButton', $params );
$checkboxes['minor'] =
Xml::check( 'wpMinoredit', $checked['minor'], $attribs ) .
" <label for='wpMinoredit' id='mw-editpage-minoredit'" .
$checkboxes['minor'] =
Xml::check( 'wpMinoredit', $checked['minor'], $attribs ) .
" <label for='wpMinoredit' id='mw-editpage-minoredit'" .
$checkboxes['watch'] =
Xml::check( 'wpWatchthis', $checked['watch'], $attribs ) .
" <label for='wpWatchthis' id='mw-editpage-watch'" .
$checkboxes['watch'] =
Xml::check( 'wpWatchthis', $checked['watch'], $attribs ) .
" <label for='wpWatchthis' id='mw-editpage-watch'" .
">{$watchLabel}</label>";
}
wfRunHooks( 'EditPageBeforeEditChecks', array( &$this, &$checkboxes, &$tabindex ) );
">{$watchLabel}</label>";
}
wfRunHooks( 'EditPageBeforeEditChecks', array( &$this, &$checkboxes, &$tabindex ) );
$cancelParams = array();
if ( !$this->isConflict && $this->mArticle->getOldID() > 0 ) {
$cancelParams['oldid'] = $this->mArticle->getOldID();
}
$cancelParams = array();
if ( !$this->isConflict && $this->mArticle->getOldID() > 0 ) {
$cancelParams['oldid'] = $this->mArticle->getOldID();
}
$this->getContextTitle(),
wfMsgExt( 'cancel', array( 'parseinline' ) ),
array( 'id' => 'mw-editform-cancel' ),
$this->getContextTitle(),
wfMsgExt( 'cancel', array( 'parseinline' ) ),
array( 'id' => 'mw-editform-cancel' ),
$resultDetails = false;
# Allow bots to exempt some edits from bot flagging
$bot = $wgUser->isAllowed( 'bot' ) && $this->bot;
$resultDetails = false;
# Allow bots to exempt some edits from bot flagging
$bot = $wgUser->isAllowed( 'bot' ) && $this->bot;
- $value = $this->internalAttemptSave( $resultDetails, $bot );
+ $status = $this->internalAttemptSave( $resultDetails, $bot );
+ // FIXME: once the interface for internalAttemptSave() is made nicer, this should use the message in $status
case self::AS_HOOK_ERROR_EXPECTED:
case self::AS_CONTENT_TOO_BIG:
case self::AS_ARTICLE_WAS_DELETED:
case self::AS_HOOK_ERROR_EXPECTED:
case self::AS_CONTENT_TOO_BIG:
case self::AS_ARTICLE_WAS_DELETED: