Page MenuHomePhabricator

D8778.diff
No OneTemporary

D8778.diff

diff --git a/src/applications/maniphest/controller/ManiphestTaskEditController.php b/src/applications/maniphest/controller/ManiphestTaskEditController.php
--- a/src/applications/maniphest/controller/ManiphestTaskEditController.php
+++ b/src/applications/maniphest/controller/ManiphestTaskEditController.php
@@ -58,7 +58,19 @@
if ($projects) {
$tokens = $request->getStrList('projects');
+ $type_project = PhabricatorProjectPHIDTypeProject::TYPECONST;
foreach ($tokens as $key => $token) {
+ if (phid_get_type($token) == $type_project) {
+ // If this is formatted like a PHID, leave it as-is.
+ continue;
+ }
+
+ if (preg_match('/^#/', $token)) {
+ // If this already has a "#", leave it as-is.
+ continue;
+ }
+
+ // Add a "#" prefix.
$tokens[$key] = '#'.$token;
}

File Metadata

Mime Type
text/plain
Expires
Sat, Feb 1, 6:08 AM (17 h, 21 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7080961
Default Alt Text
D8778.diff (971 B)

Event Timeline