Page MenuHomePhabricator

D16546.id39828.diff
No OneTemporary

D16546.id39828.diff

diff --git a/src/applications/conpherence/controller/ConpherenceController.php b/src/applications/conpherence/controller/ConpherenceController.php
--- a/src/applications/conpherence/controller/ConpherenceController.php
+++ b/src/applications/conpherence/controller/ConpherenceController.php
@@ -59,47 +59,49 @@
$viewer = $this->getViewer();
$crumbs = $this->buildApplicationCrumbs();
- $data = $conpherence->getDisplayData($this->getViewer());
- $crumbs->addCrumb(
- id(new PHUICrumbView())
- ->setName($data['title'])
- ->setHref('/'.$conpherence->getMonogram()));
-
- $can_edit = PhabricatorPolicyFilter::hasCapability(
- $viewer,
- $conpherence,
- PhabricatorPolicyCapability::CAN_EDIT);
-
- $crumbs
- ->addAction(
- id(new PHUIListItemView())
- ->setName(pht('Edit Room'))
- ->setHref(
- $this->getApplicationURI('update/'.$conpherence->getID()).'/')
- ->setIcon('fa-pencil')
- ->setDisabled(!$can_edit)
- ->setWorkflow(true));
-
- $widget_key = PhabricatorConpherenceWidgetVisibleSetting::SETTINGKEY;
- $widget_view = (bool)$viewer->getUserSetting($widget_key, false);
-
- $divider = id(new PHUIListItemView())
- ->setType(PHUIListItemView::TYPE_DIVIDER)
- ->addClass('conpherence-header-desktop-item');
- $crumbs->addAction($divider);
-
- Javelin::initBehavior(
- 'toggle-widget',
- array(
- 'show' => (int)$widget_view,
- 'settingsURI' => '/settings/adjust/?key='.$widget_key,
- ));
- $crumbs->addAction(
- id(new PHUIListItemView())
- ->addSigil('conpherence-widget-toggle')
- ->setIcon('fa-columns')
- ->addClass('conpherence-header-desktop-item'));
+ if ($conpherence->getID()) {
+ $data = $conpherence->getDisplayData($this->getViewer());
+ $crumbs->addCrumb(
+ id(new PHUICrumbView())
+ ->setName($data['title'])
+ ->setHref('/'.$conpherence->getMonogram()));
+ $can_edit = PhabricatorPolicyFilter::hasCapability(
+ $viewer,
+ $conpherence,
+ PhabricatorPolicyCapability::CAN_EDIT);
+
+ $crumbs
+ ->addAction(
+ id(new PHUIListItemView())
+ ->setName(pht('Edit Room'))
+ ->setHref(
+ $this->getApplicationURI('update/'.$conpherence->getID()).'/')
+ ->setIcon('fa-pencil')
+ ->setDisabled(!$can_edit)
+ ->setWorkflow(true));
+
+ $widget_key = PhabricatorConpherenceWidgetVisibleSetting::SETTINGKEY;
+ $widget_view = (bool)$viewer->getUserSetting($widget_key, false);
+
+ $divider = id(new PHUIListItemView())
+ ->setType(PHUIListItemView::TYPE_DIVIDER)
+ ->addClass('conpherence-header-desktop-item');
+ $crumbs->addAction($divider);
+
+ Javelin::initBehavior(
+ 'toggle-widget',
+ array(
+ 'show' => (int)$widget_view,
+ 'settingsURI' => '/settings/adjust/?key='.$widget_key,
+ ));
+
+ $crumbs->addAction(
+ id(new PHUIListItemView())
+ ->addSigil('conpherence-widget-toggle')
+ ->setIcon('fa-columns')
+ ->addClass('conpherence-header-desktop-item'));
+ }
return hsprintf(
'%s',

File Metadata

Mime Type
text/plain
Expires
Thu, Mar 27, 7:32 AM (1 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7711284
Default Alt Text
D16546.id39828.diff (3 KB)

Event Timeline