mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-16 03:42:41 +01:00
86c399b657
Summary: Ref T5655. Some discussion in D9839. Generally speaking, `Phabricator{$name}Application` is clearer than `PhabricatorApplication{$name}`. Test Plan: # Pinned and uninstalled some applications. # Applied patch and performed migrations. # Verified that the pinned applications were still pinned and that the uninstalled applications were still uninstalled. # Performed a sanity check on the database contents. Reviewers: btrahan, epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: hach-que, epriestley, Korvin Maniphest Tasks: T5655 Differential Revision: https://secure.phabricator.com/D9982
32 lines
759 B
PHP
32 lines
759 B
PHP
<?php
|
|
|
|
final class PonderQuestionMailReceiver extends PhabricatorObjectMailReceiver {
|
|
|
|
public function isEnabled() {
|
|
$app_class = 'PhabricatorPonderApplication';
|
|
return PhabricatorApplication::isClassInstalled($app_class);
|
|
}
|
|
|
|
protected function getObjectPattern() {
|
|
return 'Q[1-9]\d*';
|
|
}
|
|
|
|
protected function loadObject($pattern, PhabricatorUser $viewer) {
|
|
$id = (int)trim($pattern, 'Q');
|
|
|
|
return id(new PonderQuestionQuery())
|
|
->setViewer($viewer)
|
|
->withIDs(array($id))
|
|
->executeOne();
|
|
}
|
|
|
|
protected function processReceivedObjectMail(
|
|
PhabricatorMetaMTAReceivedMail $mail,
|
|
PhabricatorLiskDAO $object,
|
|
PhabricatorUser $sender) {
|
|
|
|
// TODO: For now, we just drop this mail on the floor.
|
|
|
|
}
|
|
|
|
}
|