Krenair

Untitled

Apr 8th, 2012
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 6.13 KB | None | 0 0
  1. Index: extensions/MirrorTools/APIMirrorTools.php
  2. ===================================================================
  3. --- extensions/MirrorTools/APIMirrorTools.php   (revision 114024)
  4. +++ extensions/MirrorTools/APIMirrorTools.php   (working copy)
  5. @@ -264,9 +264,6 @@
  6.             case EditPage::AS_SPAM_ERROR:
  7.                 $this->dieUsageMsg( array( 'spamdetected', $result['spam'] ) );
  8.  
  9. -           case EditPage::AS_FILTERING:
  10. -               $this->dieUsageMsg( array( 'filtered' ) );
  11. -
  12.             case EditPage::AS_BLOCKED_PAGE_FOR_USER:
  13.                 $this->dieUsageMsg( array( 'blockedtext' ) );
  14.  
  15. @@ -372,4 +369,4 @@
  16.     public function getVersion() {
  17.         return __CLASS__ . ': $Id: ApiMirrorEditPage.php 68353 2010-06-21 13:13:32Z hartman $';
  18.     }
  19. -}
  20. \ No newline at end of file
  21. +}
  22. Index: extensions/MirrorTools/MirrorTools.classes.php
  23. ===================================================================
  24. --- extensions/MirrorTools/MirrorTools.classes.php  (revision 114024)
  25. +++ extensions/MirrorTools/MirrorTools.classes.php  (working copy)
  26. @@ -6,7 +6,7 @@
  27.      * @return one of the constants describing the result
  28.      */
  29.     function mirrorinternalAttemptSave( &$result, $bot = false, $mirrorUser ) {
  30. -       global $wgFilterCallback, $wgUser, $wgOut, $wgParser;
  31. +       global $wgUser, $wgOut, $wgParser;
  32.         global $wgMaxArticleSize;
  33.                  $user = User::newFromName ( $mirrorUser, true );
  34.         wfProfileIn( __METHOD__  );
  35. @@ -43,12 +43,6 @@
  36.             wfProfileOut( __METHOD__ );
  37.             return self::AS_SPAM_ERROR;
  38.         }
  39. -       if ( $wgFilterCallback && $wgFilterCallback( $this->mTitle, $this->textbox1, $this->section, $this->hookError, $this->summary ) ) {
  40. -           # Error messages or other handling should be performed by the filter function
  41. -           wfProfileOut( __METHOD__ . '-checks' );
  42. -           wfProfileOut( __METHOD__ );
  43. -           return self::AS_FILTERING;
  44. -       }
  45.         if ( !wfRunHooks( 'EditFilter', array( $this, $this->textbox1, $this->section, &$this->hookError, $this->summary ) ) ) {
  46.             # Error messages etc. could be handled within the hook...
  47.             wfProfileOut( __METHOD__ . '-checks' );
  48. @@ -314,4 +308,4 @@
  49.         wfProfileOut( __METHOD__ );
  50.         return self::AS_END;
  51.     }
  52. -}
  53. \ No newline at end of file
  54. +}
  55. Index: extensions/Configure/scripts/findSettings.php
  56. ===================================================================
  57. --- extensions/Configure/scripts/findSettings.php   (revision 114024)
  58. +++ extensions/Configure/scripts/findSettings.php   (working copy)
  59. @@ -167,7 +167,6 @@
  60.                     'wgExtensionFunctions',        // Extensions only
  61.                     'wgExtensionMessagesFiles',    // Extensions only
  62.                     'wgFeedClasses',               // Needs PHP code
  63. -                   'wgFilterCallback',            // Needs PHP code
  64.                     'wgHooks',                     // Extensions only
  65.                     'wgInputEncoding',             // Deprecated
  66.                     'wgJobClasses',                // Extensions only
  67. Index: extensions/SemanticForms/includes/SF_Utils.php
  68. ===================================================================
  69. --- extensions/SemanticForms/includes/SF_Utils.php  (revision 114024)
  70. +++ extensions/SemanticForms/includes/SF_Utils.php  (working copy)
  71. @@ -689,7 +689,6 @@
  72.             case EditPage::AS_TEXTBOX_EMPTY:
  73.             case EditPage::AS_MAX_ARTICLE_SIZE_EXCEEDED:
  74.             case EditPage::AS_END:
  75. -           case EditPage::AS_FILTERING:
  76.             default:
  77.                 return array( 'internalerror_text', array ( $error ) );
  78.         }
  79. Index: extensions/WikiObjectModel/includes/apis/WOM_SetObjectModel.php
  80. ===================================================================
  81. --- extensions/WikiObjectModel/includes/apis/WOM_SetObjectModel.php (revision 114024)
  82. +++ extensions/WikiObjectModel/includes/apis/WOM_SetObjectModel.php (working copy)
  83. @@ -212,9 +212,6 @@
  84.                 case EditPage::AS_SPAM_ERROR:
  85.                     $this->dieUsageMsg( array( 'spamdetected', $result['spam'] ) );
  86.  
  87. -               case EditPage::AS_FILTERING:
  88. -                   $this->dieUsageMsg( array( 'filtered' ) );
  89. -
  90.                 case EditPage::AS_BLOCKED_PAGE_FOR_USER:
  91.                     $this->dieUsageMsg( array( 'blockedtext' ) );
  92.  
  93. @@ -316,7 +313,6 @@
  94.             array( 'noimageredirect-anon' ),
  95.             array( 'noimageredirect-logged' ),
  96.             array( 'spamdetected', 'spam' ),
  97. -           array( 'filtered' ),
  98.             array( 'blockedtext' ),
  99.             array( 'contenttoobig', $wgMaxArticleSize ),
  100.             array( 'noedit-anon' ),
  101. Index: extensions/Form/Form.body.php
  102. ===================================================================
  103. --- extensions/Form/Form.body.php   (revision 114024)
  104. +++ extensions/Form/Form.body.php   (working copy)
  105. @@ -255,7 +255,7 @@
  106.  
  107.     # Had to crib some checks from EditPage.php, since they're not done in Article.php
  108.     function checkSave( $nt, $text ) {
  109. -       global $wgSpamRegex, $wgFilterCallback, $wgUser, $wgMaxArticleSize, $wgOut;
  110. +       global $wgSpamRegex, $wgUser, $wgMaxArticleSize, $wgOut;
  111.  
  112.         $matches = array();
  113.         $errortext = '';
  114. @@ -266,9 +266,6 @@
  115.         if ( $wgSpamRegex && preg_match( $wgSpamRegex, $text, $matches ) ) {
  116.             $wgOut->showErrorPage( 'formsaveerror', 'formsaveerrortext' );
  117.             return false;
  118. -       } elseif ( $wgFilterCallback && $wgFilterCallback( $nt, $text, 0 ) ) {
  119. -           $wgOut->showErrorPage( 'formsaveerror', 'formsaveerrortext' );
  120. -           return false;
  121.         } elseif ( !wfRunHooks( 'EditFilter', array( $editPage, $text, 0, &$errortext ) ) ) {
  122.             # Hooks usually print their own error
  123.             return false;
  124. Index: extensions/Postcomment/Postcomment.php
  125. ===================================================================
  126. --- extensions/Postcomment/Postcomment.php  (revision 114024)
  127. +++ extensions/Postcomment/Postcomment.php  (working copy)
  128. @@ -37,7 +37,7 @@
  129.     function execute( $par ) {
  130.         global $wgUser, $wgOut, $wgLang, $wgMemc, $wgDBname;
  131.         global $wgRequest, $wgSitename, $wgLanguageCode;
  132. -       global $wgFilterCallback, $wgWhitelistEdit;
  133. +       global $wgWhitelistEdit;
  134.  
  135.         //echo "topic: " . $wgRequest->getVal("topic_name") . "<br />";
  136.         //echo "title: " . $wgRequest->getVal("title") . "<br />";
  137. @@ -107,7 +107,8 @@
  138.         $text .= "\n\n$formattedComment\n\n";
  139.  
  140.         $tmp = "";
  141. -       if ( $wgFilterCallback && $wgFilterCallback( $t, $text, $tmp) ) {
  142. +       $errorText = '';
  143. +       if ( !wfRunHooks( 'EditFilter', array( new FakeEditPage( $t ), $text, $tmp, &$errorText ) ) {
  144.             # Error messages or other handling should be performed by the filter function
  145.             return;
Advertisement
Add Comment
Please, Sign In to add comment