Content deleted Content added
Some nil protection, more to come |
No edit summary |
||
Line 48:
if(not (reference == nil or reference == "")) then
local cite = "{{cite web|url="..reference;
local timestamp = nil;
local publisher = nil;
local title = nil;
end;
local title = reviewscore['references'][1]['snaks']['P1476'][1]['datavalue']['value']['text'];▼
if(not (reviewscore['references'][1]['snaks']['P123'] == nil or reviewscore['references'][1]['snaks']['P123'][1] == nil)) then
publisher = mw.wikibase.label('Q'..reviewscore['references'][1]['snaks']['P123'][1]['datavalue']['value']['numeric-id']);
end;
if(not (reviewscore['references'][1]['snaks']['P1476'] == nil or reviewscore['references'][1]['snaks']['P1476'][1] == nil)) then
end;
if(not(title == nil or title == "")) then
cite = cite .. "|title="..title;
end;
if(not(publisher == nil or publisher == "")) then
cite = cite .. "|publisher="..publisher;
end;
if(not(timestamp == nil or timestamp == "")) then
local year = string.sub(timestamp,2,5);
|