Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / applications / packages / query / PhabricatorPackagesQuery.php
blobe7e882bdad53b96634e90da1be11516aa3a1d51e
1 <?php
3 abstract class PhabricatorPackagesQuery
4 extends PhabricatorCursorPagedPolicyAwareQuery {
6 public function getQueryApplicationClass() {
7 return 'PhabricatorPackagesApplication';
10 protected function buildFullKeyClauseParts(
11 AphrontDatabaseConnection $conn,
12 array $full_keys) {
14 $parts = array();
15 foreach ($full_keys as $full_key) {
16 $key_parts = explode('/', $full_key, 2);
18 if (count($key_parts) != 2) {
19 continue;
22 $parts[] = qsprintf(
23 $conn,
24 '(u.publisherKey = %s AND p.packageKey = %s)',
25 $key_parts[0],
26 $key_parts[1]);
29 // If none of the full keys we were provided were valid, we don't
30 // match any results.
31 if (!$parts) {
32 throw new PhabricatorEmptyQueryException();
35 return qsprintf($conn, '%LO', $parts);