Differential D16036 Diff 38602 src/applications/settings/panel/PhabricatorHomePreferencesSettingsPanel.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/settings/panel/PhabricatorHomePreferencesSettingsPanel.php
| Show First 20 Lines • Show All 202 Lines • ▼ Show 20 Lines | public function processRequest(AphrontRequest $request) { | ||||
| return $box; | return $box; | ||||
| } | } | ||||
| private function writePinnedApplications( | private function writePinnedApplications( | ||||
| PhabricatorUserPreferences $preferences, | PhabricatorUserPreferences $preferences, | ||||
| $pinned) { | $pinned) { | ||||
| $viewer = $this->getViewer(); | |||||
| $request = $this->getController()->getRequest(); | |||||
| $pinned_key = PhabricatorPinnedApplicationsSetting::SETTINGKEY; | $pinned_key = PhabricatorPinnedApplicationsSetting::SETTINGKEY; | ||||
| $this->writeSetting($preferences, $pinned_key, $pinned); | |||||
| $editor = id(new PhabricatorUserPreferencesEditor()) | |||||
| ->setActor($viewer) | |||||
| ->setContentSourceFromRequest($request) | |||||
| ->setContinueOnNoEffect(true) | |||||
| ->setContinueOnMissingFields(true); | |||||
| $xactions = array(); | |||||
| $xactions[] = $preferences->newTransaction($pinned_key, $pinned); | |||||
| $editor->applyTransactions($preferences, $xactions); | |||||
| } | } | ||||
| } | } | ||||