From 0340509d5200b541c74f15e491e221092641f5f0 Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Fri, 9 Apr 2004 23:46:15 +0000 Subject: [PATCH] extended makeKnownLink and makeKnownLinkObj with an aprops variable that can be used to inject arbitrary properties into the anchor tag, RC line diff links have tab indexes --- includes/Skin.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/includes/Skin.php b/includes/Skin.php index 71becedd05..20b98b7f62 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -1269,10 +1269,10 @@ class Skin { return $result; } - function makeKnownLink( $title, $text = "", $query = "", $trail = "" ) { + function makeKnownLink( $title, $text = "", $query = "", $trail = "", $prefix = '',$aprops = '') { $nt = Title::newFromText( $title ); if ($nt) { - return $this->makeKnownLinkObj( Title::newFromText( $title ), $text, $query, $trail ); + return $this->makeKnownLinkObj( Title::newFromText( $title ), $text, $query, $trail, $prefix , $aprops ); } else { wfDebug( "Invalid title passed to Skin::makeKnownLink(): \"$title\"\n" ); return $text == "" ? $title : $text; @@ -1355,7 +1355,7 @@ class Skin { } # Pass a title object, not a title string - function makeKnownLinkObj( &$nt, $text = "", $query = "", $trail = "", $prefix = "" ) + function makeKnownLinkObj( &$nt, $text = "", $query = "", $trail = "", $prefix = "" , $aprops = '') { global $wgOut, $wgTitle; @@ -1383,7 +1383,7 @@ class Skin { $trail = $m[2]; } } - $r = "{$prefix}{$text}{$inside}{$trail}"; + $r = "{$prefix}{$text}{$inside}{$trail}"; wfProfileOut( $fname ); return $r; } @@ -2029,7 +2029,7 @@ class Skin { $diffLink = wfMsg( "diff" ); } else { $diffLink = $this->makeKnownLinkObj( $rc->getTitle(), wfMsg( "diff" ), - "{$curIdEq}&diff={$rc_this_oldid}&oldid={$rc_last_oldid}" ); + "{$curIdEq}&diff={$rc_this_oldid}&oldid={$rc_last_oldid}" ,'' ,'' , ' tabindex="'.$rc->counter.'"'); } $s .= "($diffLink) ("; @@ -2139,7 +2139,7 @@ class Skin { $curLink = wfMsg( "cur" ); } else { $curLink = $this->makeKnownLinkObj( $rc->getTitle(), wfMsg( "cur" ), - "{$curIdEq}&diff=0&oldid={$rc_this_oldid}" ); + "{$curIdEq}&diff=0&oldid={$rc_this_oldid}" ,'' ,'' , ' tabindex="'.$baseRC->counter.'"' ); } # Make "last" link -- 2.20.1