$doExpensiveQueries: Whether to do expensive DB queries
$short: Whether to return immediately on first error
+'TitleGetEditNotices': Allows extensions to add edit notices
+$title: The Title object for the page the edit notices are for
+$oldid: Revision ID that the edit notices are for (or 0 for latest)
+&$notices: Array of notices. Keys are i18n message keys, values are parseAsBlock()ed messages.
+
'TitleGetRestrictionTypes': Allows extensions to modify the types of protection
that can be applied.
$title: The title in question.
}
// Add edit notices
- $wgOut->addHTML( implode( "\n", $this->mTitle->getEditNotices() ) );
+ $wgOut->addHTML( implode( "\n", $this->mTitle->getEditNotices( $this->oldid ) ) );
if ( $this->isConflict ) {
$wgOut->wrapWikiMsg( "<div class='mw-explainconflict'>\n$1\n</div>", 'explainconflict' );
* they will already be wrapped in paragraphs.
*
* @since 1.21
+ * @param int oldid Revision ID that's being edited
* @return Array
*/
- public function getEditNotices() {
+ public function getEditNotices( $oldid = 0 ) {
$notices = array();
# Optional notices on a per-namespace and per-page basis
$notices[$editnoticeText] = $editnoticeMsg->parseAsBlock();
}
}
+
+ wfRunHooks( 'TitleGetEditNotices', array( $this, $oldid, &$notices ) );
return $notices;
}
}