mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-22 03:29:11 +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:
parent
7c2a7d0365
commit
c7cd844a07
3 changed files with 1 additions and 64 deletions
1
resources/sql/autopatches/20150102.tasksubscriber.sql
Normal file
1
resources/sql/autopatches/20150102.tasksubscriber.sql
Normal file
|
@ -0,0 +1 @@
|
||||||
|
DROP TABLE `{$NAMESPACE}_maniphest`.`maniphest_tasksubscriber`;
|
|
@ -1043,7 +1043,6 @@ phutil_register_library_map(array(
|
||||||
'ManiphestTaskStatus' => 'applications/maniphest/constants/ManiphestTaskStatus.php',
|
'ManiphestTaskStatus' => 'applications/maniphest/constants/ManiphestTaskStatus.php',
|
||||||
'ManiphestTaskStatusDatasource' => 'applications/maniphest/typeahead/ManiphestTaskStatusDatasource.php',
|
'ManiphestTaskStatusDatasource' => 'applications/maniphest/typeahead/ManiphestTaskStatusDatasource.php',
|
||||||
'ManiphestTaskStatusTestCase' => 'applications/maniphest/constants/__tests__/ManiphestTaskStatusTestCase.php',
|
'ManiphestTaskStatusTestCase' => 'applications/maniphest/constants/__tests__/ManiphestTaskStatusTestCase.php',
|
||||||
'ManiphestTaskSubscriber' => 'applications/maniphest/storage/ManiphestTaskSubscriber.php',
|
|
||||||
'ManiphestTransaction' => 'applications/maniphest/storage/ManiphestTransaction.php',
|
'ManiphestTransaction' => 'applications/maniphest/storage/ManiphestTransaction.php',
|
||||||
'ManiphestTransactionComment' => 'applications/maniphest/storage/ManiphestTransactionComment.php',
|
'ManiphestTransactionComment' => 'applications/maniphest/storage/ManiphestTransactionComment.php',
|
||||||
'ManiphestTransactionEditor' => 'applications/maniphest/editor/ManiphestTransactionEditor.php',
|
'ManiphestTransactionEditor' => 'applications/maniphest/editor/ManiphestTransactionEditor.php',
|
||||||
|
@ -4186,7 +4185,6 @@ phutil_register_library_map(array(
|
||||||
'ManiphestTaskStatus' => 'ManiphestConstants',
|
'ManiphestTaskStatus' => 'ManiphestConstants',
|
||||||
'ManiphestTaskStatusDatasource' => 'PhabricatorTypeaheadDatasource',
|
'ManiphestTaskStatusDatasource' => 'PhabricatorTypeaheadDatasource',
|
||||||
'ManiphestTaskStatusTestCase' => 'PhabricatorTestCase',
|
'ManiphestTaskStatusTestCase' => 'PhabricatorTestCase',
|
||||||
'ManiphestTaskSubscriber' => 'ManiphestDAO',
|
|
||||||
'ManiphestTransaction' => 'PhabricatorApplicationTransaction',
|
'ManiphestTransaction' => 'PhabricatorApplicationTransaction',
|
||||||
'ManiphestTransactionComment' => 'PhabricatorApplicationTransactionComment',
|
'ManiphestTransactionComment' => 'PhabricatorApplicationTransactionComment',
|
||||||
'ManiphestTransactionEditor' => 'PhabricatorApplicationTransactionEditor',
|
'ManiphestTransactionEditor' => 'PhabricatorApplicationTransactionEditor',
|
||||||
|
|
|
@ -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));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Loading…
Add table
Reference in a new issue