Jack Phoenix has submitted this change and it was merged.

Change subject: Removed $wgTitle instances from the ContentBlock module
......................................................................


Removed $wgTitle instances from the ContentBlock module

References ShoutWiki SVN r2368

Change-Id: I2d6c13201a80f52ccd31fce9ea11830a13a742ac
---
M blocks/ContentBlock.class.php
1 file changed, 11 insertions(+), 6 deletions(-)

Approvals:
  Jack Phoenix: Verified; Looks good to me, approved



diff --git a/blocks/ContentBlock.class.php b/blocks/ContentBlock.class.php
index 1233060..82509d5 100644
--- a/blocks/ContentBlock.class.php
+++ b/blocks/ContentBlock.class.php
@@ -11,15 +11,20 @@
        private static $whitelist = null;
 
        /**
-        * @param $editpage Object: EditPage object
-        * @return Boolean: true if no spam, otherwise false
+        * @param EditPage $editpage
+        * @param string $text
+        * @param $section
+        * @param string $error
+        * @param string $editSummary User-supplied edit summary
+        * @return bool True if no spam, otherwise false
         */
-       public static function onEditFilter( $editpage ) {
-               global $wgOut, $wgTitle;
+       public static function onEditFilter( $editpage, $text, $section, 
&$error, $editSummary ) {
+               global $wgOut;
                wfProfileIn( __METHOD__ );
 
+               $title = $editpage->getTitle();
                // allow blocked words to be added to whitelist
-               if ( $wgTitle->getPrefixedText() == 'MediaWiki:Spam-whitelist' 
) {
+               if ( $title->getPrefixedText() == 'MediaWiki:Spam-whitelist' ) {
                        wfProfileOut( __METHOD__ );
                        return true;
                }
@@ -40,7 +45,7 @@
                                        $wgOut->addWikiMsg( 
'spamprotectionmatch', "<nowiki>{$result['msg']}</nowiki>" );
                                        $wgOut->addWikiMsg( 
'phalanx-content-spam-summary' );
 
-                                       $wgOut->returnToMain( false, $wgTitle );
+                                       $wgOut->returnToMain( false, $title );
                                        $wgOut->addHTML( '</div>' );
                                        wfDebugLog( 'Phalanx', __METHOD__ . ": 
block '{$result['msg']}' blocked '$summary'." );
                                        wfProfileOut( __METHOD__ );

-- 
To view, visit https://gerrit.wikimedia.org/r/169740
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2d6c13201a80f52ccd31fce9ea11830a13a742ac
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Phalanx
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix <[email protected]>
Gerrit-Reviewer: Jack Phoenix <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to