2013-07-26 22:52:57 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class PonderAnswerTransaction
|
|
|
|
extends PhabricatorApplicationTransaction {
|
|
|
|
|
2013-07-29 02:23:04 +02:00
|
|
|
const TYPE_CONTENT = 'ponder.answer:content';
|
|
|
|
|
2013-07-26 22:52:57 +02:00
|
|
|
public function getApplicationName() {
|
|
|
|
return 'ponder';
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getTableName() {
|
|
|
|
return 'ponder_answertransaction';
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getApplicationTransactionType() {
|
|
|
|
return PonderPHIDTypeAnswer::TYPECONST;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getApplicationTransactionCommentObject() {
|
|
|
|
return new PonderAnswerTransactionComment();
|
|
|
|
}
|
|
|
|
|
2013-07-29 15:30:07 +02:00
|
|
|
public function getTitleForFeed() {
|
|
|
|
$author_phid = $this->getAuthorPHID();
|
|
|
|
$object_phid = $this->getObjectPHID();
|
|
|
|
|
|
|
|
$old = $this->getOldValue();
|
|
|
|
$new = $this->getNewValue();
|
|
|
|
|
|
|
|
switch ($this->getTransactionType()) {
|
|
|
|
case self::TYPE_CONTENT:
|
|
|
|
// TODO: This is not so good.
|
|
|
|
return pht(
|
|
|
|
'%s edited their answer to %s',
|
|
|
|
$this->renderHandleLink($author_phid),
|
|
|
|
$this->renderHandleLink($object_phid));
|
|
|
|
}
|
|
|
|
|
|
|
|
return $this->getTitle();
|
|
|
|
}
|
2013-07-26 22:52:57 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|