Fix displaying of user status

Summary:
This fixes two separate issues:

# `getTextStatus()` is used for machine readable data in handles and user.info method. Broken since D3810.
# Status may contain date. Broken since beginning but masked by the fact that CSS ignores unknown class names.

Test Plan:
Displayed revision with reviewer away.
Called `user.addstatus`.
Edited status in calendar.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

CC: nh, aran, Korvin

Differential Revision: https://secure.phabricator.com/D4275
This commit is contained in:
vrana
2012-12-21 16:02:31 -08:00
parent 1264e38541
commit f2639e528c
5 changed files with 23 additions and 9 deletions

View File

@@ -12,6 +12,7 @@ final class PhabricatorObjectHandle {
private $timestamp;
private $alternateID;
private $status = PhabricatorObjectHandleStatus::STATUS_OPEN;
private $title;
private $complete;
private $disabled;
@@ -51,6 +52,11 @@ final class PhabricatorObjectHandle {
return $this->status;
}
public function setTitle($title) {
$this->title = $title;
return $this;
}
public function setFullName($full_name) {
$this->fullName = $full_name;
return $this;
@@ -176,7 +182,7 @@ final class PhabricatorObjectHandle {
if ($this->status != PhabricatorObjectHandleStatus::STATUS_OPEN) {
$class .= ' handle-status-'.$this->status;
$title = $this->status;
$title = (isset($this->title) ? $this->title : $this->status);
}
if ($this->disabled) {