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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user