Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -1932,7 +1932,7 @@ |
1933 | 1933 | # batch file existence checks for NS_FILE and NS_MEDIA |
1934 | 1934 | if ( $iw == '' && $nt->isAlwaysKnown() ) { |
1935 | 1935 | $this->mOutput->addLink( $nt ); |
1936 | | - $s .= $this->makeKnownLinkHolder( $nt, $text, '', $trail, $prefix ); |
| 1936 | + $s .= $this->makeKnownLinkHolder( $nt, $text, array(), $trail, $prefix ); |
1937 | 1937 | } else { |
1938 | 1938 | # Links will be added to the output link list after checking |
1939 | 1939 | $s .= $holders->makeHolder( $nt, $text, '', $trail, $prefix ); |
— | — | @@ -1964,16 +1964,26 @@ |
1965 | 1965 | * |
1966 | 1966 | * @param $nt Title |
1967 | 1967 | * @param $text String |
1968 | | - * @param $query String |
| 1968 | + * @param $query Array or String |
1969 | 1969 | * @param $trail String |
1970 | 1970 | * @param $prefix String |
1971 | 1971 | * @return String: HTML-wikitext mix oh yuck |
1972 | 1972 | */ |
1973 | | - function makeKnownLinkHolder( $nt, $text = '', $query = '', $trail = '', $prefix = '' ) { |
| 1973 | + function makeKnownLinkHolder( $nt, $text = '', $query = array(), $trail = '', $prefix = '' ) { |
1974 | 1974 | list( $inside, $trail ) = Linker::splitTrail( $trail ); |
| 1975 | + |
| 1976 | + if ( is_string( $query ) ) { |
| 1977 | + $query = wfCgiToArray( $query ); |
| 1978 | + } |
| 1979 | + |
1975 | 1980 | $sk = $this->mOptions->getSkin( $this->mTitle ); |
1976 | | - # FIXME: use link() instead of deprecated makeKnownLinkObj() |
1977 | | - $link = $sk->makeKnownLinkObj( $nt, $text, $query, $inside, $prefix ); |
| 1981 | + |
| 1982 | + if ( $text == '' ) { |
| 1983 | + $text = $sk->linkText( $title ); |
| 1984 | + } |
| 1985 | + |
| 1986 | + $link = $sk->linkKnown( $nt, "$prefix$text$inside", array(), $query ); |
| 1987 | + |
1978 | 1988 | return $this->armorLinks( $link ) . $trail; |
1979 | 1989 | } |
1980 | 1990 | |