From b9a44c69db0a7d3e8c986bacbb99c23a23786554 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sat, 11 Dec 2004 11:32:53 +0000 Subject: [PATCH] Bringing calling convention into line with 1.3, for compatibility with plugin --- includes/EditPage.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index 17c2bbf4ae..fc9433c308 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -149,7 +149,7 @@ class EditPage { if ( 'save' == $formtype ) { # Check for spam if ( $wgSpamRegex && preg_match( $wgSpamRegex, $this->textbox1, $matches ) ) { - $this->spamPage ( $matches ); + $this->spamPage ( $matches[0] ); return; } if ( $wgFilterCallback && $wgFilterCallback( $this->mTitle, $this->textbox1, $this->section ) ) { @@ -563,7 +563,7 @@ htmlspecialchars( $wgContLang->recodeForEdit( $this->textbox1 ) ) . /** * @todo document */ - function spamPage ( $matches = array() ) + function spamPage ( $match = false ) { global $wgOut; $wgOut->setPageTitle( wfMsg( 'spamprotectiontitle' ) ); @@ -571,8 +571,8 @@ htmlspecialchars( $wgContLang->recodeForEdit( $this->textbox1 ) ) . $wgOut->setArticleRelated( false ); $wgOut->addWikiText( wfMsg( 'spamprotectiontext' ) ); - if ( isset ( $matches[0] ) ) { - $wgOut->addWikiText( wfMsg( 'spamprotectionmatch', "{$matches[0]}" ) ); + if ( $match ) { + $wgOut->addWikiText( wfMsg( 'spamprotectionmatch', "{$match}" ) ); } $wgOut->returnToMain( false ); } -- 2.20.1