From d3766cad98dd6a0c67b6aed23b26d8270717f9ec Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 31 Mar 2011 16:06:51 -0700 Subject: [PATCH] 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 --- .../people/storage/preferences/PhabricatorUserPreferences.php | 2 +- src/applications/people/storage/preferences/__init__.php | 2 ++ .../controller/edit/PhabricatorEditPreferencesController.php | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/applications/people/storage/preferences/PhabricatorUserPreferences.php b/src/applications/people/storage/preferences/PhabricatorUserPreferences.php index 42438a3ada..f84b87c0d4 100644 --- a/src/applications/people/storage/preferences/PhabricatorUserPreferences.php +++ b/src/applications/people/storage/preferences/PhabricatorUserPreferences.php @@ -34,6 +34,6 @@ class PhabricatorUserPreferences extends PhabricatorUserDAO { } public function getPreference($key) { - return $this->getPreferences()[$key]; + return idx($this->getPreferences(), $key); } } diff --git a/src/applications/people/storage/preferences/__init__.php b/src/applications/people/storage/preferences/__init__.php index 642ad05c2c..a49e820852 100644 --- a/src/applications/people/storage/preferences/__init__.php +++ b/src/applications/people/storage/preferences/__init__.php @@ -8,5 +8,7 @@ phutil_require_module('phabricator', 'applications/people/storage/base'); +phutil_require_module('phutil', 'utils'); + phutil_require_source('PhabricatorUserPreferences.php'); diff --git a/src/applications/preferences/controller/edit/PhabricatorEditPreferencesController.php b/src/applications/preferences/controller/edit/PhabricatorEditPreferencesController.php index cf10592b58..eb2d34bbbf 100644 --- a/src/applications/preferences/controller/edit/PhabricatorEditPreferencesController.php +++ b/src/applications/preferences/controller/edit/PhabricatorEditPreferencesController.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;