=== Configuration changes in 1.24 ===
=== New features in 1.24 ===
+* Added a new hook, "WhatLinksHereProps", to allow extensions to annotate
+ WhatLinksHere entries.
=== Bug fixes in 1.24 ===
* (bug 62258) A bug was fixed in File::getUnscaledThumb when a height
&$expire: Cookie expiration, as for PHP's setcookie()
$options: Options passed to WebResponse::setcookie()
+'WhatLinksHereProps': Allows annotations to be added to WhatLinksHere
+$row: The DB row of the entry.
+$title: The Title of the page where the link comes FROM
+$target: The Title of the page where the link goes TO
+&$props: Array of HTML strings to display after the title.
+
'WikiExporter::dumpStableQuery': Get the SELECT query for "stable" revisions
dumps. One, and only one hook should set this, and return false.
&$tables: Database tables to use in the SELECT query
$nt = Title::makeTitle( $row->page_namespace, $row->page_title );
if ( $row->rd_from && $level < 2 ) {
- $out->addHTML( $this->listItem( $row, $nt, true ) );
+ $out->addHTML( $this->listItem( $row, $nt, $target, true ) );
$this->showIndirectLinks( $level + 1, $nt, $wgMaxRedirectLinksRetrieved );
$out->addHTML( Xml::closeElement( 'li' ) );
} else {
- $out->addHTML( $this->listItem( $row, $nt ) );
+ $out->addHTML( $this->listItem( $row, $nt, $target ) );
}
}
return Xml::openElement( 'ul', ( $level ? array() : array( 'id' => 'mw-whatlinkshere-list' ) ) );
}
- protected function listItem( $row, $nt, $notClose = false ) {
+ protected function listItem( $row, $nt, $target, $notClose = false ) {
$dirmark = $this->getLanguage()->getDirMark();
# local message cache
$props[] = $msgcache['isimage'];
}
+ wfRunHooks( 'WhatLinksHereProps', array( $row, $nt, $target, &$props ) );
+
if ( count( $props ) ) {
$propsText = $this->msg( 'parentheses' )
->rawParams( implode( $msgcache['semicolon-separator'], $props ) )->escaped();