Differential D19814 Diff 47329 src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php
Show First 20 Lines • Show All 445 Lines • ▼ Show 20 Lines | protected function getSVNResult(ConduitAPIRequest $request) { | ||||
$browse = queryfx_all( | $browse = queryfx_all( | ||||
$conn_r, | $conn_r, | ||||
'SELECT *, p.path pathName | 'SELECT *, p.path pathName | ||||
FROM %T f JOIN %T p ON f.pathID = p.id | FROM %T f JOIN %T p ON f.pathID = p.id | ||||
WHERE repositoryID = %d | WHERE repositoryID = %d | ||||
AND parentID = %d | AND parentID = %d | ||||
AND existed = 1 | AND existed = 1 | ||||
AND (%Q) | AND (%LO) | ||||
ORDER BY pathName', | ORDER BY pathName', | ||||
PhabricatorRepository::TABLE_FILESYSTEM, | PhabricatorRepository::TABLE_FILESYSTEM, | ||||
PhabricatorRepository::TABLE_PATH, | PhabricatorRepository::TABLE_PATH, | ||||
$repository->getID(), | $repository->getID(), | ||||
$path_id, | $path_id, | ||||
implode(' OR ', $sql)); | $sql); | ||||
$loadable_commits = array(); | $loadable_commits = array(); | ||||
foreach ($browse as $key => $file) { | foreach ($browse as $key => $file) { | ||||
// We need to strip out directories because we don't store last-modified | // We need to strip out directories because we don't store last-modified | ||||
// in the filesystem table. | // in the filesystem table. | ||||
if ($file['fileType'] != DifferentialChangeType::FILE_DIRECTORY) { | if ($file['fileType'] != DifferentialChangeType::FILE_DIRECTORY) { | ||||
$loadable_commits[] = $file['svnCommit']; | $loadable_commits[] = $file['svnCommit']; | ||||
$browse[$key]['hasCommit'] = true; | $browse[$key]['hasCommit'] = true; | ||||
▲ Show 20 Lines • Show All 78 Lines • Show Last 20 Lines |