loadOneWhere('callsign = %s', $match[1]); if ($match[2] == '') { $object = $repository; } else if ($repository) { $object = id(new PhabricatorRepositoryCommit())->loadOneWhere( 'repositoryID = %d AND commitIdentifier = %s', $repository->getID(), $match[2]); if (!$object) { try { $object = id(new PhabricatorRepositoryCommit())->loadOneWhere( 'repositoryID = %d AND commitIdentifier LIKE %>', $repository->getID(), $match[2]); } catch (AphrontQueryCountException $ex) { // Ambiguous, no jump. } } } } else if (preg_match('/^d(\d+)$/i', $name, $match)) { $object = id(new DifferentialRevision())->load($match[1]); } else if (preg_match('/^t(\d+)$/i', $name, $match)) { $object = id(new ManiphestTask())->load($match[1]); } if ($object) { return $object->getPHID(); } return null; } }