From a1664d4c6430b5678047ea31df8b82f2de11e9d5 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sat, 13 Apr 2013 09:31:24 -0700 Subject: [PATCH] Mark customized config values in Current Settings Test Plan: /config/all/ Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5677 --- .../config/controller/PhabricatorConfigAllController.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/applications/config/controller/PhabricatorConfigAllController.php b/src/applications/config/controller/PhabricatorConfigAllController.php index 11d0a74732..5818865c13 100644 --- a/src/applications/config/controller/PhabricatorConfigAllController.php +++ b/src/applications/config/controller/PhabricatorConfigAllController.php @@ -7,6 +7,10 @@ final class PhabricatorConfigAllController $request = $this->getRequest(); $user = $request->getUser(); + $db_values = id(new PhabricatorConfigEntry()) + ->loadAllWhere('namespace = %s', 'default'); + $db_values = mpull($db_values, null, 'getConfigKey'); + $rows = array(); $options = PhabricatorApplicationConfigOptions::loadAllOptions(); ksort($options); @@ -22,6 +26,7 @@ final class PhabricatorConfigAllController $value = PhabricatorConfigJSON::prettyPrintJSON($value); } + $db_value = idx($db_values, $key); $rows[] = array( phutil_tag( 'a', @@ -30,6 +35,7 @@ final class PhabricatorConfigAllController ), $key), $value, + $db_value && !$db_value->getIsDeleted() ? pht('Customized') : '', ); } $table = id(new AphrontTableView($rows)) @@ -43,6 +49,7 @@ final class PhabricatorConfigAllController array( pht('Key'), pht('Value'), + pht('Customized'), )); $title = pht('Current Settings');