From 778233e9ec93eed8ab4ef040ba8ea40eedc18902 Mon Sep 17 00:00:00 2001 From: Michael Dyck Date: Sun, 22 Jan 2017 13:52:10 -0500 Subject: [PATCH] Fix ancient bug re marking projects bad. When pgdp.net first introduced bad pages (back in the R1/R2 days), the two rounds had quite different criteria for how bad pages caused a project to be marked bad. Over time, the criteria became more alike, but pages_indicate_bad_project() retained an if-stmt to add a special case for R2 (round_number == 2), such that a project was deemed bad if it had at least one bad page and no available pages. When pgdp.net changed to 4 rounds in June 2005, we should have done something to eliminate the R2-specificity of this code, but didn't. So it became a bug that lay unnoticed until a week or so ago, when Walt Farrell spotted it, after its effect in P2 was observed in projectID57affd75eab72. There are various ways one could fix the bug (i.e., eliminate the 'round 2' specificity), but the least-impact approach is probably to simply delete the special case code, which is what this commit does. --- tools/project_manager/automodify.php | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/tools/project_manager/automodify.php b/tools/project_manager/automodify.php index cd70eefa46..99821180d7 100644 --- a/tools/project_manager/automodify.php +++ b/tools/project_manager/automodify.php @@ -69,16 +69,6 @@ function pages_indicate_bad_project( $projectid, $round ) if ($n_bad_pages >= 10 && $n_unique_reporters >= 3) return TRUE; - // In round 2, if it has any bad pages - // and no available pages, it's bad. - // - if ($round->round_number == 2) - { - $n_avail_pages = Project_getNumPagesInState($projectid,$round->page_avail_state); - if ($trace) echo "n_avail_pages = $n_avail_pages\n"; - if ($n_avail_pages == 0) return TRUE; - } - // Otherwise, it's good. // return FALSE;