SHARE
    TWEET
    Krenair

    Untitled

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

    AltStyle によって変換されたページ (->オリジナル) /