a machine API rather than the HTML user interface.
&$msg: the message identifier for abort reason (new in 1.18, not available before 1.18)
-'AbortMove': Allows to abort moving an article (title).
-$old: old title
-$nt: new title
-$user: user who is doing the move
-$err: error message
-$reason: the reason for the move (added in 1.13)
-
'AbortNewAccount': Return false to cancel explicit account creation.
$user: the User object about to be created (read-only, incomplete)
&$msg: out parameter: HTML to display on abort
$status: Status object, modify this to throw an error. Overridden by $error
(added in 1.20)
+'ArticleDeleteAfterSuccess': Output after an article has been deleted.
+$title: Title of the article that has been deleted.
+$outputPage: OutputPage that can be used to append the output.
+
'ArticleDeleteComplete': After an article is deleted.
$wikiPage: the WikiPage that was deleted
$user: the user that deleted the article
&$ignored Array of ignored message keys
&$optional Array of optional message keys
+ 'LogEventsListGetExtraInputs': When getting extra inputs to display on Special:Log
+ for a specific log type
+ $type: String of log type being displayed
+ $logEventsList: LogEventsList object for context and access to the WebRequest
+ &$input: string HTML of an input element
+
+
'LogEventsListShowLogExtract': Called before the string is added to OutputPage.
Returning false will prevent the string from being added to the OutputPage.
&$s: html string to show for the log extract
&$opts: Options for the query.
&$join_conds: Join conditions for the query.
+'MovePageCheckPermissions': Specify whether the user is allowed to move the page.
+$oldTitle: Title object of the current (old) location
+$newTitle: Title object of the new location
+$user: User making the move
+$reason: string of the reason provided by the user
+$status: Status object to pass error messages to
+
+'MovePageIsValidMove': Specify whether a page can be moved for technical reasons.
+$oldTitle: Title object of the current (old) location
+$newTitle: Title object of the new location
+$status: Status object to pass error messages to
+
'BaseTemplateToolbox': Called by BaseTemplate when building the $toolbox array
and returning it for the skin to output. You can add items to the toolbox while
still letting the skin make final decisions on skin-specific markup conventions
$pager: The UsersPager instance
$query: The query array to be returned
+ 'SpecialLogAddLogSearchRelations': Add log relations to the current log
+ $type: String of the log type
+ $request: WebRequest object for getting the value provided by the current user
+ &$qc: Array for query conditions to add
+
'SpecialMovepageAfterMove': Called after moving a page.
$movePage: MovePageForm object
$oldTitle: old title (object)
'UserGetLanguageObject': Called when getting user's interface language object.
$user: User object
&$code: Language code that will be used to create the object
-$context: RequestContext object
+$context: IContextSource object
'UserGetReservedNames': Allows to modify $wgReservedUsernames at run time.
&$reservedUsernames: $wgReservedUsernames
$to: Array of MailAddress objects for the recipients
&$returnPath: The return address string
+'LoginFormValidErrorMessages': Called in LoginForm when a function gets valid error
+messages. Allows to add additional error messages (except messages already in
+LoginForm::$validErrorMessages).
+&$messages Already added messages (inclusive messages from LoginForm::$validErrorMessages)
+
'WantedPages::getQueryInfo': Called in WantedPagesPage::getQueryInfo(), can be
used to alter the SQL query which gets the list of wanted pages.
&$wantedPages: WantedPagesPage object
* @return string
*/
private function getExtraInputs( $types ) {
- $offender = $this->getRequest()->getVal( 'offender' );
- $user = User::newFromName( $offender, false );
- if ( !$user || ( $user->getId() == 0 && !IP::isIPAddress( $offender ) ) ) {
- $offender = ''; // Blank field if invalid
- }
- if ( count( $types ) == 1 && $types[0] == 'suppress' ) {
- return Xml::inputLabel( $this->msg( 'revdelete-offender' )->text(), 'offender',
- 'mw-log-offender', 20, $offender );
+ if ( count( $types ) == 1 ) {
+ if ( $types[0] == 'suppress' ) {
+ $offender = $this->getRequest()->getVal( 'offender' );
+ $user = User::newFromName( $offender, false );
+ if ( !$user || ( $user->getId() == 0 && !IP::isIPAddress( $offender ) ) ) {
+ $offender = ''; // Blank field if invalid
+ }
+ return Xml::inputLabel( $this->msg( 'revdelete-offender' )->text(), 'offender',
+ 'mw-log-offender', 20, $offender );
+ } else {
+ // Allow extensions to add their own extra inputs
+ $input = '';
+ wfRunHooks( 'LogEventsListGetExtraInputs', array( $types[0], $this, &$input ) );
+ return $input;
+ }
}
return '';
$pager->mLimit = $lim;
}
- $logBody = $pager->getBody();
+ $logBody = null;
+ // Check if we can avoid the DB query all together
+ if ( $page !== '' && !$param['useMaster'] ) {
+ $title = ( $page instanceof Title ) ? $page : Title::newFromText( $page );
+ if ( $title ) {
+ $member = $title->getNamespace() . ':' . $title->getDBkey();
+ if ( !BloomCache::get( 'main' )->check( wfWikiId(), 'TitleHasLogs', $member ) ) {
+ $logBody = '';
+ }
+ } else {
+ $logBody = '';
+ }
+ }
+
+ // Fetch the log rows and build the HTML if needed
+ $logBody = ( $logBody === null ) ? $pager->getBody() : $logBody;
+
$s = '';
if ( $logBody ) {
if ( $msgKey[0] ) {
$dir = $context->getLanguage()->getDir();
- $lang = $context->getLanguage()->getCode();
+ $lang = $context->getLanguage()->getHtmlCode();
$s = Xml::openElement( 'div', array(
'class' => "mw-warning-with-logexcerpt mw-content-$dir",