r55681 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55680‎ | r55681 | r55682 >
Date:05:55, 30 August 2009
Author:nephele
Status:ok
Tags:
Comment:
Fixed EditFilterMerged hook to use hookError param
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/EditPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/EditPage.php
@@ -890,6 +890,10 @@
891891 # Error messages etc. could be handled within the hook...
892892 wfProfileOut( $fname );
893893 return self::AS_HOOK_ERROR;
 894+ } elseif ( $this->hookError != '' ) {
 895+ # ...or the hook could be expecting us to produce an error
 896+ wfProfileOut( $fname );
 897+ return self::AS_HOOK_ERROR_EXPECTED;
894898 }
895899
896900 # Handle the user preference to force summaries here. Check if it's not a redirect.
@@ -978,6 +982,10 @@
979983 # Error messages etc. could be handled within the hook...
980984 wfProfileOut( $fname );
981985 return self::AS_HOOK_ERROR;
 986+ } elseif ( $this->hookError != '' ) {
 987+ # ...or the hook could be expecting us to produce an error
 988+ wfProfileOut( $fname );
 989+ return self::AS_HOOK_ERROR_EXPECTED;
982990 }
983991
984992 # Handle the user preference to force summaries here, but not for null edits
Index: trunk/phase3/RELEASE-NOTES
@@ -441,6 +441,8 @@
442442 * (bug 20260) SQLite no longer tries to automatically create the database at
443443 execution time, this now happens only at install time; if it is not available
444444 at script execution, it now throws an exception
 445+* Fixed EditFilterMerged hook so the hookError parameter serves a purpose
 446+ (analogous to EditFilter hook)
445447
446448 == API changes in 1.16 ==
447449

Status & tagging log