Index: trunk/extensions/SpamBlacklist/SpamBlacklist.php |
— | — | @@ -84,8 +84,13 @@ |
85 | 85 | $spamObj = wfSpamBlacklistObject(); |
86 | 86 | $title = $editPage->mArticle->getTitle(); |
87 | 87 | $ret = $spamObj->filter( $title, $text, '', $editSummary, $editPage ); |
88 | | - if ( $ret !== false ){ |
89 | | - $editPage->spamPageWithContent( $ret ); |
| 88 | + if ( $ret !== false ) { |
| 89 | + // spamPageWithContent() method was added in MW 1.17 |
| 90 | + if ( method_exists( $editPage, 'spamPageWithContent' ) ) { |
| 91 | + $editPage->spamPageWithContent( $ret ); |
| 92 | + } else { |
| 93 | + $editPage->spamPage( $ret ); |
| 94 | + } |
90 | 95 | } |
91 | 96 | // Return convention for hooks is the inverse of $wgFilterCallback |
92 | 97 | return ( $ret === false ); |