@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Make logged-out users use global settings, not default settings

Summary: Fixes T11917. Give logged-out / omnipotent users the global settings, not the default settings.

Test Plan: Changed applications and language, logged out, saw changes as a public user.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11917

Differential Revision: https://secure.phabricator.com/D16936

+15 -1
+15 -1
src/applications/people/storage/PhabricatorUser.php
··· 487 487 if ($this->getPHID()) { 488 488 $settings = $this->requireCacheData($settings_key); 489 489 } else { 490 - $settings = array(); 490 + $settings = $this->loadGlobalSettings(); 491 491 } 492 492 493 493 // NOTE: To slightly improve performance, we're using all settings here, ··· 553 553 554 554 public function getTimezoneIdentifier() { 555 555 return $this->getUserSetting(PhabricatorTimezoneSetting::SETTINGKEY); 556 + } 557 + 558 + private function loadGlobalSettings() { 559 + $cache_key = 'user.settings.global'; 560 + $cache = PhabricatorCaches::getRequestCache(); 561 + $settings = $cache->getKey($cache_key); 562 + 563 + if ($settings === null) { 564 + $preferences = PhabricatorUserPreferences::loadGlobalPreferences($this); 565 + $settings = $preferences->getPreferences(); 566 + $cache->setKey($cache_key, $settings); 567 + } 568 + 569 + return $settings; 556 570 } 557 571 558 572