parser: Remove unused $query param from LinkHolderArray::makeHolder
We know it's never anything but an empty array: https://codesearch.wmflabs.org/search/?q=makeHolder Change-Id: Ibc230ec1a1a15a9a5dc61abe5b989a3391d671c1
This commit is contained in:
parent
7c2d4ca8a3
commit
231bcef6af
3 changed files with 2 additions and 9 deletions
|
|
@ -130,12 +130,11 @@ class LinkHolderArray {
|
|||
*
|
||||
* @param Title $nt
|
||||
* @param string $text
|
||||
* @param array $query [optional]
|
||||
* @param string $trail [optional]
|
||||
* @param string $prefix [optional]
|
||||
* @return string
|
||||
*/
|
||||
public function makeHolder( Title $nt, $text = '', $query = [], $trail = '', $prefix = '' ) {
|
||||
public function makeHolder( Title $nt, $text = '', $trail = '', $prefix = '' ) {
|
||||
# Separate the link trail from the rest of the link
|
||||
list( $inside, $trail ) = Linker::splitTrail( $trail );
|
||||
|
||||
|
|
@ -145,9 +144,6 @@ class LinkHolderArray {
|
|||
'text' => $prefix . $text . $inside,
|
||||
'pdbk' => $nt->getPrefixedDBkey(),
|
||||
];
|
||||
if ( $query !== [] ) {
|
||||
$entry['query'] = $query;
|
||||
}
|
||||
|
||||
$this->size++;
|
||||
if ( $nt->isExternal() ) {
|
||||
|
|
|
|||
|
|
@ -2684,7 +2684,7 @@ class Parser {
|
|||
$s .= $this->makeKnownLinkHolder( $nt, $text, $trail, $prefix );
|
||||
} else {
|
||||
# Links will be added to the output link list after checking
|
||||
$s .= $holders->makeHolder( $nt, $text, [], $trail, $prefix );
|
||||
$s .= $holders->makeHolder( $nt, $text, $trail, $prefix );
|
||||
}
|
||||
}
|
||||
return $holders;
|
||||
|
|
|
|||
|
|
@ -62,7 +62,6 @@ class LinkHolderArrayIntegrationTest extends MediaWikiLangTestCase {
|
|||
$result = $link->makeHolder(
|
||||
$title,
|
||||
'test1 text',
|
||||
[ 'mock query' ],
|
||||
'test2 trail',
|
||||
'test3 prefix'
|
||||
);
|
||||
|
|
@ -76,7 +75,6 @@ class LinkHolderArrayIntegrationTest extends MediaWikiLangTestCase {
|
|||
'title' => $title,
|
||||
'text' => 'test3 prefixtest1 texttest',
|
||||
'pdbk' => $nsText,
|
||||
'query' => [ 'mock query' ],
|
||||
],
|
||||
],
|
||||
$link->interwikis
|
||||
|
|
@ -90,7 +88,6 @@ class LinkHolderArrayIntegrationTest extends MediaWikiLangTestCase {
|
|||
'title' => $title,
|
||||
'text' => 'test3 prefixtest1 texttest',
|
||||
'pdbk' => $nsText,
|
||||
'query' => [ 'mock query' ],
|
||||
],
|
||||
],
|
||||
],
|
||||
|
|
|
|||
Loading…
Reference in a new issue