Page MenuHomePhabricator

D10144.diff
No OneTemporary

D10144.diff

diff --git a/src/applications/project/conduit/ProjectQueryConduitAPIMethod.php b/src/applications/project/conduit/ProjectQueryConduitAPIMethod.php
--- a/src/applications/project/conduit/ProjectQueryConduitAPIMethod.php
+++ b/src/applications/project/conduit/ProjectQueryConduitAPIMethod.php
@@ -97,8 +97,9 @@
// TODO: This is pretty hideous.
$slug_map = array();
foreach ($slugs as $slug) {
+ $normal = rtrim(PhabricatorSlug::normalize($slug), '/');
foreach ($projects as $project) {
- if (in_array($slug, $project['slugs'])) {
+ if (in_array($normal, $project['slugs'])) {
$slug_map[$slug] = $project['phid'];
}
}
diff --git a/src/applications/project/query/PhabricatorProjectQuery.php b/src/applications/project/query/PhabricatorProjectQuery.php
--- a/src/applications/project/query/PhabricatorProjectQuery.php
+++ b/src/applications/project/query/PhabricatorProjectQuery.php
@@ -266,10 +266,15 @@
}
if ($this->slugs) {
+ $slugs = array();
+ foreach ($this->slugs as $slug) {
+ $slugs[] = rtrim(PhabricatorSlug::normalize($slug), '/');
+ }
+
$where[] = qsprintf(
$conn_r,
'slug.slug IN (%Ls)',
- $this->slugs);
+ $slugs);
}
if ($this->phrictionSlugs) {

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 5:06 AM (18 h, 3 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6912833
Default Alt Text
D10144.diff (1 KB)

Event Timeline