r39505 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r39504‎ | r39505 | r39506 >
Date:21:40, 16 August 2008
Author:aaron
Status:old
Tags:
Comment:
Fix mixed up params
Modified paths:
  • /trunk/extensions/SpamBlacklist/SpamBlacklist.php (modified) (history)
  • /trunk/extensions/SpamBlacklist/SpamBlacklist_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SpamBlacklist/SpamBlacklist.php
@@ -80,10 +80,10 @@
8181 /**
8282 * Hook function for EditFilterMerged, replaces wfSpamBlacklistFilter
8383 */
84 -function wfSpamBlacklistFilterMerged( $editPage, $text, &$hookErr, $editSummary ) {
 84+function wfSpamBlacklistFilterMerged( &$editPage, $text, &$hookErr, $editSummary ) {
8585 $spamObj = wfSpamBlacklistObject();
8686 $title = $editPage->mArticle->getTitle();
87 - $ret = $spamObj->filter( $title, $text, '', $editPage, $editSummary );
 87+ $ret = $spamObj->filter( $title, $text, '', $editSummary, $editPage );
8888 // Return convention for hooks is the inverse of $wgFilterCallback
8989 return !$ret;
9090 }
Index: trunk/extensions/SpamBlacklist/SpamBlacklist_body.php
@@ -184,12 +184,12 @@
185185 * @param Title $title
186186 * @param string $text Text of section, or entire text if $editPage!=false
187187 * @param string $section Section number or name
188 - * @param EditPage $editPage EditPage if EditFilterMerged was called, false otherwise
189188 * @param EditSummary $editSummary Edit summary if one exists, some people use urls there too
 189+ * @param EditPage $editPage EditPage if EditFilterMerged was called, null otherwise
190190 * @return True if the edit should not be allowed, false otherwise
191191 * If the return value is true, an error will have been sent to $wgOut
192192 */
193 - function filter( &$title, $text, $section, $editPage = false, $editsummary = '' ) {
 193+ function filter( &$title, $text, $section, $editsummary = '', EditPage &$editPage = null ) {
194194 global $wgArticle, $wgVersion, $wgOut, $wgParser, $wgUser;
195195
196196 $fname = 'wfSpamBlacklistFilter';

Status & tagging log