Page MenuHomePhabricator

D10823.id25980.diff
No OneTemporary

D10823.id25980.diff

diff --git a/src/applications/project/conduit/ProjectConduitAPIMethod.php b/src/applications/project/conduit/ProjectConduitAPIMethod.php
--- a/src/applications/project/conduit/ProjectConduitAPIMethod.php
+++ b/src/applications/project/conduit/ProjectConduitAPIMethod.php
@@ -26,10 +26,23 @@
$project_slugs = $project->getSlugs();
$project_slugs = array_values(mpull($project_slugs, 'getSlug'));
+ $project_icon = PhabricatorProjectIcon::getAPIName($project->getIcon());
+
+ if (!is_null($project->getProfileImagePHID())) {
+ $profile_image = array(
+ 'phid' => $project->getProfileImagePHID(),
+ );
+ } else {
+ $profile_image = null;
+ }
+
$result[$project->getPHID()] = array(
'id' => $project->getID(),
'phid' => $project->getPHID(),
'name' => $project->getName(),
+ 'profileImage' => $profile_image,
+ 'icon' => $project_icon,
+ 'color' => $project->getColor(),
'members' => $member_phids,
'slugs' => $project_slugs,
'dateCreated' => $project->getDateCreated(),
diff --git a/src/applications/project/icon/PhabricatorProjectIcon.php b/src/applications/project/icon/PhabricatorProjectIcon.php
--- a/src/applications/project/icon/PhabricatorProjectIcon.php
+++ b/src/applications/project/icon/PhabricatorProjectIcon.php
@@ -39,6 +39,10 @@
return $map[$key];
}
+ public static function getAPIName($key) {
+ return substr($key, 3);
+ }
+
public static function renderIconForChooser($icon) {
$project_icons = PhabricatorProjectIcon::getIconMap();

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 24, 6:16 PM (19 h, 5 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7042408
Default Alt Text
D10823.id25980.diff (1 KB)

Event Timeline