mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-11 15:21:03 +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:
parent
7ef6c0a523
commit
7170b062e6
2 changed files with 0 additions and 33 deletions
|
@ -568,29 +568,6 @@ final class PhabricatorUser
|
||||||
return $this->getUserSetting(PhabricatorPronounSetting::SETTINGKEY);
|
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(
|
public function loadEditorLink(
|
||||||
$path,
|
$path,
|
||||||
$line,
|
$line,
|
||||||
|
|
|
@ -98,16 +98,6 @@ final class PhabricatorUserPreferences
|
||||||
return false;
|
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.
|
* Load or create a preferences object for the given user.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue