r69996 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69995‎ | r69996 | r69997 >
Date:10:30, 27 July 2010
Author:reedy
Status:ok
Tags:
Comment:
Make EditPage::spamPage() static

Add braces
Modified paths:
  • /trunk/phase3/includes/EditPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/EditPage.php
@@ -2022,7 +2022,7 @@
20232023 *
20242024 * @param $match Text which triggered one or more filters
20252025 */
2026 - function spamPage( $match = false ) {
 2026+ static function spamPage( $match = false ) {
20272027 global $wgOut, $wgTitle;
20282028
20292029 $wgOut->setPageTitle( wfMsg( 'spamprotectiontitle' ) );
@@ -2031,8 +2031,9 @@
20322032
20332033 $wgOut->addHTML( '<div id="spamprotected">' );
20342034 $wgOut->addWikiMsg( 'spamprotectiontext' );
2035 - if ( $match )
 2035+ if ( $match ) {
20362036 $wgOut->addWikiMsg( 'spamprotectionmatch', wfEscapeWikiText( $match ) );
 2037+ }
20372038 $wgOut->addHTML( '</div>' );
20382039
20392040 $wgOut->returnToMain( false, $wgTitle );
@@ -2603,7 +2604,7 @@
26042605 return false;
26052606
26062607 case self::AS_SPAM_ERROR:
2607 - $this->spamPage( $resultDetails['spam'] );
 2608+ self::spamPage( $resultDetails['spam'] );
26082609 return false;
26092610
26102611 case self::AS_BLOCKED_PAGE_FOR_USER:

Status & tagging log