several uses of the same image.
* (bug 1250) Users can still use "show preview" and "show changes" even if the
wiki is set to read-only mode.
-
+* Added 'ParserLinkNSCheck' hook in the parser, allowing extensions to catch and handle
+ links based on namespace (for instance, to add code to handle [[Tag: Foo]] similarly
+ to how [[Category: Foo]] is handled.
+* Added 'EditPageNoPermission' hook to allow special handling/output when a non-editor
+ views an edit page.
+
=== Bug fixes in 1.14 ===
* (bug 14907) DatabasePostgres::fieldType now defined.
&$skip: skip this template and link it?
&$id: the id of the revision being parsed
+'ParserLinkNSCheck': after Image and Category links are handled, before general link processing
+Allows an extension to catch arbitrary namespaces and hande their links differently
+&$parser: the parser instance
+&$title: The title instance
+&$s: The current value of s, as used in replaceInternalLinks2
+&$text: The text of the link
+&$prefix:The bit of text just before the link begins, depending on language settings
+&$trail: The bit of text after the link ends, depending on language settings
+
'BeforeParserMakeImageLinkObj': before an image is rendered by Parser
&$parser: Parser object
&$nt: the image title
$error: error message to return
$summary: Edit summary for page
+'EditPageNoPermission': allows modification of permission Errors before the readonly page is loaded
+&$editpage: The editpage instance
+&$permErrors: the permission Errors from editpage->getEditPermissionErrors()
+
'EditFormPreloadText': Allows population of the edit form when creating new pages
&$text: Text to preload with
&$title: Title object representing the page being created
$permErrors = $this->getEditPermissionErrors();
if ( $permErrors ) {
wfDebug( __METHOD__.": User can't edit\n" );
+ wfRunHooks( 'EditPageNoPermission', array( &$this, &$permErrors ) );
$this->readOnlyPage( $this->getContent(), true, $permErrors, 'edit' );
wfProfileOut( __METHOD__ );
return;
wfProfileOut( __METHOD__."-category" );
continue;
}
+ # Give extensions a chance to catch other namespace links
+ if ( !wfRunHooks( 'ParserLinkNSCheck', array( &$this, &$nt, &$s, &$text, &$prefix, &$trail ) ) ) {
+ continue;
+ }
}
# Self-link checking