From e9dc03726d1a919183673e0e596f162b02b571a2 Mon Sep 17 00:00:00 2001 From: Igor Rogatty Date: Fri, 9 Dec 2016 10:59:03 +0100 Subject: [PATCH] XW-2415 | set title for RefreshLinksForTitleTask --- controllers/ApiQueryPortableInfobox.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/ApiQueryPortableInfobox.class.php b/controllers/ApiQueryPortableInfobox.class.php index afbf4d9..fc3c1a4 100644 --- a/controllers/ApiQueryPortableInfobox.class.php +++ b/controllers/ApiQueryPortableInfobox.class.php @@ -34,18 +34,17 @@ class ApiQueryPortableInfobox extends ApiQueryBase { $this->sourceLabelsFallback( $infobox, $articleTitle ); $pageSet->getResult()->addValue( [ 'query', 'pages', $id, 'infoboxes', $count ], 'id', $count ); + $pageSet->getResult()->setIndexedTagName( $sl, "sourcelabels" ); $pageSet->getResult()->addValue( [ 'query', 'pages', $id, 'infoboxes', $count ], 'sourcelabels', $sl ); - // TODO is this even needed? Seems to work without this code if ( isset( $infobox[ 'sourcetypes' ] ) ) { $pageSet->getResult()->addValue( [ 'query', 'pages', $id, 'infoboxes', $count ], 'sourcetypes', $infobox[ 'sourcetypes' ] ); } - } } } @@ -65,6 +64,7 @@ class ApiQueryPortableInfobox extends ApiQueryBase { Wikia\Logger\WikiaLogger::instance()->info( 'Portable Infobox ApiQuery sourcelabels fallback' ); $task = new Wikia\Tasks\Tasks\RefreshLinksForTitleTask(); + $task->setTitle( $title ); $task->title( $title ); $task->call( 'refresh' ); $task->wikiId( $wgCityId );