[Wikidata-bugs] [Maniphest] [Changed Subscribers] T96478: Provide Lua function to check if an item is a redirect and what the target is

2018-04-26 Thread Jarekt
Jarekt added subscribers: matej_suchanek, Jarekt.Jarekt added a comment.

In T96478#1961396, @matej_suchanek wrote:
Workaround: mw.wikibase.getEntity() always returns the target entity with the new id. So you can do:

local id = ...
local entity = mw.wikibase.getEntity(id)
if id ~= entity.id then
it's redirected
end


Matej, workaround seems to solve the problem. Maybe we should document the way to check for redirects and close this task, or do we want to add short trivial function to mw.wikibase to do the test?TASK DETAILhttps://phabricator.wikimedia.org/T96478EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: JarektCc: Jarekt, matej_suchanek, Ricordisamoa, hoo, Bene, Lydia_Pintscher, Aklapper, Multichill, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, Wikidata-bugs, aude, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Changed Subscribers] T96478: Provide LUA function to check if an item is a redirect an what the target is

2015-06-12 Thread Lydia_Pintscher
Lydia_Pintscher added subscribers: Bene, hoo.

TASK DETAIL
  https://phabricator.wikimedia.org/T96478

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Lydia_Pintscher
Cc: hoo, Bene, Lydia_Pintscher, Aklapper, Multichill, Wikidata-bugs, aude



___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs