Jason.ji has uploaded a new change for review.
https://gerrit.wikimedia.org/r/281929
Change subject: Update VikiTitleIcon to conform to new TitleIcon 3.0, and fix
deprecated usage of ApiBase->getResultData(). IMPORTANT: This version of
VikiTitleIcon requires TitleIcon 3.0, it will not work with TitleIcon 2.x.
......................................................................
Update VikiTitleIcon to conform to new TitleIcon 3.0, and fix deprecated usage
of ApiBase->getResultData(). IMPORTANT: This version of VikiTitleIcon requires
TitleIcon 3.0, it will not work with TitleIcon 2.x.
Change-Id: Ib8ddff68963510ea74be106c1734e49a1d7f98cf
---
M ApiGetTitleIcons.php
M VikiTitleIcon.php
M extension.json
3 files changed, 10 insertions(+), 8 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VikiTitleIcon
refs/changes/29/281929/1
diff --git a/ApiGetTitleIcons.php b/ApiGetTitleIcons.php
index 3622536..bc081fa 100644
--- a/ApiGetTitleIcons.php
+++ b/ApiGetTitleIcons.php
@@ -29,8 +29,8 @@
public function execute() {
$pageTitle = $this->getMain()->getVal( 'pageTitle' );
- global $TitleIcon_TitleIconPropertyName;
- $myTitleIconName = $TitleIcon_TitleIconPropertyName;
+ global $wgTitleIcon_TitleIconPropertyName;
+ $myTitleIconName = $wgTitleIcon_TitleIconPropertyName;
$pageNameWithSpaces = str_replace( '_', ' ', $pageTitle );
$titleIconWithSpaces = str_replace( '+', ' ', $myTitleIconName
);
@@ -48,7 +48,8 @@
);
$api->execute();
- $data = $api->getResultData();
+ $data = $api->getResult()->getResultData(
+ null, ['BC' => [], 'Types' => [], 'Strip' => 'all'] );
if ( is_array( $data["query"]["results"] ) && count(
$data["query"]["results"] ) == 0 ) {
$this->getResult()->addValue( null,
$this->getModuleName(),
@@ -82,8 +83,8 @@
);
$api->execute();
- $data = $api->getResultData();
-
+ $data = $api->getResult()->getResultData(
+ null, ['BC' => [], 'Types' => [], 'Strip' =>
'all'] );
$keys = array_keys( $data['query']['pages'] );
$key = array_shift( $keys );
@@ -124,7 +125,8 @@
);
$api->execute();
- $data = $api->getResultData();
+ $data = $api->getResult()->getResultData(
+ null, ['BC' => [], 'Types' => [], 'Strip' =>
'all'] );
$keys = array_keys( $data['query']['pages'] );
$key = array_shift( $keys );
$url =
$data["query"]["pages"][$key]["imageinfo"][0]["url"];
diff --git a/VikiTitleIcon.php b/VikiTitleIcon.php
index d94a1a7..18ae619 100644
--- a/VikiTitleIcon.php
+++ b/VikiTitleIcon.php
@@ -70,7 +70,7 @@
$wgExtensionCredits['parserhook'][] = array (
'path' => __FILE__,
'name' => 'VikiTitleIcon',
- 'version' => '1.2',
+ 'version' => '1.3',
'author' => '[http://www.mediawiki.org/wiki/User:Jji Jason Ji]',
'descriptionmsg' => 'vikititleicon-desc',
'url' => 'http://www.mediawiki.org/wiki/Extension:VikiTitleIcon'
diff --git a/extension.json b/extension.json
index 15a42b2..f53580b 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
{
"name": "VikiTitleIcon",
- "version": "1.2",
+ "version": "1.3",
"author": "[http://www.mediawiki.org/wiki/User:Jji Jason Ji]",
"url": "http://www.mediawiki.org/wiki/Extension:VikiTitleIcon",
"descriptionmsg": "vikititleicon-desc",
--
To view, visit https://gerrit.wikimedia.org/r/281929
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib8ddff68963510ea74be106c1734e49a1d7f98cf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VikiTitleIcon
Gerrit-Branch: master
Gerrit-Owner: Jason.ji <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits