Update Copywrite year to be 2019
[civicrm-core.git] / CRM / Admin / Form / Preferences.php
index 710623cef01ec1ac4ee2a270dca0354dda63adec..4585b4e926b5c08611c89ca39a11935ac9583225 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 5                                                  |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2018                                |
+ | Copyright CiviCRM LLC (c) 2004-2019                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2018
+ * @copyright CiviCRM LLC (c) 2004-2019
  */
 
 /**
@@ -92,6 +92,7 @@ class CRM_Admin_Form_Preferences extends CRM_Core_Form {
     $settings = Civi::settings();
     // @todo replace this by defining all in settings.
     foreach ($this->_varNames as $groupName => $settingNames) {
+      CRM_Core_Error::deprecatedFunctionWarning('deprecated use of preferences form. This will be removed from core soon');
       foreach ($settingNames as $settingName => $options) {
         $this->_config->$settingName = $settings->get($settingName);
       }
@@ -107,6 +108,7 @@ class CRM_Admin_Form_Preferences extends CRM_Core_Form {
 
     $this->setDefaultsForMetadataDefinedFields();
     foreach ($this->_varNames as $groupName => $settings) {
+      CRM_Core_Error::deprecatedFunctionWarning('deprecated use of preferences form. This will be removed from core soon');
       foreach ($settings as $settingName => $settingDetails) {
         $this->_defaults[$settingName] = isset($this->_config->$settingName) ? $this->_config->$settingName : CRM_Utils_Array::value('default', $settingDetails, NULL);
       }
@@ -123,6 +125,7 @@ class CRM_Admin_Form_Preferences extends CRM_Core_Form {
   public function cbsDefaultValues(&$defaults) {
 
     foreach ($this->_varNames as $groupName => $groupValues) {
+      CRM_Core_Error::deprecatedFunctionWarning('deprecated use of preferences form. This will be removed from core soon');
       foreach ($groupValues as $settingName => $fieldValue) {
         if ($fieldValue['html_type'] == 'checkboxes') {
           if (isset($this->_config->$settingName) &&
@@ -150,6 +153,7 @@ class CRM_Admin_Form_Preferences extends CRM_Core_Form {
     parent::buildQuickForm();
 
     if (!empty($this->_varNames)) {
+      CRM_Core_Error::deprecatedFunctionWarning('deprecated use of preferences form. This will be removed from core soon');
       foreach ($this->_varNames as $groupName => $groupValues) {
         $formName = CRM_Utils_String::titleToVar($groupName);
         $this->assign('formName', $formName);