diff --git a/resources/sql/autopatches/20150829.ponder.dupe.1.sql b/resources/sql/autopatches/20150829.ponder.dupe.1.sql new file mode 100644 --- /dev/null +++ b/resources/sql/autopatches/20150829.ponder.dupe.1.sql @@ -0,0 +1,2 @@ +UPDATE {$NAMESPACE}_ponder.ponder_question + SET status = 'invalid' WHERE status = 'duplicate'; diff --git a/src/applications/ponder/constants/PonderQuestionStatus.php b/src/applications/ponder/constants/PonderQuestionStatus.php --- a/src/applications/ponder/constants/PonderQuestionStatus.php +++ b/src/applications/ponder/constants/PonderQuestionStatus.php @@ -5,14 +5,14 @@ const STATUS_OPEN = 'open'; const STATUS_CLOSED_RESOLVED = 'resolved'; const STATUS_CLOSED_OBSOLETE = 'obsolete'; - const STATUS_CLOSED_DUPLICATE = 'duplicate'; + const STATUS_CLOSED_INVALID = 'invalid'; public static function getQuestionStatusMap() { return array( self::STATUS_OPEN => pht('Open'), self::STATUS_CLOSED_RESOLVED => pht('Closed, Resolved'), self::STATUS_CLOSED_OBSOLETE => pht('Closed, Obsolete'), - self::STATUS_CLOSED_DUPLICATE => pht('Closed, Duplicate'), + self::STATUS_CLOSED_INVALID => pht('Closed, Invalid'), ); } @@ -21,7 +21,7 @@ self::STATUS_OPEN => pht('Open'), self::STATUS_CLOSED_RESOLVED => pht('Closed, Resolved'), self::STATUS_CLOSED_OBSOLETE => pht('Closed, Obsolete'), - self::STATUS_CLOSED_DUPLICATE => pht('Closed, Duplicate'), + self::STATUS_CLOSED_INVALID => pht('Closed, Invalid'), ); return idx($map, $status, pht('Unknown')); } @@ -31,7 +31,7 @@ self::STATUS_OPEN => pht('Open'), self::STATUS_CLOSED_RESOLVED => pht('Resolved'), self::STATUS_CLOSED_OBSOLETE => pht('Obsolete'), - self::STATUS_CLOSED_DUPLICATE => pht('Duplicate'), + self::STATUS_CLOSED_INVALID => pht('Invalid'), ); return idx($map, $status, pht('Unknown')); } @@ -43,9 +43,9 @@ self::STATUS_CLOSED_RESOLVED => pht('This question has been answered or resolved.'), self::STATUS_CLOSED_OBSOLETE => - pht('This question is no longer valid or out of date.'), - self::STATUS_CLOSED_DUPLICATE => - pht('This question is a duplicate of another question.'), + pht('This question is out of date.'), + self::STATUS_CLOSED_INVALID => + pht('This question is invalid.'), ); return idx($map, $status, pht('Unknown')); } @@ -55,7 +55,7 @@ self::STATUS_OPEN => PHUITagView::COLOR_BLUE, self::STATUS_CLOSED_RESOLVED => PHUITagView::COLOR_BLACK, self::STATUS_CLOSED_OBSOLETE => PHUITagView::COLOR_BLACK, - self::STATUS_CLOSED_DUPLICATE => PHUITagView::COLOR_BLACK, + self::STATUS_CLOSED_INVALID => PHUITagView::COLOR_BLACK, ); return idx($map, $status); @@ -66,7 +66,7 @@ self::STATUS_OPEN => 'fa-question-circle', self::STATUS_CLOSED_RESOLVED => 'fa-check', self::STATUS_CLOSED_OBSOLETE => 'fa-ban', - self::STATUS_CLOSED_DUPLICATE => 'fa-clone', + self::STATUS_CLOSED_INVALID => 'fa-ban', ); return idx($map, $status); @@ -82,7 +82,7 @@ return array( self::STATUS_CLOSED_RESOLVED, self::STATUS_CLOSED_OBSOLETE, - self::STATUS_CLOSED_DUPLICATE, + self::STATUS_CLOSED_INVALID, ); } diff --git a/src/applications/ponder/storage/PonderQuestionTransaction.php b/src/applications/ponder/storage/PonderQuestionTransaction.php --- a/src/applications/ponder/storage/PonderQuestionTransaction.php +++ b/src/applications/ponder/storage/PonderQuestionTransaction.php @@ -100,9 +100,9 @@ return pht( '%s closed this question as obsolete.', $this->renderHandleLink($author_phid)); - case PonderQuestionStatus::STATUS_CLOSED_DUPLICATE: + case PonderQuestionStatus::STATUS_CLOSED_INVALID: return pht( - '%s closed this question as a duplicate.', + '%s closed this question as invalid.', $this->renderHandleLink($author_phid)); } } @@ -272,9 +272,9 @@ '%s closed %s as resolved.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid)); - case PonderQuestionStatus::STATUS_CLOSED_DUPLICATE: + case PonderQuestionStatus::STATUS_CLOSED_INVALID: return pht( - '%s closed %s as duplicate.', + '%s closed %s as invalid.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid)); case PonderQuestionStatus::STATUS_CLOSED_OBSOLETE: