Skip to content

Commit

Permalink
block huge categories (#2189)
Browse files Browse the repository at this point in the history
  • Loading branch information
GlazerMann committed Oct 9, 2019
1 parent 9fda356 commit 3e6d537
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions category.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@
html_echo(' </pre></body></html>', "\n");
exit(0);
}
if (count($pages_in_category) > 10000) {
echo('Category is huge. Cancelling run. Pick a smaller category. Listen to Obi-Wan Kenobi: You want to go home and rethink your life.');
html_echo(' </pre></body></html>', "\n");
exit(0);
}
shuffle($pages_in_category);
$page = new Page();
#$pages_in_category = array('User:DOI bot/Zandbox');
Expand Down

0 comments on commit 3e6d537

Please sign in to comment.