Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/editor/DifferentialTransactionEditor.php
Show First 20 Lines • Show All 212 Lines • ▼ Show 20 Lines | switch ($xaction->getTransactionType()) { | ||||
$maniphest = 'PhabricatorManiphestApplication'; | $maniphest = 'PhabricatorManiphestApplication'; | ||||
if (PhabricatorApplication::isClassInstalled($maniphest)) { | if (PhabricatorApplication::isClassInstalled($maniphest)) { | ||||
$diff = $this->requireDiff($xaction->getNewValue()); | $diff = $this->requireDiff($xaction->getNewValue()); | ||||
$branch = $diff->getBranch(); | $branch = $diff->getBranch(); | ||||
// No "$", to allow for branches like T123_demo. | // No "$", to allow for branches like T123_demo. | ||||
$match = null; | $match = null; | ||||
if (preg_match('/^T(\d+)/i', $branch, $match)) { | if ($branch !== null && preg_match('/^T(\d+)/i', $branch, $match)) { | ||||
$task_id = $match[1]; | $task_id = $match[1]; | ||||
speck: Please update this to be consistent with the change that lands for D25268#change-HsYn5r9Vm2Ju | |||||
$tasks = id(new ManiphestTaskQuery()) | $tasks = id(new ManiphestTaskQuery()) | ||||
->setViewer($this->getActor()) | ->setViewer($this->getActor()) | ||||
->withIDs(array($task_id)) | ->withIDs(array($task_id)) | ||||
->execute(); | ->execute(); | ||||
if ($tasks) { | if ($tasks) { | ||||
$task = head($tasks); | $task = head($tasks); | ||||
$task_phid = $task->getPHID(); | $task_phid = $task->getPHID(); | ||||
▲ Show 20 Lines • Show All 1,460 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0
Please update this to be consistent with the change that lands for D25268#change-HsYn5r9Vm2Ju