Module:Database reports/Hot articles and Module:Database reports/Hot articles/sandbox: Difference between pages
(Difference between pages)
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) < | if tonumber(articles) == nil or tonumber(articles) < 5 or tonumber(articles) > 10 then | ||
return invalid('articles must be | return invalid('articles must be between 5 and 10') | ||
end | end | ||
if tonumber(days) == nil or tonumber(days) < 1 or tonumber(days) > | if tonumber(days) == nil or tonumber(days) < 1 or tonumber(days) > 7 then | ||
return invalid('days must be between 1 and | return invalid('days must be between 1 and 7') | ||
end | end | ||
if tonumber(red) == nil or tonumber(red) < | 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( | 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 | ||