Skip to content

Commit

Permalink
Add comments re duplication of code.
Browse files Browse the repository at this point in the history
(Leave extraction + merge to some other day.)
  • Loading branch information
jmdyck committed Jan 22, 2017
1 parent 778233e commit 35ed67a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions pinc/LPage.inc
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ the project will automatically be made unavailable.";

// Now determine whether the project as a whole should be marked bad.
// We need 10 or more bad pages reported by 3 or more distinct users.
// (Note duplication of code with pages_indicate_bad_project() in automodify.php)

$n_bad_pages =
Project_getNumPagesInState(
Expand Down
2 changes: 2 additions & 0 deletions tools/project_manager/automodify.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ function pages_indicate_bad_project( $projectid, $round )
{
global $trace;

// (Note duplication of code with LPage::markAsBad in LPage.inc)

// If it has no bad pages, it's good.
//
$n_bad_pages = Project_getNumPagesInState($projectid,$round->page_bad_state);
Expand Down

0 comments on commit 35ed67a

Please sign in to comment.