1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

Remove deprecated task subscriber class

Summary: This class is no longer used after D10965.

Test Plan: `grep`

Reviewers: btrahan, epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11133
This commit is contained in:
Joshua Spence 2015-01-03 11:32:14 +11:00
parent 7c2a7d0365
commit c7cd844a07
3 changed files with 1 additions and 64 deletions

View file

@ -0,0 +1 @@
DROP TABLE `{$NAMESPACE}_maniphest`.`maniphest_tasksubscriber`;

View file

@ -1043,7 +1043,6 @@ phutil_register_library_map(array(
'ManiphestTaskStatus' => 'applications/maniphest/constants/ManiphestTaskStatus.php',
'ManiphestTaskStatusDatasource' => 'applications/maniphest/typeahead/ManiphestTaskStatusDatasource.php',
'ManiphestTaskStatusTestCase' => 'applications/maniphest/constants/__tests__/ManiphestTaskStatusTestCase.php',
'ManiphestTaskSubscriber' => 'applications/maniphest/storage/ManiphestTaskSubscriber.php',
'ManiphestTransaction' => 'applications/maniphest/storage/ManiphestTransaction.php',
'ManiphestTransactionComment' => 'applications/maniphest/storage/ManiphestTransactionComment.php',
'ManiphestTransactionEditor' => 'applications/maniphest/editor/ManiphestTransactionEditor.php',
@ -4186,7 +4185,6 @@ phutil_register_library_map(array(
'ManiphestTaskStatus' => 'ManiphestConstants',
'ManiphestTaskStatusDatasource' => 'PhabricatorTypeaheadDatasource',
'ManiphestTaskStatusTestCase' => 'PhabricatorTestCase',
'ManiphestTaskSubscriber' => 'ManiphestDAO',
'ManiphestTransaction' => 'PhabricatorApplicationTransaction',
'ManiphestTransactionComment' => 'PhabricatorApplicationTransactionComment',
'ManiphestTransactionEditor' => 'PhabricatorApplicationTransactionEditor',

View file

@ -1,62 +0,0 @@
<?php
/**
* Deprecated; delete me.
*/
final class ManiphestTaskSubscriber extends ManiphestDAO {
protected $taskPHID;
protected $subscriberPHID;
public function getConfiguration() {
return array(
self::CONFIG_IDS => self::IDS_MANUAL,
self::CONFIG_TIMESTAMPS => false,
self::CONFIG_COLUMN_SCHEMA => array(
'id' => null,
),
self::CONFIG_KEY_SCHEMA => array(
'PRIMARY' => array(
'columns' => array('subscriberPHID', 'taskPHID'),
'unique' => true,
),
'taskPHID' => array(
'columns' => array('taskPHID', 'subscriberPHID'),
'unique' => true,
),
),
);
}
public static function updateTaskSubscribers(ManiphestTask $task) {
$dao = new ManiphestTaskSubscriber();
$conn = $dao->establishConnection('w');
$sql = array();
$subscribers = $task->getCCPHIDs();
$subscribers[] = $task->getOwnerPHID();
$subscribers = array_unique($subscribers);
foreach ($subscribers as $subscriber_phid) {
$sql[] = qsprintf(
$conn,
'(%s, %s)',
$task->getPHID(),
$subscriber_phid);
}
queryfx(
$conn,
'DELETE FROM %T WHERE taskPHID = %s',
$dao->getTableName(),
$task->getPHID());
if ($sql) {
queryfx(
$conn,
'INSERT INTO %T (taskPHID, subscriberPHID) VALUES %Q',
$dao->getTableName(),
implode(', ', $sql));
}
}
}