/**
* Identical to link(), except $options defaults to 'known'.
+ * @see Linker::link
* @return string
*/
public static function linkKnown(
* frame parameters supplied by the Parser.
* @param array $frameParams The frame parameters
* @param string $query An optional query string to add to description page links
+ * @param Parser|null $parser
* @return array
*/
private static function getImageLinkMTOParams( $frameParams, $query = '', $parser = null ) {
public static function makeThumbLink2( Title $title, $file, $frameParams = array(),
$handlerParams = array(), $time = false, $query = ""
) {
- global $wgStylePath, $wgContLang;
$exists = $file && $file->exists();
# Shortcuts
'href' => $url,
'class' => 'internal',
'title' => wfMessage( 'thumbnail-more' )->text() ),
- Html::element( 'img', array(
- 'src' => $wgStylePath . '/common/images/magnify-clip'
- . ( $wgContLang->isRTL() ? '-rtl' : '' ) . '.png',
- 'width' => 15,
- 'height' => 11,
- 'alt' => "" ) ) ) );
+ "" ) );
}
}
$s .= ' <div class="thumbcaption">' . $zoomIcon . $fp['caption'] . "</div></div></div>";
$thumb15 = $file->transform( $hp15 );
$thumb20 = $file->transform( $hp20 );
- if ( $thumb15 && $thumb15->getUrl() !== $thumb->getUrl() ) {
+ if ( $thumb15 && !$thumb15->isError() && $thumb15->getUrl() !== $thumb->getUrl() ) {
$thumb->responsiveUrls['1.5'] = $thumb15->getUrl();
}
- if ( $thumb20 && $thumb20->getUrl() !== $thumb->getUrl() ) {
+ if ( $thumb20 && !$thumb20->isError() && $thumb20->getUrl() !== $thumb->getUrl() ) {
$thumb->responsiveUrls['2'] = $thumb20->getUrl();
}
}
*
* @param User $user
* @param Revision $rev
- * @param Revision $title
+ * @param Title $title
* @return string HTML fragment
*/
public static function getRevDeleteLink( User $user, Revision $rev, Title $title ) {