Adds Skin::makeSelfLinkObj. These all have some duplicate code for dealing
with link trails and the link and could probably be folded together more.
}
if( ( $nt->getPrefixedText() == $this->mTitle->getPrefixedText() ) &&
( strpos( $link, "#" ) == FALSE ) ) {
- $s .= $prefix . "<strong>" . $text . "</strong>" . $trail;
+ # Self-links are handled specially; generally de-link and change to bold.
+ $s .= $prefix . $sk->makeSelfLinkObj( $nt, $text, "", $trail );
return $s;
}
}
return $s;
}
+
+ function makeSelfLinkObj( &$nt, $text = "", $query = "", $trail = "", $prefix = "" )
+ {
+ $u = $nt->escapeLocalURL( $query );
+ if ( "" == $text ) {
+ $text = htmlspecialchars( $nt->getPrefixedText() );
+ }
+ $inside = "";
+ if ( "" != $trail ) {
+ if ( preg_match( $this->linktrail, $trail, $m ) ) {
+ $inside = $m[1];
+ $trail = $m[2];
+ }
+ }
+ return "<strong>{$prefix}{$text}{$inside}</strong>{$trail}";
+ }
function fnamePart( $url )
{