Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/phid/PhabricatorProjectProjectPHIDType.php
Show All 37 Lines | foreach ($handles as $phid => $handle) { | ||||
$project = $objects[$phid]; | $project = $objects[$phid]; | ||||
$name = $project->getDisplayName(); | $name = $project->getDisplayName(); | ||||
$id = $project->getID(); | $id = $project->getID(); | ||||
$slug = $project->getPrimarySlug(); | $slug = $project->getPrimarySlug(); | ||||
$handle->setName($name); | $handle->setName($name); | ||||
if (strlen($slug)) { | if (phutil_nonempty_string($slug)) { | ||||
$handle->setObjectName('#'.$slug); | $handle->setObjectName('#'.$slug); | ||||
$handle->setMailStampName('#'.$slug); | $handle->setMailStampName('#'.$slug); | ||||
$handle->setURI("/tag/{$slug}/"); | $handle->setURI("/tag/{$slug}/"); | ||||
} else { | } else { | ||||
// We set the name to the project's PHID to avoid a parse error when a | // We set the name to the project's PHID to avoid a parse error when a | ||||
// project has no hashtag (as is the case with milestones by default). | // project has no hashtag (as is the case with milestones by default). | ||||
// See T12659 for more details. | // See T12659 for more details. | ||||
$handle->setCommandLineObjectName($project->getPHID()); | $handle->setCommandLineObjectName($project->getPHID()); | ||||
▲ Show 20 Lines • Show All 67 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0