global $wgUser;
$threshold = intval( $wgUser->getOption( 'stubthreshold' ) );
$colour = ( $size < $threshold ) ? 'stub' : '';
+ // FIXME: replace deprecated makeColouredLinkObj by link()
return $this->makeColouredLinkObj( $nt, $colour, $text, $query, $trail, $prefix );
}
if( preg_match( '/^' . $medians . '(.*)$/i', $match[1], $submatch ) ) {
# Media link; trail not supported.
$linkRegexp = '/\[\[(.*?)\]\]/';
- $thelink = $this->makeMediaLink( $submatch[1], "", $text );
+ $title = Title::makeTitleSafe( NS_FILE, $submatch[1] );
+ $thelink = $this->makeMediaLinkObj( $title, $text );
} else {
# Other kind of link
if( preg_match( $wgContLang->linkTrail(), $match[4], $submatch ) ) {
} else $style = '';
return $this->makeKnownLinkObj( $nt, $text, $query, $trail, $prefix, '', $style );
}
+
/** Obsolete alias */
function makeImage( $url, $alt = '' ) {
wfDeprecated( __METHOD__ );
* Used to generate section edit links that point to "other" pages
* (sections that are really part of included pages).
*
+ * @deprecated use Linker::doEditSectionLink()
* @param $title Title string.
* @param $section Integer: section number.
*/
}
/**
+ * @deprecated use Linker::doEditSectionLink()
* @param $nt Title object.
* @param $section Integer: section number.
* @param $hint Link String: title, or default if omitted or empty
if( $file->exists() ) {
$dlink = $sk->linkKnown( $file->getTitle() );
if ( $file->allowInlineDisplay() ) {
+ // FIXME: replace deprecated makeImageLinkObj by link()
$dlink2 = $sk->makeImageLinkObj( $file->getTitle(), wfMsgExt( 'fileexists-thumb', 'parseinline' ),
$file->getName(), $align, array(), false, true );
} elseif ( !$file->allowInlineDisplay() && $file->isSafeFile() ) {
# It's not forbidden but in 99% it makes no sense to upload the same filename with uppercase extension
$dlink = $sk->linkKnown( $nt_lc );
if ( $file_lc->allowInlineDisplay() ) {
+ // FIXME: replace deprecated makeImageLinkObj by link()
$dlink2 = $sk->makeImageLinkObj( $nt_lc, wfMsgExt( 'fileexists-thumb', 'parseinline' ),
$nt_lc->getText(), $align, array(), false, true );
} elseif ( !$file_lc->allowInlineDisplay() && $file_lc->isSafeFile() ) {
# Check if an image without leading '180px-' (or similiar) exists
$dlink = $sk->linkKnown( $nt_thb );
if ( $file_thb->allowInlineDisplay() ) {
+ // FIXME: replace deprecated makeImageLinkObj by link()
$dlink2 = $sk->makeImageLinkObj( $nt_thb,
wfMsgExt( 'fileexists-thumb', 'parseinline' ),
$nt_thb->getText(), $align, array(), false, true );