1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

Remove PhabricatorUser->loadPreferences()

Summary: Ref T4103. This method has no more callers.

Test Plan: `grep`

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4103

Differential Revision: https://secure.phabricator.com/D16039
This commit is contained in:
epriestley 2016-06-04 16:25:11 -07:00
parent 7ef6c0a523
commit 7170b062e6
2 changed files with 0 additions and 33 deletions

View file

@ -568,29 +568,6 @@ final class PhabricatorUser
return $this->getUserSetting(PhabricatorPronounSetting::SETTINGKEY);
}
public function loadPreferences() {
if ($this->preferences) {
return $this->preferences;
}
$preferences = null;
if ($this->getPHID()) {
$preferences = id(new PhabricatorUserPreferencesQuery())
->setViewer($this)
->withUsers(array($this))
->executeOne();
}
if (!$preferences) {
$preferences = new PhabricatorUserPreferences();
$preferences->setUserPHID($this->getPHID());
$preferences->attachUser($this);
}
$this->preferences = $preferences;
return $preferences;
}
public function loadEditorLink(
$path,
$line,

View file

@ -98,16 +98,6 @@ final class PhabricatorUserPreferences
return false;
}
// TODO: Remove this once all edits go through the Editor. For now, some
// old edits just do direct saves so make sure we nuke the cache.
public function save() {
PhabricatorUserCache::clearCache(
PhabricatorUserPreferencesCacheType::KEY_PREFERENCES,
$this->getUserPHID());
return parent::save();
}
/**
* Load or create a preferences object for the given user.
*