Admin/Screenshots

* restrict ability to irrevocably delete files to U_GROUP_ADMIN
Pages/Quests
 * be a tad more lenient when filtering excessive sources
This commit is contained in:
Sarjuuk
2017-03-13 15:10:02 +01:00
parent 0c492531b8
commit e1fd2db64d
2 changed files with 3 additions and 3 deletions

View File

@@ -218,7 +218,7 @@ class AjaxAdmin extends AjaxHandler
foreach ($this->_get['id'] as $id) foreach ($this->_get['id'] as $id)
{ {
// irrevocably remove already deleted files // 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); DB::Aowow()->query('DELETE FROM ?_screenshots WHERE id = ?d', $id);
if (file_exists(sprintf($path, 'pending', $id))) if (file_exists(sprintf($path, 'pending', $id)))

View File

@@ -551,7 +551,7 @@ class QuestPage extends GenericPage
.. filter sources for low drop chance? .. filter sources for low drop chance?
for the moment: 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 always filter sources with <1% chance
*/ */
@@ -570,7 +570,7 @@ class QuestPage extends GenericPage
if ($data['percent'] < 1.0) if ($data['percent'] < 1.0)
continue; continue;
if ($nSources > 10 && $data['percent'] < 90.0) if ($nSources > 10 && $data['percent'] < 80.0)
continue; continue;
switch ($file) switch ($file)