From 1f957d1ef0f03f752f462a6cf2a751ebabf62e5f Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Wed, 30 Sep 2015 10:59:58 -0400 Subject: [PATCH] gettingStartedUrl - Declare setting metadata --- CRM/Dashlet/Page/GettingStarted.php | 2 +- settings/Core.setting.php | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CRM/Dashlet/Page/GettingStarted.php b/CRM/Dashlet/Page/GettingStarted.php index 362fd74f7c..7e06c730e0 100644 --- a/CRM/Dashlet/Page/GettingStarted.php +++ b/CRM/Dashlet/Page/GettingStarted.php @@ -59,7 +59,7 @@ class CRM_Dashlet_Page_GettingStarted extends CRM_Core_Page { public function gettingStartedUrl() { // Note: We use "*default*" as the default (rather than self::GETTING_STARTED_URL) so that future // developers can change GETTING_STARTED_URL without needing to update {civicrm_setting}. - $url = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'gettingStartedUrl', NULL, '*default*'); + $url = Civi::settings()->get('gettingStartedUrl'); if ($url === '*default*') { $url = self::GETTING_STARTED_URL; } diff --git a/settings/Core.setting.php b/settings/Core.setting.php index 571e8a378d..583efaad50 100644 --- a/settings/Core.setting.php +++ b/settings/Core.setting.php @@ -585,6 +585,25 @@ return array( 'description' => 'Service providing CiviCRM community messages', 'help_text' => 'Use "*default*" for the system default or override with a custom URL', ), + 'gettingStartedUrl' => array( + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'gettingStartedUrl', + 'type' => 'String', + 'quick_form_type' => 'Element', + 'html_attributes' => array( + 'size' => 64, + 'maxlength' => 128, + ), + 'html_type' => 'Text', + 'default' => '*default*', + 'add' => '4.3', + 'title' => 'Getting Started URL', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'Service providing the Getting Started data', + 'help_text' => 'Use "*default*" for the system default or override with a custom URL', + ), 'resCacheCode' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', -- 2.25.1