From 73afe1e6a801e9d0a5cfaa055613982d1d2fc1f4 Mon Sep 17 00:00:00 2001 From: eileenmcnaugton Date: Mon, 3 Aug 2015 14:03:47 +1200 Subject: [PATCH] CRM-16953 standardise declaration of ->_defaults --- CRM/Activity/Form/Search.php | 2 -- CRM/Admin/Form/Navigation.php | 5 ----- CRM/Admin/Form/Setting.php | 1 - CRM/Admin/Form/WordReplacements.php | 2 -- CRM/Campaign/Form/Petition/Signature.php | 2 -- CRM/Campaign/Form/Search.php | 2 -- CRM/Case/Form/Activity.php | 7 ------- CRM/Case/Form/Search.php | 2 -- CRM/Contact/Form/DedupeFind.php | 7 ------- CRM/Contact/Form/DedupeRules.php | 1 - CRM/Contact/Form/RelatedContact.php | 7 ------- CRM/Contribute/Form/Contribution.php | 7 ------- CRM/Contribute/Form/Contribution/Main.php | 1 - CRM/Contribute/Form/ContributionBase.php | 6 ------ CRM/Contribute/Form/Search.php | 2 -- CRM/Core/Form.php | 7 +++++++ CRM/Custom/Form/Group.php | 7 ------- CRM/Event/Form/Registration/AdditionalParticipant.php | 5 ----- CRM/Event/Form/Registration/Register.php | 7 ------- CRM/Event/Form/Search.php | 2 -- CRM/Financial/Form/Payment.php | 2 -- CRM/Grant/Form/Search.php | 2 -- CRM/Member/Form/Search.php | 2 -- CRM/PCP/Form/PCPAccount.php | 8 -------- CRM/Pledge/Form/Search.php | 4 ---- CRM/Profile/Form.php | 2 -- CRM/Report/Form.php | 2 -- 27 files changed, 7 insertions(+), 97 deletions(-) diff --git a/CRM/Activity/Form/Search.php b/CRM/Activity/Form/Search.php index 8e2a4ba5d9..ebc67d5320 100644 --- a/CRM/Activity/Form/Search.php +++ b/CRM/Activity/Form/Search.php @@ -68,8 +68,6 @@ class CRM_Activity_Form_Search extends CRM_Core_Form_Search { */ protected $_prefix = "activity_"; - protected $_defaults; - /** * The saved search ID retrieved from the GET vars. * diff --git a/CRM/Admin/Form/Navigation.php b/CRM/Admin/Form/Navigation.php index ca54eff5b5..2f7651c676 100644 --- a/CRM/Admin/Form/Navigation.php +++ b/CRM/Admin/Form/Navigation.php @@ -44,11 +44,6 @@ class CRM_Admin_Form_Navigation extends CRM_Admin_Form { */ protected $_currentParentID = NULL; - /** - * Default values. - */ - protected $_defaults = array(); - /** * Build the form object. * diff --git a/CRM/Admin/Form/Setting.php b/CRM/Admin/Form/Setting.php index 910e5f90d3..c70dd8ae49 100644 --- a/CRM/Admin/Form/Setting.php +++ b/CRM/Admin/Form/Setting.php @@ -37,7 +37,6 @@ */ class CRM_Admin_Form_Setting extends CRM_Core_Form { - protected $_defaults; protected $_settings = array(); /** diff --git a/CRM/Admin/Form/WordReplacements.php b/CRM/Admin/Form/WordReplacements.php index 4de04e9b6d..0e6361a861 100644 --- a/CRM/Admin/Form/WordReplacements.php +++ b/CRM/Admin/Form/WordReplacements.php @@ -36,8 +36,6 @@ class CRM_Admin_Form_WordReplacements extends CRM_Core_Form { protected $_stringName = NULL; - protected $_defaults = NULL; - public $unsavedChangesWarn = TRUE; /** diff --git a/CRM/Campaign/Form/Petition/Signature.php b/CRM/Campaign/Form/Petition/Signature.php index 0affe05a24..2e937ec22b 100644 --- a/CRM/Campaign/Form/Petition/Signature.php +++ b/CRM/Campaign/Form/Petition/Signature.php @@ -134,8 +134,6 @@ class CRM_Campaign_Form_Petition_Signature extends CRM_Core_Form { protected $_image_URL; - protected $_defaults = NULL; - /** */ public function __construct() { diff --git a/CRM/Campaign/Form/Search.php b/CRM/Campaign/Form/Search.php index 2e79c5dc91..4d67f124c3 100755 --- a/CRM/Campaign/Form/Search.php +++ b/CRM/Campaign/Form/Search.php @@ -59,8 +59,6 @@ class CRM_Campaign_Form_Search extends CRM_Core_Form_Search { */ protected $_limit = NULL; - protected $_defaults; - /** * Prefix for the controller. */ diff --git a/CRM/Case/Form/Activity.php b/CRM/Case/Form/Activity.php index f1cf6bf439..ee6a7b4b8d 100644 --- a/CRM/Case/Form/Activity.php +++ b/CRM/Case/Form/Activity.php @@ -53,13 +53,6 @@ class CRM_Case_Form_Activity extends CRM_Activity_Form_Activity { */ public $_caseType; - /** - * The default values of an activity. - * - * @var array - */ - public $_defaults = array(); - /** * The array of releted contact info. * diff --git a/CRM/Case/Form/Search.php b/CRM/Case/Form/Search.php index 4c33c675de..39964025dd 100644 --- a/CRM/Case/Form/Search.php +++ b/CRM/Case/Form/Search.php @@ -64,8 +64,6 @@ class CRM_Case_Form_Search extends CRM_Core_Form_Search { */ protected $_prefix = 'case_'; - protected $_defaults; - /** * Processing needed for buildForm and later. * diff --git a/CRM/Contact/Form/DedupeFind.php b/CRM/Contact/Form/DedupeFind.php index ef80374061..2e77f366cb 100644 --- a/CRM/Contact/Form/DedupeFind.php +++ b/CRM/Contact/Form/DedupeFind.php @@ -39,15 +39,8 @@ */ class CRM_Contact_Form_DedupeFind extends CRM_Admin_Form { - /** - * Defined defaults. - */ - public $_defaults; - /** * Pre processing. - * - * @return void */ public function preProcess() { $this->rgid = CRM_Utils_Request::retrieve('rgid', 'Positive', $this, FALSE, 0); diff --git a/CRM/Contact/Form/DedupeRules.php b/CRM/Contact/Form/DedupeRules.php index 4361c3ab47..bfa0fbfd9d 100644 --- a/CRM/Contact/Form/DedupeRules.php +++ b/CRM/Contact/Form/DedupeRules.php @@ -40,7 +40,6 @@ class CRM_Contact_Form_DedupeRules extends CRM_Admin_Form { const RULES_COUNT = 5; protected $_contactType; - protected $_defaults = array(); protected $_fields = array(); protected $_rgid; diff --git a/CRM/Contact/Form/RelatedContact.php b/CRM/Contact/Form/RelatedContact.php index 7b1a453eef..c869078931 100644 --- a/CRM/Contact/Form/RelatedContact.php +++ b/CRM/Contact/Form/RelatedContact.php @@ -55,13 +55,6 @@ class CRM_Contact_Form_RelatedContact extends CRM_Core_Form { */ public $_contactId; - /** - * Form defaults. - * - * @var array - */ - protected $_defaults = array(); - /** * Build all the data structures needed to build the form. */ diff --git a/CRM/Contribute/Form/Contribution.php b/CRM/Contribute/Form/Contribution.php index 9962143750..3cf708216a 100644 --- a/CRM/Contribute/Form/Contribution.php +++ b/CRM/Contribute/Form/Contribution.php @@ -181,13 +181,6 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP */ public $_priceSet; - /** - * Form defaults - * @todo can we define this a as protected? can we define higher up the chain - * @var array - */ - public $_defaults; - /** * User display name * diff --git a/CRM/Contribute/Form/Contribution/Main.php b/CRM/Contribute/Form/Contribution/Main.php index 171b2d45b3..1839304f63 100644 --- a/CRM/Contribute/Form/Contribution/Main.php +++ b/CRM/Contribute/Form/Contribution/Main.php @@ -46,7 +46,6 @@ class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_Contribu public $_onBehalfRequired = FALSE; public $_onbehalf = FALSE; public $_paymentProcessors; - protected $_defaults; public $_membershipTypeValues; diff --git a/CRM/Contribute/Form/ContributionBase.php b/CRM/Contribute/Form/ContributionBase.php index a81bf836b5..c78b12878f 100644 --- a/CRM/Contribute/Form/ContributionBase.php +++ b/CRM/Contribute/Form/ContributionBase.php @@ -88,12 +88,6 @@ class CRM_Contribute_Form_ContributionBase extends CRM_Core_Form { * @var bool */ protected $_separateMembershipPayment; - /** - * The default values for the form - * - * @var array - */ - protected $_defaults; /** * The params submitted by the form and computed by the app diff --git a/CRM/Contribute/Form/Search.php b/CRM/Contribute/Form/Search.php index 138202af73..45b4c1cd44 100644 --- a/CRM/Contribute/Form/Search.php +++ b/CRM/Contribute/Form/Search.php @@ -57,8 +57,6 @@ class CRM_Contribute_Form_Search extends CRM_Core_Form_Search { */ protected $_limit = NULL; - protected $_defaults; - /** * Prefix for the controller. */ diff --git a/CRM/Core/Form.php b/CRM/Core/Form.php index f06c10f8fc..75fc295862 100644 --- a/CRM/Core/Form.php +++ b/CRM/Core/Form.php @@ -61,6 +61,13 @@ class CRM_Core_Form extends HTML_QuickForm_Page { */ protected $_title = NULL; + /** + * The default values for the form. + * + * @var array + */ + public $_defaults = array(); + /** * The options passed into this form * @var mixed diff --git a/CRM/Custom/Form/Group.php b/CRM/Custom/Form/Group.php index 46f3a1c0f0..62879af0e8 100644 --- a/CRM/Custom/Form/Group.php +++ b/CRM/Custom/Form/Group.php @@ -59,13 +59,6 @@ class CRM_Custom_Form_Group extends CRM_Core_Form { */ protected $_subtypes = array(); - /** - * Array of default params. - * - * @var array - */ - protected $_defaults = array(); - /** * Set variables up before form is built. * diff --git a/CRM/Event/Form/Registration/AdditionalParticipant.php b/CRM/Event/Form/Registration/AdditionalParticipant.php index 5c46aa8d0d..3cf1821f0c 100644 --- a/CRM/Event/Form/Registration/AdditionalParticipant.php +++ b/CRM/Event/Form/Registration/AdditionalParticipant.php @@ -40,11 +40,6 @@ */ class CRM_Event_Form_Registration_AdditionalParticipant extends CRM_Event_Form_Registration { - /** - * The defaults involved in this page. - */ - public $_defaults = array(); - /** * Pre-registered additional participant id. */ diff --git a/CRM/Event/Form/Registration/Register.php b/CRM/Event/Form/Registration/Register.php index f4a7c8baa2..92128a003e 100644 --- a/CRM/Event/Form/Registration/Register.php +++ b/CRM/Event/Form/Registration/Register.php @@ -30,8 +30,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** @@ -45,11 +43,6 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration { */ public $_fields; - /** - * The defaults involved in this page. - */ - public $_defaults; - /** * The status message that user view. */ diff --git a/CRM/Event/Form/Search.php b/CRM/Event/Form/Search.php index 0834673f1b..d3db6d27bf 100644 --- a/CRM/Event/Form/Search.php +++ b/CRM/Event/Form/Search.php @@ -68,8 +68,6 @@ class CRM_Event_Form_Search extends CRM_Core_Form_Search { */ protected $_prefix = "event_"; - protected $_defaults; - /** * The saved search ID retrieved from the GET vars. * diff --git a/CRM/Financial/Form/Payment.php b/CRM/Financial/Form/Payment.php index 699ecfffb2..61452dea74 100644 --- a/CRM/Financial/Form/Payment.php +++ b/CRM/Financial/Form/Payment.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Financial_Form_Payment extends CRM_Core_Form { /** diff --git a/CRM/Grant/Form/Search.php b/CRM/Grant/Form/Search.php index 05c0f1d4d9..b2c03091d5 100644 --- a/CRM/Grant/Form/Search.php +++ b/CRM/Grant/Form/Search.php @@ -68,8 +68,6 @@ class CRM_Grant_Form_Search extends CRM_Core_Form_Search { */ protected $_prefix = "grant_"; - protected $_defaults; - /** * Processing needed for buildForm and later. * diff --git a/CRM/Member/Form/Search.php b/CRM/Member/Form/Search.php index 0e69f987cd..a9565c1e59 100644 --- a/CRM/Member/Form/Search.php +++ b/CRM/Member/Form/Search.php @@ -63,8 +63,6 @@ class CRM_Member_Form_Search extends CRM_Core_Form_Search { */ protected $_limit = NULL; - protected $_defaults; - /** * Prefix for the controller. */ diff --git a/CRM/PCP/Form/PCPAccount.php b/CRM/PCP/Form/PCPAccount.php index 584a7f7565..0167b59ef5 100644 --- a/CRM/PCP/Form/PCPAccount.php +++ b/CRM/PCP/Form/PCPAccount.php @@ -52,14 +52,6 @@ class CRM_PCP_Form_PCPAccount extends CRM_Core_Form { */ public $_single; - /** - * The default values for the form. - * - * @var array - */ - protected $_defaults; - - public function preProcess() { $session = CRM_Core_Session::singleton(); $config = CRM_Core_Config::singleton(); diff --git a/CRM/Pledge/Form/Search.php b/CRM/Pledge/Form/Search.php index 513344cdb8..140600004c 100644 --- a/CRM/Pledge/Form/Search.php +++ b/CRM/Pledge/Form/Search.php @@ -64,12 +64,8 @@ class CRM_Pledge_Form_Search extends CRM_Core_Form_Search { */ protected $_prefix = "pledge_"; - protected $_defaults; - /** * Processing needed for buildForm and later. - * - * @return void */ public function preProcess() { diff --git a/CRM/Profile/Form.php b/CRM/Profile/Form.php index 3fdb20fafb..59a7096096 100644 --- a/CRM/Profile/Form.php +++ b/CRM/Profile/Form.php @@ -135,8 +135,6 @@ class CRM_Profile_Form extends CRM_Core_Form { */ protected $_ctype = NULL; - protected $_defaults = NULL; - /** * Store profile ids if multiple profile ids are passed using comma separated. * Currently lets implement this functionality only for dialog mode diff --git a/CRM/Report/Form.php b/CRM/Report/Form.php index 8f252b3264..8c03314d19 100644 --- a/CRM/Report/Form.php +++ b/CRM/Report/Form.php @@ -90,8 +90,6 @@ class CRM_Report_Form extends CRM_Core_Form { */ protected $_options = array(); - protected $_defaults = array(); - /** * By default most reports hide contact id. * Setting this to true makes it available -- 2.25.1