&$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
$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)
* @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 '';
} elseif ( $offender && IP::isIPAddress( $offender->getName() ) ) {
$qc = array( 'ls_field' => 'target_author_ip', 'ls_value' => $offender->getName() );
}
+ } else {
+ // Allow extensions to add relations to their search types
+ wfRunHooks( 'SpecialLogAddLogSearchRelations', array( $opts->getValue( 'type' ), $this->getRequest(), &$qc ) );
}
# Some log types are only for a 'User:' title but we might have been given