Differential D21361 Diff 50846 src/applications/search/controller/PhabricatorApplicationSearchController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/search/controller/PhabricatorApplicationSearchController.php
| Show First 20 Lines • Show All 958 Lines • ▼ Show 20 Lines | if (!$viewer->getPHID()) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| return true; | return true; | ||||
| } | } | ||||
| private function readExportFormatPreference() { | private function readExportFormatPreference() { | ||||
| $viewer = $this->getViewer(); | $viewer = $this->getViewer(); | ||||
| $export_key = PhabricatorPolicyFavoritesSetting::SETTINGKEY; | $export_key = PhabricatorExportFormatSetting::SETTINGKEY; | ||||
| return $viewer->getUserSetting($export_key); | $value = $viewer->getUserSetting($export_key); | ||||
| if (is_string($value)) { | |||||
| return $value; | |||||
| } | |||||
| return ''; | |||||
| } | } | ||||
| private function writeExportFormatPreference($value) { | private function writeExportFormatPreference($value) { | ||||
| $viewer = $this->getViewer(); | $viewer = $this->getViewer(); | ||||
| $request = $this->getRequest(); | $request = $this->getRequest(); | ||||
| if (!$viewer->isLoggedIn()) { | if (!$viewer->isLoggedIn()) { | ||||
| return; | return; | ||||
| } | } | ||||
| $export_key = PhabricatorPolicyFavoritesSetting::SETTINGKEY; | $export_key = PhabricatorExportFormatSetting::SETTINGKEY; | ||||
| $preferences = PhabricatorUserPreferences::loadUserPreferences($viewer); | $preferences = PhabricatorUserPreferences::loadUserPreferences($viewer); | ||||
| $editor = id(new PhabricatorUserPreferencesEditor()) | $editor = id(new PhabricatorUserPreferencesEditor()) | ||||
| ->setActor($viewer) | ->setActor($viewer) | ||||
| ->setContentSourceFromRequest($request) | ->setContentSourceFromRequest($request) | ||||
| ->setContinueOnNoEffect(true) | ->setContinueOnNoEffect(true) | ||||
| ->setContinueOnMissingFields(true); | ->setContinueOnMissingFields(true); | ||||
| ▲ Show 20 Lines • Show All 108 Lines • Show Last 20 Lines | |||||