From 3e6d537f23bd6b9f6c201bff649e424b5fc59e5f Mon Sep 17 00:00:00 2001 From: GlazerMann Date: Wed, 9 Oct 2019 11:28:27 -0500 Subject: [PATCH] block huge categories (#2189) --- category.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/category.php b/category.php index fdcf1c3a88..3e84d9fbe5 100644 --- a/category.php +++ b/category.php @@ -72,6 +72,11 @@ html_echo(' ', "\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(' ', "\n"); + exit(0); + } shuffle($pages_in_category); $page = new Page(); #$pages_in_category = array('User:DOI bot/Zandbox');