Differential D20407 Diff 48714 src/applications/dashboard/controller/PhabricatorDashboardRemovePanelController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/dashboard/controller/PhabricatorDashboardRemovePanelController.php
| Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | if (!$panel_on_dashboard) { | ||||
| return new Aphront404Response(); | return new Aphront404Response(); | ||||
| } | } | ||||
| $redirect_uri = $dashboard->getURI(); | $redirect_uri = $dashboard->getURI(); | ||||
| $layout_config = $dashboard->getLayoutConfigObject(); | $layout_config = $dashboard->getLayoutConfigObject(); | ||||
| if ($request->isFormPost()) { | if ($request->isFormPost()) { | ||||
| $xactions = array(); | $xactions = array(); | ||||
| $xactions[] = id(new PhabricatorDashboardTransaction()) | |||||
| ->setTransactionType(PhabricatorTransactions::TYPE_EDGE) | |||||
| ->setMetadataValue( | |||||
| 'edge:type', | |||||
| PhabricatorDashboardDashboardHasPanelEdgeType::EDGECONST) | |||||
amckinley: Do we need to migrate these edges to the new type? | |||||
| ->setNewValue( | |||||
| array( | |||||
| '-' => array( | |||||
| $v_panel => $v_panel, | |||||
| ), | |||||
| )); | |||||
| $layout_config->removePanel($v_panel); | $layout_config->removePanel($v_panel); | ||||
| $dashboard->setLayoutConfigFromObject($layout_config); | $dashboard->setLayoutConfigFromObject($layout_config); | ||||
| $editor = id(new PhabricatorDashboardTransactionEditor()) | $editor = id(new PhabricatorDashboardTransactionEditor()) | ||||
| ->setActor($viewer) | ->setActor($viewer) | ||||
| ->setContentSourceFromRequest($request) | ->setContentSourceFromRequest($request) | ||||
| ->setContinueOnMissingFields(true) | ->setContinueOnMissingFields(true) | ||||
| Show All 20 Lines | |||||
Do we need to migrate these edges to the new type?