From 53ab57627e0f42e467e8d2ec3188b3c25159c206 Mon Sep 17 00:00:00 2001 From: El RIDO Date: Mon, 12 Dec 2022 21:28:38 +0100 Subject: [PATCH] re-add shuffling paste list --- lib/Data/Filesystem.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/Data/Filesystem.php b/lib/Data/Filesystem.php index 3266f010..19292c8b 100644 --- a/lib/Data/Filesystem.php +++ b/lib/Data/Filesystem.php @@ -367,11 +367,9 @@ class Filesystem extends AbstractData $opened = 0; $limit = $batchsize * 10; // try at most 10 times $batchsize pastes before giving up $time = time(); - foreach ($this->_getPasteIterator() as $file) { - if ($file->isDir()) { - continue; - } - $pasteid = $file->getBasename('.php'); + $files = $this->getAllPastes(); + shuffle($files); + foreach ($files as $pasteid) { if ($this->exists($pasteid)) { $data = $this->read($pasteid); if (