* ar: fix the 'create a new page' on search page when no exact match found
* (bug 8703) Corrected Talk namespace name for Limburgish (li)
* (bug 8712) Expose user groups as a JavaScript global
+* Introduce 'CustomEditor' hook; see docs/hooks.txt for more information
== Languages updated ==
$isbn: ISBN to show information for
$output: OutputPage object in use
+'CustomEditor': When invoking the page editor
+$article: Article being edited
+$user: User performing the edit
+
+Return true to allow the normal editor to be used, or false
+if implementing a custom editor, e.g. for a special namespace,
+etc.
+
'DiffViewHeader': called before diff display
$diff: DifferenceEngine object that's calling
$oldRev: Revision object of the "old" revision (may be null/invalid)
}
/* Continue... */
case 'edit':
- $internal = $request->getVal( 'internaledit' );
- $external = $request->getVal( 'externaledit' );
- $section = $request->getVal( 'section' );
- $oldid = $request->getVal( 'oldid' );
- if( !$this->getVal( 'UseExternalEditor' ) || $action=='submit' || $internal ||
- $section || $oldid || ( !$user->getOption( 'externaleditor' ) && !$external ) ) {
- $editor = new EditPage( $article );
- $editor->submit();
- } elseif( $this->getVal( 'UseExternalEditor' ) && ( $external || $user->getOption( 'externaleditor' ) ) ) {
- $mode = $request->getVal( 'mode' );
- $extedit = new ExternalEdit( $article, $mode );
- $extedit->edit();
+ if( wfRunHooks( 'CustomEditor', array( $article, $user ) ) ) {
+ $internal = $request->getVal( 'internaledit' );
+ $external = $request->getVal( 'externaledit' );
+ $section = $request->getVal( 'section' );
+ $oldid = $request->getVal( 'oldid' );
+ if( !$this->getVal( 'UseExternalEditor' ) || $action=='submit' || $internal ||
+ $section || $oldid || ( !$user->getOption( 'externaleditor' ) && !$external ) ) {
+ $editor = new EditPage( $article );
+ $editor->submit();
+ } elseif( $this->getVal( 'UseExternalEditor' ) && ( $external || $user->getOption( 'externaleditor' ) ) ) {
+ $mode = $request->getVal( 'mode' );
+ $extedit = new ExternalEdit( $article, $mode );
+ $extedit->edit();
+ }
}
break;
case 'history':