/**
* Pass a title object, not a title string
+ * @param object Title of target page
+ * @param string Text to replace the title
+ * @param string Link target
+ * @param string Text after link
+ * @param string Text before link text
+ * @param string Extra attributes to the a-element
+ * @return the a-element
*/
function makeKnownLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' , $aprops = '' ) {
global $wgTitle;
$text = htmlspecialchars( $nt->getPrefixedText() );
}
$style = $this->getInternalLinkAttributesObj( $nt, $text );
+
+ if ( $aprops !== '' ) $aprops = ' ' . $aprops;
list( $inside, $trail ) = Linker::splitTrail( $trail );
$r = "<a href=\"{$u}\"{$style}{$aprops}>{$prefix}{$text}{$inside}</a>{$trail}";
*/
function makeSizeLinkObj( $size, $nt, $text = '', $query = '', $trail = '', $prefix = '' ) {
global $wgUser;
- $threshold = IntVal( $wgUser->getOption( 'stubthreshold' ) );
+ $threshold = intval( $wgUser->getOption( 'stubthreshold' ) );
if( $size < $threshold ) {
return $this->makeStubLinkObj( $nt, $text, $query, $trail, $prefix );
} else {
}
return $prefix.$this->makeThumbLinkObj( $img, $label, $alt, $align, $width, $height, $framed, $manual_thumb ).$postfix;
+ }
- } elseif ( $width ) {
+ if ( $width && $img->exists() ) {
# Create a resized image, without the additional thumbnail
# features
if( $img->exists() ) {
$url = $img->getURL();
if( $nourl ) {
- $url = str_replace( "http://", "http-noparse://", $url );
+ $url = str_replace( "http://", UNIQ_PREFIX . "NOPARSEhttp://", $url );
}
$class = 'internal';
} else {