public function getTitle() { $author_phid = $this->getAuthorPHID(); $object_phid = $this->getObjectPHID(); $old = $this->getOldValue(); $new = $this->getNewValue(); $type = $this->getTransactionType(); switch ($type) { case self::TYPE_CONTENT: if ($old === null) { return pht('%s created this paste.', $this->renderHandleLink($author_phid)); } else { return pht('%s edited the content of this paste.', $this->renderHandleLink($author_phid)); } break; case self::TYPE_TITLE: return pht('%s updated the paste\'s title to "%s".', $this->renderHandleLink($author_phid), $new); break; case self::TYPE_LANGUAGE: return pht("%s updated the paste's language.", $this->renderHandleLink($author_phid)); break; case self::TYPE_STATUS: return pht("%s updated the paste's status.", $this->renderHandleLink($author_phid)); break; } return parent::getTitle(); }
public function getTitle() { $author_phid = $this->getAuthorPHID(); $object_phid = $this->getObjectPHID(); $old = $this->getOldValue(); $new = $this->getNewValue(); $type = $this->getTransactionType(); switch ($type) { case self: TYPE_NAME: if ($old === null) { return pht('%s created this blog.', $this->renderHandleLink($author_phid)); } else { return pht('%s updated the blog\'s name to "%s".', $this->renderHandleLink($author_phid), $new); } break; case self::TYPE_DESCRIPTION: return pht('%s updated the blog\'s description.', $this->renderHandleLink($author_phid)); break; case self::TYPE_DOMAIN: return pht('%s updated the blog\'s domain to "%s".', $this->renderHandleLink($author_phid), $new); break; case self::TYPE_SKIN: return pht('%s updated the blog\'s skin to "%s".', $this->renderHandleLink($author_phid), $new); break; } return parent::getTitle(); }
public function getTitle() { $author_phid = $this->getAuthorPHID(); $object_phid = $this->getObjectPHID(); $old = $this->getOldValue(); $new = $this->getNewValue(); $type = $this->getTransactionType(); switch ($type) { case self::TYPE_TITLE: if ($old === null) { return pht('%s created this countdown.', $this->renderHandleLink($author_phid)); } else { return pht('%s renamed this countdown from "%s" to "%s".', $this->renderHandleLink($author_phid), $old, $new); } break; case self::TYPE_DESCRIPTION: if ($old === null) { return pht('%s set the description of this countdown.', $this->renderHandleLink($author_phid)); } else { return pht('%s edited the description of this countdown.', $this->renderHandleLink($author_phid)); } break; case self::TYPE_EPOCH: if ($old === null) { return pht('%s set this countdown to end on %s.', $this->renderHandleLink($author_phid), phabricator_datetime($new, $this->getViewer())); } else { if ($old != $new) { return pht('%s updated this countdown to end on %s.', $this->renderHandleLink($author_phid), phabricator_datetime($new, $this->getViewer())); } } break; } return parent::getTitle(); }
public function getTitle() { $author_phid = $this->getAuthorPHID(); $old = $this->getOldValue(); $new = $this->getNewValue(); $type = $this->getTransactionType(); switch ($type) { case self::TYPE_NAME: if (strlen($old)) { return pht('%s renamed this form from "%s" to "%s".', $this->renderHandleLink($author_phid), $old, $new); } else { return pht('%s named this form "%s".', $this->renderHandleLink($author_phid), $new); } case self::TYPE_PREAMBLE: return pht('%s updated the preamble for this form.', $this->renderHandleLink($author_phid)); case self::TYPE_ORDER: return pht('%s reordered the fields in this form.', $this->renderHandleLink($author_phid)); case self::TYPE_DEFAULT: $key = $this->getMetadataValue('field.key'); return pht('%s changed the default value for field "%s".', $this->renderHandleLink($author_phid), $key); case self::TYPE_LOCKS: return pht('%s changed locked and hidden fields.', $this->renderHandleLink($author_phid)); } return parent::getTitle(); }
public function getTitle() { $old = $this->getOldValue(); $new = $this->getNewValue(); $author_phid = $this->getAuthorPHID(); switch ($this->getTransactionType()) { case self::TYPE_NAME: if ($old === null) { return pht('%s created this space.', $this->renderHandleLink($author_phid)); } else { return pht('%s renamed this space from "%s" to "%s".', $this->renderHandleLink($author_phid), $old, $new); } case self::TYPE_DESCRIPTION: return pht('%s updated the description for this space.', $this->renderHandleLink($author_phid)); case self::TYPE_DEFAULT: return pht('%s made this the default space.', $this->renderHandleLink($author_phid)); case self::TYPE_ARCHIVE: if ($new) { return pht('%s archived this space.', $this->renderHandleLink($author_phid)); } else { return pht('%s activated this space.', $this->renderHandleLink($author_phid)); } } return parent::getTitle(); }
public function getTitle() { $author_phid = $this->getAuthorPHID(); $old = $this->getOldValue(); $new = $this->getNewValue(); switch ($this->getTransactionType()) { case self::TYPE_QUESTION: if ($old === null) { return pht('%s created this poll.', $this->renderHandleLink($author_phid)); } else { return pht('%s changed the poll question from "%s" to "%s".', $this->renderHandleLink($author_phid), $old, $new); } break; case self::TYPE_DESCRIPTION: return pht('%s updated the description for this poll.', $this->renderHandleLink($author_phid)); case self::TYPE_RESPONSES: // TODO: This could be more detailed return pht('%s changed who can see the responses.', $this->renderHandleLink($author_phid)); case self::TYPE_SHUFFLE: if ($new) { return pht('%s made poll responses appear in a random order.', $this->renderHandleLink($author_phid)); } else { return pht('%s made poll responses appear in a fixed order.', $this->renderHandleLink($author_phid)); } break; case self::TYPE_CLOSE: if ($new) { return pht('%s closed this poll.', $this->renderHandleLink($author_phid)); } else { return pht('%s reopened this poll.', $this->renderHandleLink($author_phid)); } break; } return parent::getTitle(); }
public function getTitle() { $author_phid = $this->getAuthorPHID(); $object_phid = $this->getObjectPHID(); $old = $this->getOldValue(); $new = $this->getNewValue(); switch ($this->getTransactionType()) { case self::TYPE_TITLE: if ($old === null) { return pht('%s asked this question.', $this->renderHandleLink($author_phid)); } else { return pht('%s edited the question title from "%s" to "%s".', $this->renderHandleLink($author_phid), $old, $new); } case self::TYPE_CONTENT: return pht('%s edited the question description.', $this->renderHandleLink($author_phid)); case self::TYPE_ANSWERWIKI: return pht('%s edited the question answer wiki.', $this->renderHandleLink($author_phid)); case self::TYPE_ANSWERS: $answer_handle = $this->getHandle($this->getNewAnswerPHID()); $question_handle = $this->getHandle($object_phid); return pht('%s answered %s', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid)); case self::TYPE_STATUS: switch ($new) { case PonderQuestionStatus::STATUS_OPEN: return pht('%s reopened this question.', $this->renderHandleLink($author_phid)); case PonderQuestionStatus::STATUS_CLOSED_RESOLVED: return pht('%s closed this question as resolved.', $this->renderHandleLink($author_phid)); case PonderQuestionStatus::STATUS_CLOSED_OBSOLETE: return pht('%s closed this question as obsolete.', $this->renderHandleLink($author_phid)); case PonderQuestionStatus::STATUS_CLOSED_INVALID: return pht('%s closed this question as invalid.', $this->renderHandleLink($author_phid)); } } return parent::getTitle(); }
public function getTitle() { $author_phid = $this->getAuthorPHID(); $object_phid = $this->getObjectPHID(); $old = $this->getOldValue(); $new = $this->getNewValue(); $type = $this->getTransactionType(); switch ($type) { case self::TYPE_TITLE: if ($old === null) { return pht('%s created this post.', $this->renderHandleLink($author_phid)); } else { return pht('%s updated the post\'s name to "%s".', $this->renderHandleLink($author_phid), $new); } break; case self::TYPE_BODY: return pht('%s updated the post\'s body.', $this->renderHandleLink($author_phid)); break; case self::TYPE_PHAME_TITLE: return pht('%s updated the post\'s phame title to "%s".', $this->renderHandleLink($author_phid), rtrim($new, '/')); break; case self::TYPE_COMMENTS_WIDGET: return pht('%s updated the post\'s comment widget to "%s".', $this->renderHandleLink($author_phid), $new); break; } return parent::getTitle(); }
public function getTitle() { $author_phid = $this->getAuthorPHID(); $old = $this->getOldValue(); $new = $this->getNewValue(); switch ($this->getTransactionType()) { case self::TYPE_NAME: if ($old === null) { return pht('%s created this device.', $this->renderHandleLink($author_phid)); } else { return pht('%s renamed this device from "%s" to "%s".', $this->renderHandleLink($author_phid), $old, $new); } break; case self::TYPE_INTERFACE: if ($old && $new) { return pht('%s changed interface %s on this device to %s.', $this->renderHandleLink($author_phid), $this->describeInterface($old), $this->describeInterface($new)); } else { if ($old) { return pht('%s removed the interface %s from this device.', $this->renderHandleLink($author_phid), $this->describeInterface($new)); } else { if ($new) { return pht('%s added the interface %s to this device.', $this->renderHandleLink($author_phid), $this->describeInterface($new)); } } } } return parent::getTitle(); }
public function getTitle() { $author_phid = $this->getAuthorPHID(); $object_phid = $this->getObjectPHID(); $old = $this->getOldValue(); $new = $this->getNewValue(); $author_link = $this->renderHandleLink($author_phid); $type = $this->getTransactionType(); switch ($type) { case self::TYPE_NAME: if (!strlen($old)) { return pht('%s created this dashboard.', $author_link); } else { return pht('%s renamed this dashboard from "%s" to "%s".', $author_link, $old, $new); } break; case self::TYPE_STATUS: if ($new == PhabricatorDashboard::STATUS_ACTIVE) { return pht('%s activated this dashboard', $author_link); } else { return pht('%s archived this dashboard', $author_link); } break; } return parent::getTitle(); }
public function getTitle() { $author_phid = $this->getAuthorPHID(); $old = $this->getOldValue(); $new = $this->getNewValue(); switch ($this->getTransactionType()) { case self::TYPE_EDIT: // TODO: After T2213 show the actual values too; for now, we don't // have the tools to do it without making a bit of a mess of it. $old_del = idx($old, 'deleted'); $new_del = idx($new, 'deleted'); if ($old_del && !$new_del) { return pht('%s created this configuration entry.', $this->renderHandleLink($author_phid)); } else { if (!$old_del && $new_del) { return pht('%s deleted this configuration entry.', $this->renderHandleLink($author_phid)); } else { if ($old_del && $new_del) { // This is a bug. return pht('%s deleted this configuration entry (again?).', $this->renderHandleLink($author_phid)); } else { return pht('%s edited this configuration entry.', $this->renderHandleLink($author_phid)); } } } break; } return parent::getTitle(); }
public function getTitle() { $author_phid = $this->getAuthorPHID(); $old = $this->getOldValue(); $new = $this->getNewValue(); switch ($this->getTransactionType()) { case self::TYPE_NAME: if ($old === null) { return pht('%s created this account.', $this->renderHandleLink($author_phid)); } else { return pht('%s renamed this account from "%s" to "%s".', $this->renderHandleLink($author_phid), $old, $new); } break; case PhabricatorTransactions::TYPE_EDGE: switch ($this->getMetadataValue('edge:type')) { case PhabricatorEdgeConfig::TYPE_ACCOUNT_HAS_MEMBER: $add = array_diff(array_keys($new), array_keys($old)); $rem = array_diff(array_keys($old), array_keys($new)); if ($add && $rem) { return pht('%s changed account members, added %s; removed %s.', $this->renderHandleLink($author_phid), $this->renderHandleList($add), $this->renderHandleList($rem)); } else { if ($add) { return pht('%s added account members: %s', $this->renderHandleLink($author_phid), $this->renderHandleList($add)); } else { return pht('%s removed account members: %s', $this->renderHandleLink($author_phid), $this->renderHandleList($add)); } } break; } break; } return parent::getTitle(); }
public function getTitle() { $author_phid = $this->getAuthorPHID(); $old = $this->getOldValue(); $new = $this->getNewValue(); switch ($this->getTransactionType()) { case self::TYPE_TITLE: case self::TYPE_TOPIC: case PhabricatorTransactions::TYPE_VIEW_POLICY: case PhabricatorTransactions::TYPE_EDIT_POLICY: case PhabricatorTransactions::TYPE_JOIN_POLICY: case self::TYPE_PICTURE: return $this->getRoomTitle(); break; case self::TYPE_PARTICIPANTS: $add = array_diff($new, $old); $rem = array_diff($old, $new); if ($add && $rem) { $title = pht('%s edited participant(s), added %d: %s; removed %d: %s.', $this->renderHandleLink($author_phid), count($add), $this->renderHandleList($add), count($rem), $this->renderHandleList($rem)); } else { if ($add) { $title = pht('%s added %d participant(s): %s.', $this->renderHandleLink($author_phid), count($add), $this->renderHandleList($add)); } else { $title = pht('%s removed %d participant(s): %s.', $this->renderHandleLink($author_phid), count($rem), $this->renderHandleList($rem)); } } return $title; break; } return parent::getTitle(); }
public function getTitleForFeed() { $author_phid = $this->getAuthorPHID(); $old = $this->getOldValue(); $new = $this->getNewValue(); switch ($this->getTransactionType()) { case self::TYPE_EDIT: $old_del = idx($old, 'deleted'); $new_del = idx($new, 'deleted'); if ($old_del && !$new_del) { return pht('%s created %s.', $this->renderHandleLink($author_phid), $this->getObject()->getConfigKey()); } else { if (!$old_del && $new_del) { return pht('%s deleted %s.', $this->renderHandleLink($author_phid), $this->getObject()->getConfigKey()); } else { if ($old_del && $new_del) { // This is a bug. return pht('%s deleted %s (again?).', $this->renderHandleLink($author_phid), $this->getObject()->getConfigKey()); } else { return pht('%s edited %s.', $this->renderHandleLink($author_phid), $this->getObject()->getConfigKey()); } } } break; } return parent::getTitle(); }
public function getTitle() { $author_phid = $this->getAuthorPHID(); $object_phid = $this->getObjectPHID(); $old = $this->getOldValue(); $new = $this->getNewValue(); switch ($this->getTransactionType()) { case self::TYPE_CONTENT: if ($old === '') { return pht('%s added %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid)); } else { return pht('%s edited %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid)); } break; case self::TYPE_STATUS: if ($new == PonderAnswerStatus::ANSWER_STATUS_VISIBLE) { return pht('%s marked %s as visible.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid)); } else { if ($new == PonderAnswerStatus::ANSWER_STATUS_HIDDEN) { return pht('%s marked %s as hidden.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid)); } } break; } return parent::getTitle(); }
public function getTitle() { $author_phid = $this->getAuthorPHID(); $object_phid = $this->getObjectPHID(); $old = $this->getOldValue(); $new = $this->getNewValue(); $type = $this->getTransactionType(); switch ($type) { case FundInitiativeTransaction::TYPE_NAME: if ($old === null) { return pht('%s created this initiative.', $this->renderHandleLink($author_phid)); } else { return pht('%s renamed this initiative from "%s" to "%s".', $this->renderHandleLink($author_phid), $old, $new); } break; case FundInitiativeTransaction::TYPE_DESCRIPTION: return pht('%s edited the description of this initiative.', $this->renderHandleLink($author_phid)); case FundInitiativeTransaction::TYPE_STATUS: switch ($new) { case FundInitiative::STATUS_OPEN: return pht('%s reopened this initiative.', $this->renderHandleLink($author_phid)); case FundInitiative::STATUS_CLOSED: return pht('%s closed this initiative.', $this->renderHandleLink($author_phid)); } break; } return parent::getTitle(); }
public final function getTitle() { $title = $this->getTransactionImplementation()->getTitle(); if ($title !== null) { return $title; } return parent::getTitle(); }
public function getTitle() { $author_phid = $this->getAuthorPHID(); $object_phid = $this->getObjectPHID(); switch ($this->getTransactionType()) { case self::TYPE_CONTENT: return pht('%s edited %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid)); } return parent::getTitle(); }
public function getTitle() { $author_phid = $this->getAuthorPHID(); $old = $this->getOldValue(); $new = $this->getNewValue(); switch ($this->getTransactionType()) { case self::TYPE_CREATE: return pht('%s created this build step.', $this->renderHandleLink($author_phid)); } return parent::getTitle(); }
public function getTitle() { $author_phid = $this->getAuthorPHID(); switch ($this->getTransactionType()) { case self::TYPE_EDIT_KEY: return pht('%s created this variable.', $this->renderHandleLink($author_phid)); case self::TYPE_EDIT_VALUE: return pht('%s updated this variable.', $this->renderHandleLink($author_phid)); } return parent::getTitle(); }
public function getTitle() { $author_phid = $this->getAuthorPHID(); $old = $this->getOldValue(); $new = $this->getNewValue(); switch ($this->getTransactionType()) { case self::TYPE_NAME: return pht('%s updated the name for this file from "%s" to "%s".', $this->renderHandleLink($author_phid), $old, $new); break; } return parent::getTitle(); }
public function getTitle() { $author_phid = $this->getAuthorPHID(); $object_phid = $this->getObjectPHID(); $old = $this->getOldValue(); $new = $this->getNewValue(); $type = $this->getTransactionType(); switch ($type) { case self::TYPE_NAME: if ($old === null) { return pht('%s created this badge.', $this->renderHandleLink($author_phid)); } else { return pht('%s renamed this badge from "%s" to "%s".', $this->renderHandleLink($author_phid), $old, $new); } break; case self::TYPE_FLAVOR: if ($old === null) { return pht('%s set the flavor text for this badge.', $this->renderHandleLink($author_phid)); } else { return pht('%s updated the flavor text for this badge.', $this->renderHandleLink($author_phid)); } break; case self::TYPE_DESCRIPTION: if ($old === null) { return pht('%s set the description for this badge.', $this->renderHandleLink($author_phid)); } else { return pht('%s updated the description for this badge.', $this->renderHandleLink($author_phid)); } break; case self::TYPE_ICON: if ($old === null) { return pht('%s set the icon for this badge as "%s".', $this->renderHandleLink($author_phid), $new); } else { $icon_map = PhabricatorBadgesBadge::getIconNameMap(); $icon_new = idx($icon_map, $new, $new); $icon_old = idx($icon_map, $old, $old); return pht('%s updated the icon for this badge from "%s" to "%s".', $this->renderHandleLink($author_phid), $icon_old, $icon_new); } break; case self::TYPE_QUALITY: if ($old === null) { return pht('%s set the quality for this badge as "%s".', $this->renderHandleLink($author_phid), $new); } else { $qual_map = PhabricatorBadgesBadge::getQualityNameMap(); $qual_new = idx($qual_map, $new, $new); $qual_old = idx($qual_map, $old, $old); return pht('%s updated the quality for this badge from "%s" to "%s".', $this->renderHandleLink($author_phid), $qual_old, $qual_new); } break; } return parent::getTitle(); }
public function getTitle() { $author_phid = $this->getAuthorPHID(); $old = $this->getOldValue(); $new = $this->getNewValue(); switch ($this->getTransactionType()) { case PhabricatorTransactions::TYPE_CREATE: return pht('%s created this network.', $this->renderHandleLink($author_phid)); case self::TYPE_NAME: return pht('%s renamed this network from "%s" to "%s".', $this->renderHandleLink($author_phid), $old, $new); } return parent::getTitle(); }
public function getTitle() { $author_phid = $this->getAuthorPHID(); switch ($this->getTransactionType()) { case self::TYPE_PROPERTY_UPDATE: $property_key = $this->getMetadataValue('almanac.property'); return pht('%s updated the property "%s".', $this->renderHandleLink($author_phid), $property_key); case self::TYPE_PROPERTY_REMOVE: $property_key = $this->getMetadataValue('almanac.property'); return pht('%s deleted the property "%s".', $this->renderHandleLink($author_phid), $property_key); } return parent::getTitle(); }
public function getTitle() { $author_phid = $this->getAuthorPHID(); $old = $this->getOldValue(); $new = $this->getNewValue(); switch ($this->getTransactionType()) { case self::TYPE_DISABLE: if ($new) { return pht('%s disabled this rule.', $this->renderHandleLink($author_phid)); } else { return pht('%s enabled this rule.', $this->renderHandleLink($author_phid)); } } return parent::getTitle(); }
public function getTitle() { $old = $this->getOldValue(); $new = $this->getNewValue(); $author_handle = $this->renderHandleLink($this->getAuthorPHID()); switch ($this->getTransactionType()) { case self::TYPE_NAME: if (!strlen($old)) { return pht('%s created this blueprint.', $author_handle); } else { return pht('%s renamed this blueprint from "%s" to "%s".', $author_handle, $old, $new); } } return parent::getTitle(); }
public function getTitle() { $author_phid = $this->getAuthorPHID(); $old = $this->getOldValue(); $new = $this->getNewValue(); switch ($this->getTransactionType()) { case self::TYPE_INTERFACE: if ($old === null) { return pht('%s created this binding.', $this->renderHandleLink($author_phid)); } else { return pht('%s changed this binding from %s to %s.', $this->renderHandleLink($author_phid), $this->renderHandleLink($old), $this->renderHandleLink($new)); } break; } return parent::getTitle(); }
public function getTitle() { $author_phid = $this->getAuthorPHID(); $old = $this->getOldValue(); $new = $this->getNewValue(); $type = $this->getTransactionType(); switch ($type) { case LegalpadTransactionType::TYPE_TITLE: return pht('%s renamed this document from "%s" to "%s".', $this->renderHandleLink($author_phid), $old, $new); case LegalpadTransactionType::TYPE_TEXT: return pht("%s updated the document's text.", $this->renderHandleLink($author_phid)); case LegalpadTransactionType::TYPE_PREAMBLE: return pht('%s updated the preamble.', $this->renderHandleLink($author_phid)); } return parent::getTitle(); }
public function getTitle() { $author_phid = $this->getAuthorPHID(); $old = $this->getOldValue(); $new = $this->getNewValue(); switch ($this->getTransactionType()) { case self::TYPE_ACTIVE: if ($new) { return pht('%s activated this product.', $this->renderHandleLink($author_phid)); } else { return pht('%s deactivated this product.', $this->renderHandleLink($author_phid)); } break; } return parent::getTitle(); }
public function getTitle() { $author_phid = $this->getAuthorPHID(); $old = $this->getOldValue(); $new = $this->getNewValue(); switch ($this->getTransactionType()) { case self::TYPE_NAME: if ($old === null) { return pht('%s created this account.', $this->renderHandleLink($author_phid)); } else { return pht('%s renamed this account from "%s" to "%s".', $this->renderHandleLink($author_phid), $old, $new); } break; } return parent::getTitle(); }