Krenair

Untitled

Apr 7th, 2012
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.96 KB | None | 0 0
  1. Index: extensions/Postcomment/Postcomment.php
  2. ===================================================================
  3. --- extensions/Postcomment/Postcomment.php  (revision 114024)
  4. +++ extensions/Postcomment/Postcomment.php  (working copy)
  5. @@ -37,7 +37,7 @@
  6.     function execute( $par ) {
  7.         global $wgUser, $wgOut, $wgLang, $wgMemc, $wgDBname;
  8.         global $wgRequest, $wgSitename, $wgLanguageCode;
  9. -       global $wgFilterCallback, $wgWhitelistEdit;
  10. +       global $wgWhitelistEdit;
  11.  
  12.         //echo "topic: " . $wgRequest->getVal("topic_name") . "<br />";
  13.         //echo "title: " . $wgRequest->getVal("title") . "<br />";
  14. @@ -107,7 +107,8 @@
  15.         $text .= "\n\n$formattedComment\n\n";
  16.  
  17.         $tmp = "";
  18. -       if ( $wgFilterCallback && $wgFilterCallback( $t, $text, $tmp) ) {
  19. +       $errorText = '';
  20. +       if ( !wfRunHooks( 'EditFilter', array( new FakeEditPage( $t ), $text, $tmp, &$errorText ) ) {
  21.             # Error messages or other handling should be performed by the filter function
  22.             return;
  23.         }
Advertisement
Add Comment
Please, Sign In to add comment