Integrate subscriptions with ApplicationTransactions

Summary: Fixes T2214. For objects which support ApplicationTransaction, use ApplicationTransactions to apply subscription action changes. Principally, this makes clicking "Subscribe" / "Unsubscribe" appear correctly in the transaction log.

Test Plan: Clicked "Subscribe" and "Unsubscribe" a on Macros and Mocks.

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2214

Differential Revision: https://secure.phabricator.com/D4986
This commit is contained in:
epriestley
2013-02-17 06:37:09 -08:00
parent 2231e5200a
commit 0ca7c77c10
6 changed files with 90 additions and 13 deletions

View File

@@ -1,7 +1,9 @@
<?php
final class PhabricatorFileImageMacro extends PhabricatorFileDAO
implements PhabricatorSubscribableInterface {
implements
PhabricatorSubscribableInterface,
PhabricatorApplicationTransactionInterface {
protected $filePHID;
protected $phid;
@@ -23,5 +25,13 @@ final class PhabricatorFileImageMacro extends PhabricatorFileDAO
return false;
}
public function getApplicationTransactionEditor() {
return new PhabricatorMacroEditor();
}
public function getApplicationTransactionObject() {
return new PhabricatorMacroTransaction();
}
}