Module:Database reports/Hot articles and Module:Database reports/Hot articles/sandbox: Difference between pages

(Difference between pages)
Jump to navigation Jump to search
Page 1
Page 2
imported>SD0001
relax validations on articles and days per talk
 
imported>SD0001
sync with main
 
Line 17: Line 17:
return invalid('|project= parameter is unspecified')
return invalid('|project= parameter is unspecified')
end
end
if tonumber(articles) == nil or tonumber(articles) < 1 then
if tonumber(articles) == nil or tonumber(articles) < 5 or tonumber(articles) > 10 then
return invalid('articles must be a number >= 1')
return invalid('articles must be between 5 and 10')
end
end
if tonumber(days) == nil or tonumber(days) < 1 or tonumber(days) > 30 then
if tonumber(days) == nil or tonumber(days) < 1 or tonumber(days) > 7 then
return invalid('days must be between 1 and 30')
return invalid('days must be between 1 and 7')
end
end
if tonumber(red) == nil or tonumber(red) < 1 then
if tonumber(red) == nil or tonumber(red) < 0 then
return invalid('red: threshold must be a number >= 1')
return invalid('red: threshold must be a number >= 1')
end
end
if tonumber(orange) == nil or tonumber(orange) < 1 then
if tonumber(red) == nil or tonumber(red) < 0 then
return invalid('orange: threshold must be a number >= 1')
return invalid('orange: threshold must be a number >= 1')
end
end