Minor tweaks to Preferences
Summary: Get rid of HPHP-only syntax, add a header and width restriction. Test Plan: Looked at /preferences/, saved preferences. Reviewed By: tuomaspelkonen Reviewers: tuomaspelkonen CC: tuomaspelkonen Differential Revision: 92
This commit is contained in:
@@ -34,6 +34,6 @@ class PhabricatorUserPreferences extends PhabricatorUserDAO {
|
||||
}
|
||||
|
||||
public function getPreference($key) {
|
||||
return $this->getPreferences()[$key];
|
||||
return idx($this->getPreferences(), $key);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,5 +8,7 @@
|
||||
|
||||
phutil_require_module('phabricator', 'applications/people/storage/base');
|
||||
|
||||
phutil_require_module('phutil', 'utils');
|
||||
|
||||
|
||||
phutil_require_source('PhabricatorUserPreferences.php');
|
||||
|
||||
@@ -87,6 +87,8 @@ EXAMPLE;
|
||||
->setValue('Save Preferences'));
|
||||
|
||||
$panel = new AphrontPanelView();
|
||||
$panel->setWidth(AphrontPanelView::WIDTH_WIDE);
|
||||
$panel->setHeader('Phabricator Preferences');
|
||||
$panel->appendChild($form);
|
||||
|
||||
$error_view = null;
|
||||
|
||||
Reference in New Issue
Block a user