From 4ac9fa081a7c045f6a9f1cfc529d82423f485b2e Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sun, 8 Dec 2013 09:55:49 +0100 Subject: Update to MediaWiki 1.22.0 --- includes/EditPage.php | 290 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 219 insertions(+), 71 deletions(-) (limited to 'includes/EditPage.php') diff --git a/includes/EditPage.php b/includes/EditPage.php index 8b2dbb5f..530e2674 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -100,7 +100,7 @@ class EditPage { /** * Status: user tried to create this page, but is not allowed to do that - * ( Title->usercan('create') == false ) + * ( Title->userCan('create') == false ) */ const AS_NO_CREATE_PERMISSION = 223; @@ -487,7 +487,7 @@ class EditPage { // The edit page was reached via a red link. // Redirect to the article page and let them click the edit tab if // they really want a permission error. - $wgOut->redirect( $this->mTitle->getFullUrl() ); + $wgOut->redirect( $this->mTitle->getFullURL() ); return; } @@ -521,6 +521,8 @@ class EditPage { $wgOut->addHTML( Html::rawElement( 'div', array( 'class' => 'templatesUsed' ), Linker::formatTemplates( $this->getTemplates() ) ) ); + $wgOut->addModules( 'mediawiki.action.edit.collapsibleFooter' ); + if ( $this->mTitle->exists() ) { $wgOut->returnToMain( null, $this->mTitle ); } @@ -540,7 +542,7 @@ class EditPage { // The edit page was reached via a red link. // Redirect to the article page and let them click the edit tab if // they really want a permission error. - $wgOut->redirect( $this->mTitle->getFullUrl() ); + $wgOut->redirect( $this->mTitle->getFullURL() ); } else { $wgOut->readOnlyPage( $source, $protected, $reasons, $action ); } @@ -621,6 +623,7 @@ class EditPage { $this->section = $request->getVal( 'wpSection', $request->getVal( 'section' ) ); if ( $this->section !== null && $this->section !== '' && !$this->isSectionEditSupported() ) { + wfProfileOut( __METHOD__ ); throw new ErrorPageError( 'sectioneditnotsupported-title', 'sectioneditnotsupported-text' ); } @@ -663,6 +666,11 @@ class EditPage { $this->edittime = $request->getVal( 'wpEdittime' ); $this->starttime = $request->getVal( 'wpStarttime' ); + $undidRev = $request->getInt( 'wpUndidRevision' ); + if ( $undidRev ) { + $this->undidRev = $undidRev; + } + $this->scrolltop = $request->getIntOrNull( 'wpScrolltop' ); if ( $this->textbox1 === '' && $request->getVal( 'wpTextbox1' ) === null ) { @@ -832,7 +840,6 @@ class EditPage { if ( $this->textbox1 === false ) { return false; } - wfProxyCheck(); return true; } @@ -897,7 +904,9 @@ class EditPage { $orig = $this->getOriginalContent(); $content = $orig ? $orig->getSection( $this->section ) : null; - if ( !$content ) $content = $def_content; + if ( !$content ) { + $content = $def_content; + } } else { $undoafter = $wgRequest->getInt( 'undoafter' ); $undo = $wgRequest->getInt( 'undo' ); @@ -932,7 +941,19 @@ class EditPage { # If we just undid one rev, use an autosummary $firstrev = $oldrev->getNext(); if ( $firstrev && $firstrev->getId() == $undo ) { - $undoSummary = wfMessage( 'undo-summary', $undo, $undorev->getUserText() )->inContentLanguage()->text(); + $userText = $undorev->getUserText(); + if ( $userText === '' ) { + $undoSummary = wfMessage( + 'undo-summary-username-hidden', + $undo + )->inContentLanguage()->text(); + } else { + $undoSummary = wfMessage( + 'undo-summary', + $undo, + $userText + )->inContentLanguage()->text(); + } if ( $this->summary === '' ) { $this->summary = $undoSummary; } else { @@ -950,6 +971,7 @@ class EditPage { $undoMsg = 'norev'; } + // Messages: undo-success, undo-failure, undo-norev $class = ( $undoMsg == 'success' ? '' : 'error ' ) . "mw-undo-{$undoMsg}"; $this->editFormPageTop .= $wgOut->parse( "
" . wfMessage( 'undo-' . $undoMsg )->plain() . '
', true, /* interface */true ); @@ -985,7 +1007,9 @@ class EditPage { } $revision = $this->mArticle->getRevisionFetched(); if ( $revision === null ) { - if ( !$this->contentModel ) $this->contentModel = $this->getTitle()->getContentModel(); + if ( !$this->contentModel ) { + $this->contentModel = $this->getTitle()->getContentModel(); + } $handler = ContentHandler::getForModelID( $this->contentModel ); return $handler->makeEmptyContent(); @@ -1007,7 +1031,9 @@ class EditPage { $content = $rev ? $rev->getContent( Revision::RAW ) : null; if ( $content === false || $content === null ) { - if ( !$this->contentModel ) $this->contentModel = $this->getTitle()->getContentModel(); + if ( !$this->contentModel ) { + $this->contentModel = $this->getTitle()->getContentModel(); + } $handler = ContentHandler::getForModelID( $this->contentModel ); return $handler->makeEmptyContent(); @@ -1157,20 +1183,20 @@ class EditPage { * marked HttpOnly. The JavaScript code converts the cookie to a wgPostEdit config * variable. * - * Since WebResponse::setcookie does not allow forcing HttpOnly for a single - * cookie, we have to use PHP's setcookie() directly. - * * We use a path of '/' since wgCookiePath is not exposed to JS * * If the variable were set on the server, it would be cached, which is unwanted * since the post-edit state should only apply to the load right after the save. */ protected function setPostEditCookie() { - global $wgCookiePrefix, $wgCookieDomain; $revisionId = $this->mArticle->getLatest(); $postEditKey = self::POST_EDIT_COOKIE_KEY_PREFIX . $revisionId; - setcookie( $wgCookiePrefix . $postEditKey, '1', time() + self::POST_EDIT_COOKIE_DURATION, '/', $wgCookieDomain ); + $response = RequestContext::getMain()->getRequest()->response(); + $response->setcookie( $postEditKey, '1', time() + self::POST_EDIT_COOKIE_DURATION, array( + 'path' => '/', + 'httpOnly' => false, + ) ); } /** @@ -1213,7 +1239,7 @@ class EditPage { case self::AS_SUCCESS_NEW_ARTICLE: $query = $resultDetails['redirect'] ? 'redirect=no' : ''; - $anchor = isset ( $resultDetails['sectionanchor'] ) ? $resultDetails['sectionanchor'] : ''; + $anchor = isset( $resultDetails['sectionanchor'] ) ? $resultDetails['sectionanchor'] : ''; $wgOut->redirect( $this->mTitle->getFullURL( $query ) . $anchor ); return false; @@ -1355,6 +1381,24 @@ class EditPage { return $status; } + $spam = $wgRequest->getText( 'wpAntispam' ); + if ( $spam !== '' ) { + wfDebugLog( + 'SimpleAntiSpam', + $wgUser->getName() . + ' editing "' . + $this->mTitle->getPrefixedText() . + '" submitted bogus field "' . + $spam . + '"' + ); + $status->fatal( 'spamprotectionmatch', false ); + $status->value = self::AS_SPAM_ERROR; + wfProfileOut( __METHOD__ . '-checks' ); + wfProfileOut( __METHOD__ ); + return $status; + } + try { # Construct Content object $textbox_content = $this->toEditContent( $this->textbox1 ); @@ -1381,6 +1425,18 @@ class EditPage { # Check for spam $match = self::matchSummarySpamRegex( $this->summary ); + if ( $match === false && $this->section == 'new' ) { + # $wgSpamRegex is enforced on this new heading/summary because, unlike + # regular summaries, it is added to the actual wikitext. + if ( $this->sectiontitle !== '' ) { + # This branch is taken when the API is used with the 'sectiontitle' parameter. + $match = self::matchSpamRegex( $this->sectiontitle ); + } else { + # This branch is taken when the "Add Topic" user interface is used, or the API + # is used with the 'summary' parameter. + $match = self::matchSpamRegex( $this->summary ); + } + } if ( $match === false ) { $match = self::matchSpamRegex( $this->textbox1 ); } @@ -1454,7 +1510,7 @@ class EditPage { wfProfileOut( __METHOD__ ); return $status; } - if ( $wgUser->pingLimiter() ) { + if ( $wgUser->pingLimiter() || $wgUser->pingLimiter( 'linkpurge', 0 ) ) { $status->fatal( 'actionthrottledtext' ); $status->value = self::AS_RATE_LIMITED; wfProfileOut( __METHOD__ . '-checks' ); @@ -1488,8 +1544,17 @@ class EditPage { return $status; } - # Don't save a new article if it's blank. - if ( $this->textbox1 == '' ) { + // Don't save a new page if it's blank or if it's a MediaWiki: + // message with content equivalent to default (allow empty pages + // in this case to disable messages, see bug 50124) + $defaultMessageText = $this->mTitle->getDefaultMessageText(); + if ( $this->mTitle->getNamespace() === NS_MEDIAWIKI && $defaultMessageText !== false ) { + $defaultText = $defaultMessageText; + } else { + $defaultText = ''; + } + + if ( $this->textbox1 === $defaultText ) { $status->setResult( false, self::AS_BLANK_ARTICLE ); wfProfileOut( __METHOD__ ); return $status; @@ -1566,8 +1631,7 @@ class EditPage { } } - // If sectiontitle is set, use it, otherwise use the summary as the section title (for - // backwards compatibility with old forms/bots). + // If sectiontitle is set, use it, otherwise use the summary as the section title. if ( $this->sectiontitle !== '' ) { $sectionTitle = $this->sectiontitle; } else { @@ -1724,6 +1788,10 @@ class EditPage { } $result['nullEdit'] = $doEditStatus->hasMessage( 'edit-no-change' ); + if ( $result['nullEdit'] ) { + // We don't know if it was a null edit until now, so increment here + $wgUser->pingLimiter( 'linkpurge' ); + } $result['redirect'] = $content->isRedirect(); $this->updateWatchlist(); wfProfileOut( __METHOD__ ); @@ -1736,7 +1804,9 @@ class EditPage { protected function updateWatchlist() { global $wgUser; - if ( $wgUser->isLoggedIn() && $this->watchthis != $wgUser->isWatched( $this->mTitle ) ) { + if ( $wgUser->isLoggedIn() + && $this->watchthis != $wgUser->isWatched( $this->mTitle, WatchedItem::IGNORE_USER_RIGHTS ) + ) { $fname = __METHOD__; $title = $this->mTitle; $watch = $this->watchthis; @@ -1745,11 +1815,7 @@ class EditPage { $dbw = wfGetDB( DB_MASTER ); $dbw->onTransactionIdle( function() use ( $dbw, $title, $watch, $wgUser, $fname ) { $dbw->begin( $fname ); - if ( $watch ) { - WatchAction::doWatch( $title, $wgUser ); - } else { - WatchAction::doUnwatch( $title, $wgUser ); - } + WatchAction::doWatchOrUnwatch( $watch, $title, $wgUser ); $dbw->commit( $fname ); } ); } @@ -1854,11 +1920,11 @@ class EditPage { } /** - * Check given input text against $wgSpamRegex, and return the text of the first match. + * Check given input text against $wgSummarySpamRegex, and return the text of the first match. * * @param $text string * - * @return string|bool matching string or false + * @return string|bool matching string or false */ public static function matchSummarySpamRegex( $text ) { global $wgSummarySpamRegex; @@ -1885,10 +1951,16 @@ class EditPage { global $wgOut, $wgUser; $wgOut->addModules( 'mediawiki.action.edit' ); + $wgOut->addModuleStyles( 'mediawiki.action.edit.styles' ); if ( $wgUser->getOption( 'uselivepreview', false ) ) { $wgOut->addModules( 'mediawiki.action.edit.preview' ); } + + if ( $wgUser->getOption( 'useeditwarning', false ) ) { + $wgOut->addModules( 'mediawiki.action.edit.editWarning' ); + } + // Bug #19334: textarea jumps when editing articles in IE8 $wgOut->addStyle( 'common/IE80Fixes.css', 'screen', 'IE 8' ); @@ -1928,15 +2000,15 @@ class EditPage { if ( $namespace == NS_MEDIAWIKI ) { # Show a warning if editing an interface message $wgOut->wrapWikiMsg( "
\n$1\n
", 'editinginterface' ); - } else if( $namespace == NS_FILE ) { + } elseif ( $namespace == NS_FILE ) { # Show a hint to shared repo $file = wfFindFile( $this->mTitle ); - if( $file && !$file->isLocal() ) { + if ( $file && !$file->isLocal() ) { $descUrl = $file->getDescriptionUrl(); # there must be a description url to show a hint to shared repo - if( $descUrl ) { - if( !$this->mTitle->exists() ) { - $wgOut->wrapWikiMsg( "
\n$1\n
", array ( + if ( $descUrl ) { + if ( !$this->mTitle->exists() ) { + $wgOut->wrapWikiMsg( "
\n$1\n
", array( 'sharedupload-desc-create', $file->getRepo()->getDisplayName(), $descUrl ) ); } else { @@ -2126,7 +2198,7 @@ class EditPage { } } - //@todo: add EditForm plugin interface and use it here! + // @todo add EditForm plugin interface and use it here! // search for textarea1 and textares2, and allow EditForm to override all uses. $wgOut->addHTML( Html::openElement( 'form', array( 'id' => self::EDITFORM_ID, 'name' => self::EDITFORM_ID, 'method' => 'post', 'action' => $this->getActionURL( $this->getContextTitle() ), @@ -2136,6 +2208,14 @@ class EditPage { call_user_func_array( $formCallback, array( &$wgOut ) ); } + // Add an empty field to trip up spambots + $wgOut->addHTML( + Xml::openElement( 'div', array( 'id' => 'antispam-container', 'style' => 'display: none;' ) ) + . Html::rawElement( 'label', array( 'for' => 'wpAntiSpam' ), wfMessage( 'simpleantispam-label' )->parse() ) + . Xml::element( 'input', array( 'type' => 'text', 'name' => 'wpAntispam', 'id' => 'wpAntispam', 'value' => '' ) ) + . Xml::closeElement( 'div' ) + ); + wfRunHooks( 'EditPage::showEditForm:fields', array( &$this, &$wgOut ) ); // Put these up at the top to ensure they aren't lost on early form submission @@ -2161,7 +2241,7 @@ class EditPage { } # When the summary is hidden, also hide them on preview/show changes - if( $this->nosummary ) { + if ( $this->nosummary ) { $wgOut->addHTML( Html::hidden( 'nosummary', true ) ); } @@ -2239,6 +2319,11 @@ class EditPage { $wgOut->addHTML( Html::rawElement( 'div', array( 'class' => 'hiddencats' ), Linker::formatHiddenCategories( $this->mArticle->getHiddenCategories() ) ) ); + $wgOut->addHTML( Html::rawElement( 'div', array( 'class' => 'limitreport' ), + self::getPreviewLimitReport( $this->mParserOutput ) ) ); + + $wgOut->addModules( 'mediawiki.action.edit.collapsibleFooter' ); + if ( $this->isConflict ) { try { $this->showConflict(); @@ -2282,7 +2367,7 @@ class EditPage { } // Add edit notices - $wgOut->addHTML( implode( "\n", $this->mTitle->getEditNotices() ) ); + $wgOut->addHTML( implode( "\n", $this->mTitle->getEditNotices( $this->oldid ) ) ); if ( $this->isConflict ) { $wgOut->wrapWikiMsg( "
\n$1\n
", 'explainconflict' ); @@ -2509,7 +2594,7 @@ class EditPage { global $wgParser; if ( $isSubjectPreview ) { - $summary = wfMessage( 'newsectionsummary', $wgParser->stripSectionName( $summary ) ) + $summary = wfMessage( 'newsectionsummary' )->rawParams( $wgParser->stripSectionName( $summary ) ) ->inContentLanguage()->text(); } @@ -2626,7 +2711,7 @@ HTML $attribs = $customAttribs + array( 'accesskey' => ',', - 'id' => $name, + 'id' => $name, 'cols' => $wgUser->getIntOption( 'cols' ), 'rows' => $wgUser->getIntOption( 'rows' ), 'style' => '' // avoid php notices when appending preferences (appending allows customAttribs['style'] to still work @@ -2702,9 +2787,9 @@ HTML $oldtitlemsg = 'currentrev'; # if message does not exist, show diff against the preloaded default - if( $this->mTitle->getNamespace() == NS_MEDIAWIKI && !$this->mTitle->exists() ) { + if ( $this->mTitle->getNamespace() == NS_MEDIAWIKI && !$this->mTitle->exists() ) { $oldtext = $this->mTitle->getDefaultMessageText(); - if( $oldtext !== false ) { + if ( $oldtext !== false ) { $oldtitlemsg = 'defaultmessagetext'; $oldContent = $this->toEditContent( $oldtext ); } else { @@ -2799,7 +2884,15 @@ HTML return self::getCopyrightWarning( $this->mTitle ); } - public static function getCopyrightWarning( $title ) { + /** + * Get the copyright warning, by default returns wikitext + * + * @param Title $title + * @param string $format output format, valid values are any function of + * a Message object + * @return string + */ + public static function getCopyrightWarning( $title, $format = 'plain' ) { global $wgRightsText; if ( $wgRightsText ) { $copywarnMsg = array( 'copyrightwarning', @@ -2813,7 +2906,60 @@ HTML wfRunHooks( 'EditPageCopyrightWarning', array( $title, &$copywarnMsg ) ); return "
\n" . - call_user_func_array( 'wfMessage', $copywarnMsg )->plain() . "\n
"; + call_user_func_array( 'wfMessage', $copywarnMsg )->$format() . "\n"; + } + + /** + * Get the Limit report for page previews + * + * @since 1.22 + * @param ParserOutput $output ParserOutput object from the parse + * @return string HTML + */ + public static function getPreviewLimitReport( $output ) { + if ( !$output || !$output->getLimitReportData() ) { + return ''; + } + + wfProfileIn( __METHOD__ ); + + $limitReport = Html::rawElement( 'div', array( 'class' => 'mw-limitReportExplanation' ), + wfMessage( 'limitreport-title' )->parseAsBlock() + ); + + // Show/hide animation doesn't work correctly on a table, so wrap it in a div. + $limitReport .= Html::openElement( 'div', array( 'class' => 'preview-limit-report-wrapper' ) ); + + $limitReport .= Html::openElement( 'table', array( + 'class' => 'preview-limit-report wikitable' + ) ) . + Html::openElement( 'tbody' ); + + foreach ( $output->getLimitReportData() as $key => $value ) { + if ( wfRunHooks( 'ParserLimitReportFormat', + array( $key, $value, &$limitReport, true, true ) + ) ) { + $keyMsg = wfMessage( $key ); + $valueMsg = wfMessage( array( "$key-value-html", "$key-value" ) ); + if ( !$valueMsg->exists() ) { + $valueMsg = new RawMessage( '$1' ); + } + if ( !$keyMsg->isDisabled() && !$valueMsg->isDisabled() ) { + $limitReport .= Html::openElement( 'tr' ) . + Html::rawElement( 'th', null, $keyMsg->parse() ) . + Html::rawElement( 'td', null, $valueMsg->params( $value )->parse() ) . + Html::closeElement( 'tr' ); + } + } + } + + $limitReport .= Html::closeElement( 'tbody' ) . + Html::closeElement( 'table' ) . + Html::closeElement( 'div' ); + + wfProfileOut( __METHOD__ ); + + return $limitReport; } protected function showStandardInputs( &$tabindex = 2 ) { @@ -2838,7 +2984,9 @@ HTML $cancel = $this->getCancelLink(); if ( $cancel !== '' ) { - $cancel .= wfMessage( 'pipe-separator' )->text(); + $cancel .= Html::element( 'span', + array( 'class' => 'mw-editButtons-pipe-separator' ), + wfMessage( 'pipe-separator' )->text() ); } $edithelpurl = Skin::makeInternalOrExternalUrl( wfMessage( 'edithelppage' )->inContentLanguage()->text() ); $edithelp = '' . @@ -3028,9 +3176,9 @@ HTML # don't parse non-wikitext pages, show message about preview if ( $this->mTitle->isCssJsSubpage() || $this->mTitle->isCssOrJsPage() ) { - if( $this->mTitle->isCssJsSubpage() ) { + if ( $this->mTitle->isCssJsSubpage() ) { $level = 'user'; - } elseif( $this->mTitle->isCssOrJsPage() ) { + } elseif ( $this->mTitle->isCssOrJsPage() ) { $level = 'site'; } else { $level = false; @@ -3046,7 +3194,7 @@ HTML # Used messages to make sure grep find them: # Messages: usercsspreview, userjspreview, sitecsspreview, sitejspreview - if( $level && $format ) { + if ( $level && $format ) { $note = "
" . wfMessage( "{$level}{$format}preview" )->text() . "
"; } } @@ -3098,9 +3246,9 @@ HTML '

' . wfMessage( 'preview' )->escaped() . "

" . $wgOut->parse( $note, true, /* interface */true ) . $conflict . "\n"; - $pageLang = $this->mTitle->getPageLanguage(); - $attribs = array( 'lang' => $pageLang->getCode(), 'dir' => $pageLang->getDir(), - 'class' => 'mw-content-' . $pageLang->getDir() ); + $pageViewLang = $this->mTitle->getPageViewLanguage(); + $attribs = array( 'lang' => $pageViewLang->getHtmlCode(), 'dir' => $pageViewLang->getDir(), + 'class' => 'mw-content-' . $pageViewLang->getDir() ); $previewHTML = Html::rawElement( 'div', $attribs, $previewHTML ); wfProfileOut( __METHOD__ ); @@ -3314,9 +3462,9 @@ HTML $minorLabel = wfMessage( 'minoredit' )->parse(); if ( $wgUser->isAllowed( 'minoredit' ) ) { $attribs = array( - 'tabindex' => ++$tabindex, + 'tabindex' => ++$tabindex, 'accesskey' => wfMessage( 'accesskey-minoredit' )->text(), - 'id' => 'wpMinoredit', + 'id' => 'wpMinoredit', ); $checkboxes['minor'] = Xml::check( 'wpMinoredit', $checked['minor'], $attribs ) . @@ -3330,9 +3478,9 @@ HTML $checkboxes['watch'] = ''; if ( $wgUser->isLoggedIn() ) { $attribs = array( - 'tabindex' => ++$tabindex, + 'tabindex' => ++$tabindex, 'accesskey' => wfMessage( 'accesskey-watch' )->text(), - 'id' => 'wpWatchthis', + 'id' => 'wpWatchthis', ); $checkboxes['watch'] = Xml::check( 'wpWatchthis', $checked['watch'], $attribs ) . @@ -3356,37 +3504,37 @@ HTML $buttons = array(); $temp = array( - 'id' => 'wpSave', - 'name' => 'wpSave', - 'type' => 'submit', - 'tabindex' => ++$tabindex, - 'value' => wfMessage( 'savearticle' )->text(), + 'id' => 'wpSave', + 'name' => 'wpSave', + 'type' => 'submit', + 'tabindex' => ++$tabindex, + 'value' => wfMessage( 'savearticle' )->text(), 'accesskey' => wfMessage( 'accesskey-save' )->text(), - 'title' => wfMessage( 'tooltip-save' )->text() . ' [' . wfMessage( 'accesskey-save' )->text() . ']', + 'title' => wfMessage( 'tooltip-save' )->text() . ' [' . wfMessage( 'accesskey-save' )->text() . ']', ); $buttons['save'] = Xml::element( 'input', $temp, '' ); ++$tabindex; // use the same for preview and live preview $temp = array( - 'id' => 'wpPreview', - 'name' => 'wpPreview', - 'type' => 'submit', - 'tabindex' => $tabindex, - 'value' => wfMessage( 'showpreview' )->text(), + 'id' => 'wpPreview', + 'name' => 'wpPreview', + 'type' => 'submit', + 'tabindex' => $tabindex, + 'value' => wfMessage( 'showpreview' )->text(), 'accesskey' => wfMessage( 'accesskey-preview' )->text(), - 'title' => wfMessage( 'tooltip-preview' )->text() . ' [' . wfMessage( 'accesskey-preview' )->text() . ']', + 'title' => wfMessage( 'tooltip-preview' )->text() . ' [' . wfMessage( 'accesskey-preview' )->text() . ']', ); $buttons['preview'] = Xml::element( 'input', $temp, '' ); $buttons['live'] = ''; $temp = array( - 'id' => 'wpDiff', - 'name' => 'wpDiff', - 'type' => 'submit', - 'tabindex' => ++$tabindex, - 'value' => wfMessage( 'showdiff' )->text(), + 'id' => 'wpDiff', + 'name' => 'wpDiff', + 'type' => 'submit', + 'tabindex' => ++$tabindex, + 'value' => wfMessage( 'showdiff' )->text(), 'accesskey' => wfMessage( 'accesskey-diff' )->text(), - 'title' => wfMessage( 'tooltip-diff' )->text() . ' [' . wfMessage( 'accesskey-diff' )->text() . ']', + 'title' => wfMessage( 'tooltip-diff' )->text() . ' [' . wfMessage( 'accesskey-diff' )->text() . ']', ); $buttons['diff'] = Xml::element( 'input', $temp, '' ); @@ -3506,7 +3654,7 @@ HTML global $wgOut, $wgLang; $this->textbox2 = $this->textbox1; - if( is_array( $match ) ) { + if ( is_array( $match ) ) { $match = $wgLang->listToText( $match ); } $wgOut->prepareErrorPage( wfMessage( 'spamprotectiontitle' ) ); -- cgit v1.2.2