From e1fd2db64d1222a54ab46363906cde56677085c2 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Mon, 13 Mar 2017 15:10:02 +0100 Subject: [PATCH] Admin/Screenshots * restrict ability to irrevocably delete files to U_GROUP_ADMIN Pages/Quests * be a tad more lenient when filtering excessive sources --- includes/ajaxHandler/admin.class.php | 2 +- pages/quest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/ajaxHandler/admin.class.php b/includes/ajaxHandler/admin.class.php index ee2075c7..32087304 100644 --- a/includes/ajaxHandler/admin.class.php +++ b/includes/ajaxHandler/admin.class.php @@ -218,7 +218,7 @@ class AjaxAdmin extends AjaxHandler foreach ($this->_get['id'] as $id) { // irrevocably remove already deleted files - if (DB::Aowow()->selectCell('SELECT 1 FROM ?_screenshots WHERE status & ?d AND id = ?d', CC_FLAG_DELETED, $id)) + if (User::isInGroup(U_GROUP_ADMIN) && DB::Aowow()->selectCell('SELECT 1 FROM ?_screenshots WHERE status & ?d AND id = ?d', CC_FLAG_DELETED, $id)) { DB::Aowow()->query('DELETE FROM ?_screenshots WHERE id = ?d', $id); if (file_exists(sprintf($path, 'pending', $id))) diff --git a/pages/quest.php b/pages/quest.php index dd4a4aa7..6320e2a7 100644 --- a/pages/quest.php +++ b/pages/quest.php @@ -551,7 +551,7 @@ class QuestPage extends GenericPage .. filter sources for low drop chance? for the moment: - if an item has >10 sources, only display sources with >90% chance + if an item has >10 sources, only display sources with >80% chance always filter sources with <1% chance */ @@ -570,7 +570,7 @@ class QuestPage extends GenericPage if ($data['percent'] < 1.0) continue; - if ($nSources > 10 && $data['percent'] < 90.0) + if ($nSources > 10 && $data['percent'] < 80.0) continue; switch ($file)