From 60808919139a05136c4c3bc4900b7a930d9cff33 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 28 Jul 2016 13:31:12 -0700 Subject: [PATCH] Regen DAOs with new import() / export() --- CRM/ACL/DAO/ACL.php | 46 ++------------- CRM/ACL/DAO/Cache.php | 46 ++------------- CRM/ACL/DAO/EntityRole.php | 46 ++------------- CRM/Activity/DAO/Activity.php | 46 ++------------- CRM/Activity/DAO/ActivityContact.php | 46 ++------------- CRM/Batch/DAO/Batch.php | 46 ++------------- CRM/Batch/DAO/EntityBatch.php | 46 ++------------- CRM/Campaign/DAO/Campaign.php | 46 ++------------- CRM/Campaign/DAO/CampaignGroup.php | 46 ++------------- CRM/Campaign/DAO/Survey.php | 46 ++------------- CRM/Case/DAO/Case.php | 46 ++------------- CRM/Case/DAO/CaseActivity.php | 46 ++------------- CRM/Case/DAO/CaseContact.php | 46 ++------------- CRM/Case/DAO/CaseType.php | 46 ++------------- CRM/Contact/DAO/ACLContactCache.php | 46 ++------------- CRM/Contact/DAO/Contact.php | 46 ++------------- CRM/Contact/DAO/ContactType.php | 46 ++------------- CRM/Contact/DAO/DashboardContact.php | 46 ++------------- CRM/Contact/DAO/Group.php | 46 ++------------- CRM/Contact/DAO/GroupContact.php | 46 ++------------- CRM/Contact/DAO/GroupContactCache.php | 46 ++------------- CRM/Contact/DAO/GroupNesting.php | 46 ++------------- CRM/Contact/DAO/GroupOrganization.php | 46 ++------------- CRM/Contact/DAO/Relationship.php | 46 ++------------- CRM/Contact/DAO/RelationshipType.php | 46 ++------------- CRM/Contact/DAO/SavedSearch.php | 46 ++------------- CRM/Contact/DAO/SubscriptionHistory.php | 46 ++------------- CRM/Contribute/DAO/Contribution.php | 46 ++------------- CRM/Contribute/DAO/ContributionPage.php | 46 ++------------- CRM/Contribute/DAO/ContributionProduct.php | 46 ++------------- CRM/Contribute/DAO/ContributionRecur.php | 46 ++------------- CRM/Contribute/DAO/ContributionSoft.php | 46 ++------------- CRM/Contribute/DAO/Premium.php | 46 ++------------- CRM/Contribute/DAO/PremiumsProduct.php | 46 ++------------- CRM/Contribute/DAO/Product.php | 46 ++------------- CRM/Contribute/DAO/Widget.php | 46 ++------------- CRM/Core/DAO/ActionLog.php | 46 ++------------- CRM/Core/DAO/ActionMapping.php | 46 ++------------- CRM/Core/DAO/ActionSchedule.php | 46 ++------------- CRM/Core/DAO/Address.php | 60 ++++---------------- CRM/Core/DAO/AddressFormat.php | 46 ++------------- CRM/Core/DAO/AllCoreTables.data.php | 2 +- CRM/Core/DAO/Cache.php | 46 ++------------- CRM/Core/DAO/Component.php | 46 ++------------- CRM/Core/DAO/Country.php | 46 ++------------- CRM/Core/DAO/County.php | 46 ++------------- CRM/Core/DAO/CustomField.php | 46 ++------------- CRM/Core/DAO/CustomGroup.php | 46 ++------------- CRM/Core/DAO/Dashboard.php | 46 ++------------- CRM/Core/DAO/Discount.php | 46 ++------------- CRM/Core/DAO/Domain.php | 46 ++------------- CRM/Core/DAO/Email.php | 46 ++------------- CRM/Core/DAO/EntityFile.php | 46 ++------------- CRM/Core/DAO/EntityTag.php | 46 ++------------- CRM/Core/DAO/Extension.php | 46 ++------------- CRM/Core/DAO/File.php | 46 ++------------- CRM/Core/DAO/IM.php | 46 ++------------- CRM/Core/DAO/Job.php | 46 ++------------- CRM/Core/DAO/JobLog.php | 46 ++------------- CRM/Core/DAO/LocBlock.php | 46 ++------------- CRM/Core/DAO/LocationType.php | 46 ++------------- CRM/Core/DAO/Log.php | 46 ++------------- CRM/Core/DAO/MailSettings.php | 46 ++------------- CRM/Core/DAO/Managed.php | 46 ++------------- CRM/Core/DAO/Mapping.php | 46 ++------------- CRM/Core/DAO/MappingField.php | 46 ++------------- CRM/Core/DAO/Menu.php | 46 ++------------- CRM/Core/DAO/MessageTemplate.php | 46 ++------------- CRM/Core/DAO/Navigation.php | 46 ++------------- CRM/Core/DAO/Note.php | 46 ++------------- CRM/Core/DAO/OpenID.php | 46 ++------------- CRM/Core/DAO/OptionGroup.php | 46 ++------------- CRM/Core/DAO/OptionValue.php | 46 ++------------- CRM/Core/DAO/Persistent.php | 46 ++------------- CRM/Core/DAO/Phone.php | 46 ++------------- CRM/Core/DAO/PreferencesDate.php | 46 ++------------- CRM/Core/DAO/PrevNextCache.php | 46 ++------------- CRM/Core/DAO/PrintLabel.php | 46 ++------------- CRM/Core/DAO/RecurringEntity.php | 46 ++------------- CRM/Core/DAO/Setting.php | 46 ++------------- CRM/Core/DAO/StateProvince.php | 46 ++------------- CRM/Core/DAO/StatusPreference.php | 46 ++------------- CRM/Core/DAO/SystemLog.php | 46 ++------------- CRM/Core/DAO/Tag.php | 46 ++------------- CRM/Core/DAO/Timezone.php | 46 ++------------- CRM/Core/DAO/UFField.php | 46 ++------------- CRM/Core/DAO/UFGroup.php | 46 ++------------- CRM/Core/DAO/UFJoin.php | 46 ++------------- CRM/Core/DAO/UFMatch.php | 46 ++------------- CRM/Core/DAO/Website.php | 46 ++------------- CRM/Core/DAO/WordReplacement.php | 46 ++------------- CRM/Core/DAO/Worldregion.php | 46 ++------------- CRM/Cxn/DAO/Cxn.php | 46 ++------------- CRM/Dedupe/DAO/Exception.php | 46 ++------------- CRM/Dedupe/DAO/Rule.php | 46 ++------------- CRM/Dedupe/DAO/RuleGroup.php | 46 ++------------- CRM/Event/Cart/DAO/Cart.php | 46 ++------------- CRM/Event/Cart/DAO/EventInCart.php | 46 ++------------- CRM/Event/DAO/Event.php | 46 ++------------- CRM/Event/DAO/Participant.php | 46 ++------------- CRM/Event/DAO/ParticipantPayment.php | 46 ++------------- CRM/Event/DAO/ParticipantStatusType.php | 46 ++------------- CRM/Financial/DAO/Currency.php | 46 ++------------- CRM/Financial/DAO/EntityFinancialAccount.php | 46 ++------------- CRM/Financial/DAO/EntityFinancialTrxn.php | 46 ++------------- CRM/Financial/DAO/FinancialAccount.php | 46 ++------------- CRM/Financial/DAO/FinancialItem.php | 46 ++------------- CRM/Financial/DAO/FinancialTrxn.php | 46 ++------------- CRM/Financial/DAO/FinancialType.php | 46 ++------------- CRM/Financial/DAO/PaymentProcessor.php | 46 ++------------- CRM/Financial/DAO/PaymentProcessorType.php | 46 ++------------- CRM/Financial/DAO/PaymentToken.php | 46 ++------------- CRM/Friend/DAO/Friend.php | 46 ++------------- CRM/Grant/DAO/Grant.php | 46 ++------------- CRM/Mailing/DAO/BouncePattern.php | 46 ++------------- CRM/Mailing/DAO/BounceType.php | 46 ++------------- CRM/Mailing/DAO/Component.php | 46 ++------------- CRM/Mailing/DAO/Mailing.php | 46 ++------------- CRM/Mailing/DAO/MailingAB.php | 46 ++------------- CRM/Mailing/DAO/MailingGroup.php | 46 ++------------- CRM/Mailing/DAO/MailingJob.php | 46 ++------------- CRM/Mailing/DAO/Recipients.php | 46 ++------------- CRM/Mailing/DAO/Spool.php | 46 ++------------- CRM/Mailing/DAO/TrackableURL.php | 46 ++------------- CRM/Mailing/Event/DAO/Bounce.php | 46 ++------------- CRM/Mailing/Event/DAO/Confirm.php | 46 ++------------- CRM/Mailing/Event/DAO/Delivered.php | 46 ++------------- CRM/Mailing/Event/DAO/Forward.php | 46 ++------------- CRM/Mailing/Event/DAO/Opened.php | 46 ++------------- CRM/Mailing/Event/DAO/Queue.php | 46 ++------------- CRM/Mailing/Event/DAO/Reply.php | 46 ++------------- CRM/Mailing/Event/DAO/Subscribe.php | 46 ++------------- CRM/Mailing/Event/DAO/TrackableURLOpen.php | 46 ++------------- CRM/Mailing/Event/DAO/Unsubscribe.php | 46 ++------------- CRM/Member/DAO/Membership.php | 46 ++------------- CRM/Member/DAO/MembershipBlock.php | 46 ++------------- CRM/Member/DAO/MembershipLog.php | 46 ++------------- CRM/Member/DAO/MembershipPayment.php | 46 ++------------- CRM/Member/DAO/MembershipStatus.php | 46 ++------------- CRM/Member/DAO/MembershipType.php | 46 ++------------- CRM/PCP/DAO/PCP.php | 46 ++------------- CRM/PCP/DAO/PCPBlock.php | 46 ++------------- CRM/Pledge/DAO/Pledge.php | 46 ++------------- CRM/Pledge/DAO/PledgeBlock.php | 46 ++------------- CRM/Pledge/DAO/PledgePayment.php | 46 ++------------- CRM/Price/DAO/LineItem.php | 46 ++------------- CRM/Price/DAO/PriceField.php | 46 ++------------- CRM/Price/DAO/PriceFieldValue.php | 46 ++------------- CRM/Price/DAO/PriceSet.php | 46 ++------------- CRM/Price/DAO/PriceSetEntity.php | 46 ++------------- CRM/Queue/DAO/QueueItem.php | 46 ++------------- CRM/Report/DAO/ReportInstance.php | 46 ++------------- CRM/SMS/DAO/Provider.php | 46 ++------------- 153 files changed, 617 insertions(+), 6391 deletions(-) diff --git a/CRM/ACL/DAO/ACL.php b/CRM/ACL/DAO/ACL.php index d0cbf57370..2a2c59734c 100644 --- a/CRM/ACL/DAO/ACL.php +++ b/CRM/ACL/DAO/ACL.php @@ -59,20 +59,6 @@ class CRM_ACL_DAO_ACL extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -323,20 +309,8 @@ class CRM_ACL_DAO_ACL extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['acl'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'acl', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -346,19 +320,7 @@ class CRM_ACL_DAO_ACL extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['acl'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'acl', $prefix, array()); + return $r; } } diff --git a/CRM/ACL/DAO/Cache.php b/CRM/ACL/DAO/Cache.php index 7e2c4d7420..2a53c38d94 100644 --- a/CRM/ACL/DAO/Cache.php +++ b/CRM/ACL/DAO/Cache.php @@ -59,20 +59,6 @@ class CRM_ACL_DAO_Cache extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -209,20 +195,8 @@ class CRM_ACL_DAO_Cache extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['acl_cache'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'acl_cache', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -232,19 +206,7 @@ class CRM_ACL_DAO_Cache extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['acl_cache'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'acl_cache', $prefix, array()); + return $r; } } diff --git a/CRM/ACL/DAO/EntityRole.php b/CRM/ACL/DAO/EntityRole.php index b33a9943de..ef9128cf02 100644 --- a/CRM/ACL/DAO/EntityRole.php +++ b/CRM/ACL/DAO/EntityRole.php @@ -59,20 +59,6 @@ class CRM_ACL_DAO_EntityRole extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -222,20 +208,8 @@ class CRM_ACL_DAO_EntityRole extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['acl_entity_role'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'acl_entity_role', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -245,19 +219,7 @@ class CRM_ACL_DAO_EntityRole extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['acl_entity_role'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'acl_entity_role', $prefix, array()); + return $r; } } diff --git a/CRM/Activity/DAO/Activity.php b/CRM/Activity/DAO/Activity.php index 65179fb851..cf4c37f011 100644 --- a/CRM/Activity/DAO/Activity.php +++ b/CRM/Activity/DAO/Activity.php @@ -59,20 +59,6 @@ class CRM_Activity_DAO_Activity extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -620,20 +606,8 @@ class CRM_Activity_DAO_Activity extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['activity'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'activity', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -643,19 +617,7 @@ class CRM_Activity_DAO_Activity extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['activity'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'activity', $prefix, array()); + return $r; } } diff --git a/CRM/Activity/DAO/ActivityContact.php b/CRM/Activity/DAO/ActivityContact.php index c2244b74d4..26a52560ae 100644 --- a/CRM/Activity/DAO/ActivityContact.php +++ b/CRM/Activity/DAO/ActivityContact.php @@ -59,20 +59,6 @@ class CRM_Activity_DAO_ActivityContact extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -221,20 +207,8 @@ class CRM_Activity_DAO_ActivityContact extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['activity_contact'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'activity_contact', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -244,19 +218,7 @@ class CRM_Activity_DAO_ActivityContact extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['activity_contact'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'activity_contact', $prefix, array()); + return $r; } } diff --git a/CRM/Batch/DAO/Batch.php b/CRM/Batch/DAO/Batch.php index cbeb734ee5..a66df35453 100644 --- a/CRM/Batch/DAO/Batch.php +++ b/CRM/Batch/DAO/Batch.php @@ -59,20 +59,6 @@ class CRM_Batch_DAO_Batch extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -436,20 +422,8 @@ class CRM_Batch_DAO_Batch extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['batch'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'batch', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -459,19 +433,7 @@ class CRM_Batch_DAO_Batch extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['batch'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'batch', $prefix, array()); + return $r; } } diff --git a/CRM/Batch/DAO/EntityBatch.php b/CRM/Batch/DAO/EntityBatch.php index 47a23e0a09..ae7dde96ca 100644 --- a/CRM/Batch/DAO/EntityBatch.php +++ b/CRM/Batch/DAO/EntityBatch.php @@ -59,20 +59,6 @@ class CRM_Batch_DAO_EntityBatch extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -210,20 +196,8 @@ class CRM_Batch_DAO_EntityBatch extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['entity_batch'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'entity_batch', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -233,19 +207,7 @@ class CRM_Batch_DAO_EntityBatch extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['entity_batch'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'entity_batch', $prefix, array()); + return $r; } } diff --git a/CRM/Campaign/DAO/Campaign.php b/CRM/Campaign/DAO/Campaign.php index a380f8c884..bdc00d6c36 100644 --- a/CRM/Campaign/DAO/Campaign.php +++ b/CRM/Campaign/DAO/Campaign.php @@ -59,20 +59,6 @@ class CRM_Campaign_DAO_Campaign extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -487,20 +473,8 @@ class CRM_Campaign_DAO_Campaign extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['campaign'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'campaign', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -510,19 +484,7 @@ class CRM_Campaign_DAO_Campaign extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['campaign'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'campaign', $prefix, array()); + return $r; } } diff --git a/CRM/Campaign/DAO/CampaignGroup.php b/CRM/Campaign/DAO/CampaignGroup.php index d5821b6b3d..5a50c36fed 100644 --- a/CRM/Campaign/DAO/CampaignGroup.php +++ b/CRM/Campaign/DAO/CampaignGroup.php @@ -59,20 +59,6 @@ class CRM_Campaign_DAO_CampaignGroup extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -238,20 +224,8 @@ class CRM_Campaign_DAO_CampaignGroup extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['campaign_group'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'campaign_group', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -261,19 +235,7 @@ class CRM_Campaign_DAO_CampaignGroup extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['campaign_group'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'campaign_group', $prefix, array()); + return $r; } } diff --git a/CRM/Campaign/DAO/Survey.php b/CRM/Campaign/DAO/Survey.php index 8129049491..726876fb49 100644 --- a/CRM/Campaign/DAO/Survey.php +++ b/CRM/Campaign/DAO/Survey.php @@ -59,20 +59,6 @@ class CRM_Campaign_DAO_Survey extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -467,20 +453,8 @@ class CRM_Campaign_DAO_Survey extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['survey'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'survey', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -490,19 +464,7 @@ class CRM_Campaign_DAO_Survey extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['survey'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'survey', $prefix, array()); + return $r; } } diff --git a/CRM/Case/DAO/Case.php b/CRM/Case/DAO/Case.php index 26fd684ba5..8393cf2889 100644 --- a/CRM/Case/DAO/Case.php +++ b/CRM/Case/DAO/Case.php @@ -59,20 +59,6 @@ class CRM_Case_DAO_Case extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -322,20 +308,8 @@ class CRM_Case_DAO_Case extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['case'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'case', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -345,19 +319,7 @@ class CRM_Case_DAO_Case extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['case'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'case', $prefix, array()); + return $r; } } diff --git a/CRM/Case/DAO/CaseActivity.php b/CRM/Case/DAO/CaseActivity.php index 6716dda5a7..c6f76abbde 100644 --- a/CRM/Case/DAO/CaseActivity.php +++ b/CRM/Case/DAO/CaseActivity.php @@ -59,20 +59,6 @@ class CRM_Case_DAO_CaseActivity extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -196,20 +182,8 @@ class CRM_Case_DAO_CaseActivity extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['case_activity'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'case_activity', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -219,19 +193,7 @@ class CRM_Case_DAO_CaseActivity extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['case_activity'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'case_activity', $prefix, array()); + return $r; } } diff --git a/CRM/Case/DAO/CaseContact.php b/CRM/Case/DAO/CaseContact.php index d31f080494..94b57ed8c2 100644 --- a/CRM/Case/DAO/CaseContact.php +++ b/CRM/Case/DAO/CaseContact.php @@ -59,20 +59,6 @@ class CRM_Case_DAO_CaseContact extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -199,20 +185,8 @@ class CRM_Case_DAO_CaseContact extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['case_contact'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'case_contact', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -222,19 +196,7 @@ class CRM_Case_DAO_CaseContact extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['case_contact'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'case_contact', $prefix, array()); + return $r; } } diff --git a/CRM/Case/DAO/CaseType.php b/CRM/Case/DAO/CaseType.php index fdf11afa72..2fc7f1132f 100644 --- a/CRM/Case/DAO/CaseType.php +++ b/CRM/Case/DAO/CaseType.php @@ -59,20 +59,6 @@ class CRM_Case_DAO_CaseType extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -253,20 +239,8 @@ class CRM_Case_DAO_CaseType extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['case_type'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'case_type', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -276,19 +250,7 @@ class CRM_Case_DAO_CaseType extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['case_type'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'case_type', $prefix, array()); + return $r; } } diff --git a/CRM/Contact/DAO/ACLContactCache.php b/CRM/Contact/DAO/ACLContactCache.php index 3041ba26be..04747b4f87 100644 --- a/CRM/Contact/DAO/ACLContactCache.php +++ b/CRM/Contact/DAO/ACLContactCache.php @@ -59,20 +59,6 @@ class CRM_Contact_DAO_ACLContactCache extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -217,20 +203,8 @@ class CRM_Contact_DAO_ACLContactCache extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['acl_contact_cache'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'acl_contact_cache', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -240,19 +214,7 @@ class CRM_Contact_DAO_ACLContactCache extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['acl_contact_cache'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'acl_contact_cache', $prefix, array()); + return $r; } } diff --git a/CRM/Contact/DAO/Contact.php b/CRM/Contact/DAO/Contact.php index 0c2b33e26a..28e05c3cae 100644 --- a/CRM/Contact/DAO/Contact.php +++ b/CRM/Contact/DAO/Contact.php @@ -59,20 +59,6 @@ class CRM_Contact_DAO_Contact extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -1270,20 +1256,8 @@ class CRM_Contact_DAO_Contact extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['contact'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'contact', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -1293,19 +1267,7 @@ class CRM_Contact_DAO_Contact extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['contact'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'contact', $prefix, array()); + return $r; } } diff --git a/CRM/Contact/DAO/ContactType.php b/CRM/Contact/DAO/ContactType.php index e7f2428c51..1ea5ac24e1 100644 --- a/CRM/Contact/DAO/ContactType.php +++ b/CRM/Contact/DAO/ContactType.php @@ -59,20 +59,6 @@ class CRM_Contact_DAO_ContactType extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -274,20 +260,8 @@ class CRM_Contact_DAO_ContactType extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['contact_type'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'contact_type', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -297,19 +271,7 @@ class CRM_Contact_DAO_ContactType extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['contact_type'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'contact_type', $prefix, array()); + return $r; } } diff --git a/CRM/Contact/DAO/DashboardContact.php b/CRM/Contact/DAO/DashboardContact.php index 84f34fb19a..e44239f3e9 100644 --- a/CRM/Contact/DAO/DashboardContact.php +++ b/CRM/Contact/DAO/DashboardContact.php @@ -59,20 +59,6 @@ class CRM_Contact_DAO_DashboardContact extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -286,20 +272,8 @@ class CRM_Contact_DAO_DashboardContact extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['dashboard_contact'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'dashboard_contact', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -309,19 +283,7 @@ class CRM_Contact_DAO_DashboardContact extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['dashboard_contact'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'dashboard_contact', $prefix, array()); + return $r; } } diff --git a/CRM/Contact/DAO/Group.php b/CRM/Contact/DAO/Group.php index cce899f152..e60d70df2c 100644 --- a/CRM/Contact/DAO/Group.php +++ b/CRM/Contact/DAO/Group.php @@ -59,20 +59,6 @@ class CRM_Contact_DAO_Group extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -443,20 +429,8 @@ class CRM_Contact_DAO_Group extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['group'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'group', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -466,19 +440,7 @@ class CRM_Contact_DAO_Group extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['group'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'group', $prefix, array()); + return $r; } } diff --git a/CRM/Contact/DAO/GroupContact.php b/CRM/Contact/DAO/GroupContact.php index c27c56caaf..d649e281e7 100644 --- a/CRM/Contact/DAO/GroupContact.php +++ b/CRM/Contact/DAO/GroupContact.php @@ -59,20 +59,6 @@ class CRM_Contact_DAO_GroupContact extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -255,20 +241,8 @@ class CRM_Contact_DAO_GroupContact extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['group_contact'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'group_contact', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -278,19 +252,7 @@ class CRM_Contact_DAO_GroupContact extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['group_contact'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'group_contact', $prefix, array()); + return $r; } } diff --git a/CRM/Contact/DAO/GroupContactCache.php b/CRM/Contact/DAO/GroupContactCache.php index 649779538e..c470ecfff7 100644 --- a/CRM/Contact/DAO/GroupContactCache.php +++ b/CRM/Contact/DAO/GroupContactCache.php @@ -59,20 +59,6 @@ class CRM_Contact_DAO_GroupContactCache extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -204,20 +190,8 @@ class CRM_Contact_DAO_GroupContactCache extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['group_contact_cache'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'group_contact_cache', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -227,19 +201,7 @@ class CRM_Contact_DAO_GroupContactCache extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['group_contact_cache'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'group_contact_cache', $prefix, array()); + return $r; } } diff --git a/CRM/Contact/DAO/GroupNesting.php b/CRM/Contact/DAO/GroupNesting.php index 085ff15b93..1e7caf732b 100644 --- a/CRM/Contact/DAO/GroupNesting.php +++ b/CRM/Contact/DAO/GroupNesting.php @@ -59,20 +59,6 @@ class CRM_Contact_DAO_GroupNesting extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -196,20 +182,8 @@ class CRM_Contact_DAO_GroupNesting extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['group_nesting'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'group_nesting', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -219,19 +193,7 @@ class CRM_Contact_DAO_GroupNesting extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['group_nesting'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'group_nesting', $prefix, array()); + return $r; } } diff --git a/CRM/Contact/DAO/GroupOrganization.php b/CRM/Contact/DAO/GroupOrganization.php index 2563f8a1f6..ff90ad0884 100644 --- a/CRM/Contact/DAO/GroupOrganization.php +++ b/CRM/Contact/DAO/GroupOrganization.php @@ -59,20 +59,6 @@ class CRM_Contact_DAO_GroupOrganization extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -204,20 +190,8 @@ class CRM_Contact_DAO_GroupOrganization extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['group_organization'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'group_organization', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -227,19 +201,7 @@ class CRM_Contact_DAO_GroupOrganization extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['group_organization'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'group_organization', $prefix, array()); + return $r; } } diff --git a/CRM/Contact/DAO/Relationship.php b/CRM/Contact/DAO/Relationship.php index 7abb39c821..a505bacafe 100644 --- a/CRM/Contact/DAO/Relationship.php +++ b/CRM/Contact/DAO/Relationship.php @@ -59,20 +59,6 @@ class CRM_Contact_DAO_Relationship extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -339,20 +325,8 @@ class CRM_Contact_DAO_Relationship extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['relationship'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'relationship', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -362,19 +336,7 @@ class CRM_Contact_DAO_Relationship extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['relationship'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'relationship', $prefix, array()); + return $r; } } diff --git a/CRM/Contact/DAO/RelationshipType.php b/CRM/Contact/DAO/RelationshipType.php index 099e479f07..edb7bbd58a 100644 --- a/CRM/Contact/DAO/RelationshipType.php +++ b/CRM/Contact/DAO/RelationshipType.php @@ -59,20 +59,6 @@ class CRM_Contact_DAO_RelationshipType extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -353,20 +339,8 @@ class CRM_Contact_DAO_RelationshipType extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['relationship_type'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'relationship_type', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -376,19 +350,7 @@ class CRM_Contact_DAO_RelationshipType extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['relationship_type'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'relationship_type', $prefix, array()); + return $r; } } diff --git a/CRM/Contact/DAO/SavedSearch.php b/CRM/Contact/DAO/SavedSearch.php index 9f7f1903a5..a3afb89f86 100644 --- a/CRM/Contact/DAO/SavedSearch.php +++ b/CRM/Contact/DAO/SavedSearch.php @@ -59,20 +59,6 @@ class CRM_Contact_DAO_SavedSearch extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -249,20 +235,8 @@ class CRM_Contact_DAO_SavedSearch extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['saved_search'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'saved_search', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -272,19 +246,7 @@ class CRM_Contact_DAO_SavedSearch extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['saved_search'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'saved_search', $prefix, array()); + return $r; } } diff --git a/CRM/Contact/DAO/SubscriptionHistory.php b/CRM/Contact/DAO/SubscriptionHistory.php index 98ee0e0b51..cb855e99a5 100644 --- a/CRM/Contact/DAO/SubscriptionHistory.php +++ b/CRM/Contact/DAO/SubscriptionHistory.php @@ -59,20 +59,6 @@ class CRM_Contact_DAO_SubscriptionHistory extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -271,20 +257,8 @@ class CRM_Contact_DAO_SubscriptionHistory extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['subscription_history'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'subscription_history', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -294,19 +268,7 @@ class CRM_Contact_DAO_SubscriptionHistory extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['subscription_history'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'subscription_history', $prefix, array()); + return $r; } } diff --git a/CRM/Contribute/DAO/Contribution.php b/CRM/Contribute/DAO/Contribution.php index b8f27e41a4..e2cf91592c 100644 --- a/CRM/Contribute/DAO/Contribution.php +++ b/CRM/Contribute/DAO/Contribution.php @@ -59,20 +59,6 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -800,20 +786,8 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['contribution'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'contribution', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -823,19 +797,7 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['contribution'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'contribution', $prefix, array()); + return $r; } } diff --git a/CRM/Contribute/DAO/ContributionPage.php b/CRM/Contribute/DAO/ContributionPage.php index 5039814450..8598b1dfdd 100644 --- a/CRM/Contribute/DAO/ContributionPage.php +++ b/CRM/Contribute/DAO/ContributionPage.php @@ -59,20 +59,6 @@ class CRM_Contribute_DAO_ContributionPage extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -838,20 +824,8 @@ class CRM_Contribute_DAO_ContributionPage extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['contribution_page'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'contribution_page', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -861,19 +835,7 @@ class CRM_Contribute_DAO_ContributionPage extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['contribution_page'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'contribution_page', $prefix, array()); + return $r; } } diff --git a/CRM/Contribute/DAO/ContributionProduct.php b/CRM/Contribute/DAO/ContributionProduct.php index 701061b34b..2ceea9354e 100644 --- a/CRM/Contribute/DAO/ContributionProduct.php +++ b/CRM/Contribute/DAO/ContributionProduct.php @@ -59,20 +59,6 @@ class CRM_Contribute_DAO_ContributionProduct extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -305,20 +291,8 @@ class CRM_Contribute_DAO_ContributionProduct extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['contribution_product'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'contribution_product', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -328,19 +302,7 @@ class CRM_Contribute_DAO_ContributionProduct extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['contribution_product'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'contribution_product', $prefix, array()); + return $r; } } diff --git a/CRM/Contribute/DAO/ContributionRecur.php b/CRM/Contribute/DAO/ContributionRecur.php index 95931b151a..293fc03ddd 100644 --- a/CRM/Contribute/DAO/ContributionRecur.php +++ b/CRM/Contribute/DAO/ContributionRecur.php @@ -59,20 +59,6 @@ class CRM_Contribute_DAO_ContributionRecur extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -649,20 +635,8 @@ class CRM_Contribute_DAO_ContributionRecur extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['contribution_recur'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'contribution_recur', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -672,19 +646,7 @@ class CRM_Contribute_DAO_ContributionRecur extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['contribution_recur'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'contribution_recur', $prefix, array()); + return $r; } } diff --git a/CRM/Contribute/DAO/ContributionSoft.php b/CRM/Contribute/DAO/ContributionSoft.php index 0eca903663..15210db9a5 100644 --- a/CRM/Contribute/DAO/ContributionSoft.php +++ b/CRM/Contribute/DAO/ContributionSoft.php @@ -59,20 +59,6 @@ class CRM_Contribute_DAO_ContributionSoft extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -332,20 +318,8 @@ class CRM_Contribute_DAO_ContributionSoft extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['contribution_soft'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'contribution_soft', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -355,19 +329,7 @@ class CRM_Contribute_DAO_ContributionSoft extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['contribution_soft'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'contribution_soft', $prefix, array()); + return $r; } } diff --git a/CRM/Contribute/DAO/Premium.php b/CRM/Contribute/DAO/Premium.php index 529c61cb2c..0d8e84f7f5 100644 --- a/CRM/Contribute/DAO/Premium.php +++ b/CRM/Contribute/DAO/Premium.php @@ -59,20 +59,6 @@ class CRM_Contribute_DAO_Premium extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -304,20 +290,8 @@ class CRM_Contribute_DAO_Premium extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['premiums'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'premiums', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -327,19 +301,7 @@ class CRM_Contribute_DAO_Premium extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['premiums'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'premiums', $prefix, array()); + return $r; } } diff --git a/CRM/Contribute/DAO/PremiumsProduct.php b/CRM/Contribute/DAO/PremiumsProduct.php index d0ebdfa515..39592b84c0 100644 --- a/CRM/Contribute/DAO/PremiumsProduct.php +++ b/CRM/Contribute/DAO/PremiumsProduct.php @@ -59,20 +59,6 @@ class CRM_Contribute_DAO_PremiumsProduct extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -229,20 +215,8 @@ class CRM_Contribute_DAO_PremiumsProduct extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['premiums_product'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'premiums_product', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -252,19 +226,7 @@ class CRM_Contribute_DAO_PremiumsProduct extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['premiums_product'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'premiums_product', $prefix, array()); + return $r; } } diff --git a/CRM/Contribute/DAO/Product.php b/CRM/Contribute/DAO/Product.php index 5f2cf951fe..79ab2fd31e 100644 --- a/CRM/Contribute/DAO/Product.php +++ b/CRM/Contribute/DAO/Product.php @@ -59,20 +59,6 @@ class CRM_Contribute_DAO_Product extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -474,20 +460,8 @@ class CRM_Contribute_DAO_Product extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['product'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'product', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -497,19 +471,7 @@ class CRM_Contribute_DAO_Product extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['product'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'product', $prefix, array()); + return $r; } } diff --git a/CRM/Contribute/DAO/Widget.php b/CRM/Contribute/DAO/Widget.php index 0a1979e401..d6b3ebbfb2 100644 --- a/CRM/Contribute/DAO/Widget.php +++ b/CRM/Contribute/DAO/Widget.php @@ -59,20 +59,6 @@ class CRM_Contribute_DAO_Widget extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -382,20 +368,8 @@ class CRM_Contribute_DAO_Widget extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['contribution_widget'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'contribution_widget', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -405,19 +379,7 @@ class CRM_Contribute_DAO_Widget extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['contribution_widget'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'contribution_widget', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/ActionLog.php b/CRM/Core/DAO/ActionLog.php index b692a47d43..8cae35ed51 100644 --- a/CRM/Core/DAO/ActionLog.php +++ b/CRM/Core/DAO/ActionLog.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_ActionLog extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -289,20 +275,8 @@ class CRM_Core_DAO_ActionLog extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['action_log'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'action_log', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -312,19 +286,7 @@ class CRM_Core_DAO_ActionLog extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['action_log'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'action_log', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/ActionMapping.php b/CRM/Core/DAO/ActionMapping.php index c6b3b27193..66e3713f67 100644 --- a/CRM/Core/DAO/ActionMapping.php +++ b/CRM/Core/DAO/ActionMapping.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_ActionMapping extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -270,20 +256,8 @@ class CRM_Core_DAO_ActionMapping extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['action_mapping'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'action_mapping', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -293,19 +267,7 @@ class CRM_Core_DAO_ActionMapping extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['action_mapping'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'action_mapping', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/ActionSchedule.php b/CRM/Core/DAO/ActionSchedule.php index 29539e29a7..cd0a9fb401 100644 --- a/CRM/Core/DAO/ActionSchedule.php +++ b/CRM/Core/DAO/ActionSchedule.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_ActionSchedule extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -730,20 +716,8 @@ class CRM_Core_DAO_ActionSchedule extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['action_schedule'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'action_schedule', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -753,19 +727,7 @@ class CRM_Core_DAO_ActionSchedule extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['action_schedule'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'action_schedule', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/Address.php b/CRM/Core/DAO/Address.php index 9220b4859b..680c482210 100644 --- a/CRM/Core/DAO/Address.php +++ b/CRM/Core/DAO/Address.php @@ -62,20 +62,6 @@ class CRM_Core_DAO_Address extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -739,23 +725,12 @@ class CRM_Core_DAO_Address extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['address'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - self::$_import = array_merge(self::$_import, CRM_Core_DAO_County::import(true)); - self::$_import = array_merge(self::$_import, CRM_Core_DAO_StateProvince::import(true)); - self::$_import = array_merge(self::$_import, CRM_Core_DAO_Country::import(true)); - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'address', $prefix, array( + 'CRM_Core_DAO_County', + 'CRM_Core_DAO_StateProvince', + 'CRM_Core_DAO_Country', + )); + return $r; } /** * Returns the list of fields that can be exported @@ -765,22 +740,11 @@ class CRM_Core_DAO_Address extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['address'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - self::$_export = array_merge(self::$_export, CRM_Core_DAO_County::export(true)); - self::$_export = array_merge(self::$_export, CRM_Core_DAO_StateProvince::export(true)); - self::$_export = array_merge(self::$_export, CRM_Core_DAO_Country::export(true)); - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'address', $prefix, array( + 'CRM_Core_DAO_County', + 'CRM_Core_DAO_StateProvince', + 'CRM_Core_DAO_Country', + )); + return $r; } } diff --git a/CRM/Core/DAO/AddressFormat.php b/CRM/Core/DAO/AddressFormat.php index 3bf875d3e4..7a494b0544 100644 --- a/CRM/Core/DAO/AddressFormat.php +++ b/CRM/Core/DAO/AddressFormat.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_AddressFormat extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -165,20 +151,8 @@ class CRM_Core_DAO_AddressFormat extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['address_format'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'address_format', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -188,19 +162,7 @@ class CRM_Core_DAO_AddressFormat extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['address_format'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'address_format', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/AllCoreTables.data.php b/CRM/Core/DAO/AllCoreTables.data.php index 1a4538990a..9aedc1fe82 100644 --- a/CRM/Core/DAO/AllCoreTables.data.php +++ b/CRM/Core/DAO/AllCoreTables.data.php @@ -24,7 +24,7 @@ | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ */ -// (GenCodeChecksum:ba879fefd1a64218277bad08e0a29af7) +// (GenCodeChecksum:14fe20bf74c92c5422f20d8b99684a5b) return array( 'CRM_Core_DAO_AddressFormat' => array( 'name' => 'AddressFormat', diff --git a/CRM/Core/DAO/Cache.php b/CRM/Core/DAO/Cache.php index 1fa1ea7c90..1fcee8c630 100644 --- a/CRM/Core/DAO/Cache.php +++ b/CRM/Core/DAO/Cache.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_Cache extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -253,20 +239,8 @@ class CRM_Core_DAO_Cache extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['cache'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'cache', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -276,19 +250,7 @@ class CRM_Core_DAO_Cache extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['cache'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'cache', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/Component.php b/CRM/Core/DAO/Component.php index 4d01832d33..d86dd2822f 100644 --- a/CRM/Core/DAO/Component.php +++ b/CRM/Core/DAO/Component.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_Component extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -185,20 +171,8 @@ class CRM_Core_DAO_Component extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['component'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'component', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -208,19 +182,7 @@ class CRM_Core_DAO_Component extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['component'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'component', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/Country.php b/CRM/Core/DAO/Country.php index 5ad2b7c038..c72e479278 100644 --- a/CRM/Core/DAO/Country.php +++ b/CRM/Core/DAO/Country.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_Country extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -288,20 +274,8 @@ class CRM_Core_DAO_Country extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['country'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'country', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -311,19 +285,7 @@ class CRM_Core_DAO_Country extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['country'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'country', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/County.php b/CRM/Core/DAO/County.php index 26aed4135e..2a6eda2f5c 100644 --- a/CRM/Core/DAO/County.php +++ b/CRM/Core/DAO/County.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_County extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -215,20 +201,8 @@ class CRM_Core_DAO_County extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['county'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'county', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -238,19 +212,7 @@ class CRM_Core_DAO_County extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['county'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'county', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/CustomField.php b/CRM/Core/DAO/CustomField.php index 61d07d045c..2e2f321487 100644 --- a/CRM/Core/DAO/CustomField.php +++ b/CRM/Core/DAO/CustomField.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_CustomField extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -588,20 +574,8 @@ class CRM_Core_DAO_CustomField extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['custom_field'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'custom_field', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -611,19 +585,7 @@ class CRM_Core_DAO_CustomField extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['custom_field'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'custom_field', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/CustomGroup.php b/CRM/Core/DAO/CustomGroup.php index 6447fc553c..ef89ee97bc 100644 --- a/CRM/Core/DAO/CustomGroup.php +++ b/CRM/Core/DAO/CustomGroup.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_CustomGroup extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -446,20 +432,8 @@ class CRM_Core_DAO_CustomGroup extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['custom_group'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'custom_group', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -469,19 +443,7 @@ class CRM_Core_DAO_CustomGroup extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['custom_group'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'custom_group', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/Dashboard.php b/CRM/Core/DAO/Dashboard.php index eb57343be1..14f346e495 100644 --- a/CRM/Core/DAO/Dashboard.php +++ b/CRM/Core/DAO/Dashboard.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_Dashboard extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -352,20 +338,8 @@ class CRM_Core_DAO_Dashboard extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['dashboard'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'dashboard', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -375,19 +349,7 @@ class CRM_Core_DAO_Dashboard extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['dashboard'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'dashboard', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/Discount.php b/CRM/Core/DAO/Discount.php index 2d9337cc66..51b11ab746 100644 --- a/CRM/Core/DAO/Discount.php +++ b/CRM/Core/DAO/Discount.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_Discount extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -240,20 +226,8 @@ class CRM_Core_DAO_Discount extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['discount'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'discount', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -263,19 +237,7 @@ class CRM_Core_DAO_Discount extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['discount'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'discount', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/Domain.php b/CRM/Core/DAO/Domain.php index 58f7bfa850..a7e818375e 100644 --- a/CRM/Core/DAO/Domain.php +++ b/CRM/Core/DAO/Domain.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_Domain extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -279,20 +265,8 @@ class CRM_Core_DAO_Domain extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['domain'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'domain', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -302,19 +276,7 @@ class CRM_Core_DAO_Domain extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['domain'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'domain', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/Email.php b/CRM/Core/DAO/Email.php index eb5bf6ebc3..825b7abd15 100644 --- a/CRM/Core/DAO/Email.php +++ b/CRM/Core/DAO/Email.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_Email extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -353,20 +339,8 @@ class CRM_Core_DAO_Email extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['email'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'email', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -376,19 +350,7 @@ class CRM_Core_DAO_Email extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['email'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'email', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/EntityFile.php b/CRM/Core/DAO/EntityFile.php index 9c2bc6e3c1..be13d47378 100644 --- a/CRM/Core/DAO/EntityFile.php +++ b/CRM/Core/DAO/EntityFile.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_EntityFile extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -210,20 +196,8 @@ class CRM_Core_DAO_EntityFile extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['entity_file'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'entity_file', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -233,19 +207,7 @@ class CRM_Core_DAO_EntityFile extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['entity_file'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'entity_file', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/EntityTag.php b/CRM/Core/DAO/EntityTag.php index 0da4bd0672..a248eef79a 100644 --- a/CRM/Core/DAO/EntityTag.php +++ b/CRM/Core/DAO/EntityTag.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_EntityTag extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -222,20 +208,8 @@ class CRM_Core_DAO_EntityTag extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['entity_tag'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'entity_tag', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -245,19 +219,7 @@ class CRM_Core_DAO_EntityTag extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['entity_tag'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'entity_tag', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/Extension.php b/CRM/Core/DAO/Extension.php index 8e85be2786..16717ae871 100644 --- a/CRM/Core/DAO/Extension.php +++ b/CRM/Core/DAO/Extension.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_Extension extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -282,20 +268,8 @@ class CRM_Core_DAO_Extension extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['extension'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'extension', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -305,19 +279,7 @@ class CRM_Core_DAO_Extension extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['extension'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'extension', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/File.php b/CRM/Core/DAO/File.php index bb3e776875..7216ac16f5 100644 --- a/CRM/Core/DAO/File.php +++ b/CRM/Core/DAO/File.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_File extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -236,20 +222,8 @@ class CRM_Core_DAO_File extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['file'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'file', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -259,19 +233,7 @@ class CRM_Core_DAO_File extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['file'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'file', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/IM.php b/CRM/Core/DAO/IM.php index fafea31723..08e2f2b4f0 100644 --- a/CRM/Core/DAO/IM.php +++ b/CRM/Core/DAO/IM.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_IM extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -269,20 +255,8 @@ class CRM_Core_DAO_IM extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['im'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'im', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -292,19 +266,7 @@ class CRM_Core_DAO_IM extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['im'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'im', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/Job.php b/CRM/Core/DAO/Job.php index 8a06c2a8dc..121a856a9b 100644 --- a/CRM/Core/DAO/Job.php +++ b/CRM/Core/DAO/Job.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_Job extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -327,20 +313,8 @@ class CRM_Core_DAO_Job extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['job'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'job', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -350,19 +324,7 @@ class CRM_Core_DAO_Job extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['job'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'job', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/JobLog.php b/CRM/Core/DAO/JobLog.php index 6412a47d9e..5e22a8f562 100644 --- a/CRM/Core/DAO/JobLog.php +++ b/CRM/Core/DAO/JobLog.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_JobLog extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -269,20 +255,8 @@ class CRM_Core_DAO_JobLog extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['job_log'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'job_log', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -292,19 +266,7 @@ class CRM_Core_DAO_JobLog extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['job_log'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'job_log', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/LocBlock.php b/CRM/Core/DAO/LocBlock.php index 95c0d37fb4..658725471c 100644 --- a/CRM/Core/DAO/LocBlock.php +++ b/CRM/Core/DAO/LocBlock.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_LocBlock extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -268,20 +254,8 @@ class CRM_Core_DAO_LocBlock extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['loc_block'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'loc_block', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -291,19 +265,7 @@ class CRM_Core_DAO_LocBlock extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['loc_block'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'loc_block', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/LocationType.php b/CRM/Core/DAO/LocationType.php index 155ced5dd3..b65a28cf97 100644 --- a/CRM/Core/DAO/LocationType.php +++ b/CRM/Core/DAO/LocationType.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_LocationType extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -251,20 +237,8 @@ class CRM_Core_DAO_LocationType extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['location_type'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'location_type', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -274,19 +248,7 @@ class CRM_Core_DAO_LocationType extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['location_type'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'location_type', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/Log.php b/CRM/Core/DAO/Log.php index d20255e12a..36a6449778 100644 --- a/CRM/Core/DAO/Log.php +++ b/CRM/Core/DAO/Log.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_Log extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -236,20 +222,8 @@ class CRM_Core_DAO_Log extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['log'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'log', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -259,19 +233,7 @@ class CRM_Core_DAO_Log extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['log'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'log', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/MailSettings.php b/CRM/Core/DAO/MailSettings.php index 28479581dd..6bd4d77250 100644 --- a/CRM/Core/DAO/MailSettings.php +++ b/CRM/Core/DAO/MailSettings.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_MailSettings extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -366,20 +352,8 @@ class CRM_Core_DAO_MailSettings extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['mail_settings'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mail_settings', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -389,19 +363,7 @@ class CRM_Core_DAO_MailSettings extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['mail_settings'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mail_settings', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/Managed.php b/CRM/Core/DAO/Managed.php index 9f95693fad..5794a5b012 100644 --- a/CRM/Core/DAO/Managed.php +++ b/CRM/Core/DAO/Managed.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_Managed extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -234,20 +220,8 @@ class CRM_Core_DAO_Managed extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['managed'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'managed', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -257,19 +231,7 @@ class CRM_Core_DAO_Managed extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['managed'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'managed', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/Mapping.php b/CRM/Core/DAO/Mapping.php index 687f66a1d0..c78a9e3e9a 100644 --- a/CRM/Core/DAO/Mapping.php +++ b/CRM/Core/DAO/Mapping.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_Mapping extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -202,20 +188,8 @@ class CRM_Core_DAO_Mapping extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['mapping'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mapping', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -225,19 +199,7 @@ class CRM_Core_DAO_Mapping extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['mapping'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mapping', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/MappingField.php b/CRM/Core/DAO/MappingField.php index 06a9316a34..ed6147f147 100644 --- a/CRM/Core/DAO/MappingField.php +++ b/CRM/Core/DAO/MappingField.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_MappingField extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -376,20 +362,8 @@ class CRM_Core_DAO_MappingField extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['mapping_field'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mapping_field', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -399,19 +373,7 @@ class CRM_Core_DAO_MappingField extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['mapping_field'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mapping_field', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/Menu.php b/CRM/Core/DAO/Menu.php index 4f8950491c..f0f7835fbd 100644 --- a/CRM/Core/DAO/Menu.php +++ b/CRM/Core/DAO/Menu.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_Menu extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -456,20 +442,8 @@ class CRM_Core_DAO_Menu extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['menu'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'menu', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -479,19 +453,7 @@ class CRM_Core_DAO_Menu extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['menu'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'menu', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/MessageTemplate.php b/CRM/Core/DAO/MessageTemplate.php index ec840b4c72..7b953b776a 100644 --- a/CRM/Core/DAO/MessageTemplate.php +++ b/CRM/Core/DAO/MessageTemplate.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_MessageTemplate extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -295,20 +281,8 @@ class CRM_Core_DAO_MessageTemplate extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['msg_template'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'msg_template', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -318,19 +292,7 @@ class CRM_Core_DAO_MessageTemplate extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['msg_template'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'msg_template', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/Navigation.php b/CRM/Core/DAO/Navigation.php index 5f36034c11..b1cdb593a7 100644 --- a/CRM/Core/DAO/Navigation.php +++ b/CRM/Core/DAO/Navigation.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_Navigation extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -317,20 +303,8 @@ class CRM_Core_DAO_Navigation extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['navigation'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'navigation', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -340,19 +314,7 @@ class CRM_Core_DAO_Navigation extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['navigation'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'navigation', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/Note.php b/CRM/Core/DAO/Note.php index e147f1b38e..bab337d232 100644 --- a/CRM/Core/DAO/Note.php +++ b/CRM/Core/DAO/Note.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_Note extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -286,20 +272,8 @@ class CRM_Core_DAO_Note extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['note'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'note', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -309,19 +283,7 @@ class CRM_Core_DAO_Note extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['note'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'note', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/OpenID.php b/CRM/Core/DAO/OpenID.php index a934454b9b..f46e9218ee 100644 --- a/CRM/Core/DAO/OpenID.php +++ b/CRM/Core/DAO/OpenID.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_OpenID extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -240,20 +226,8 @@ class CRM_Core_DAO_OpenID extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['openid'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'openid', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -263,19 +237,7 @@ class CRM_Core_DAO_OpenID extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['openid'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'openid', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/OptionGroup.php b/CRM/Core/DAO/OptionGroup.php index 1e91f52e69..da20016091 100644 --- a/CRM/Core/DAO/OptionGroup.php +++ b/CRM/Core/DAO/OptionGroup.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_OptionGroup extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -238,20 +224,8 @@ class CRM_Core_DAO_OptionGroup extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['option_group'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'option_group', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -261,19 +235,7 @@ class CRM_Core_DAO_OptionGroup extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['option_group'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'option_group', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/OptionValue.php b/CRM/Core/DAO/OptionValue.php index 1840017016..d50016e912 100644 --- a/CRM/Core/DAO/OptionValue.php +++ b/CRM/Core/DAO/OptionValue.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_OptionValue extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -408,20 +394,8 @@ class CRM_Core_DAO_OptionValue extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['option_value'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'option_value', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -431,19 +405,7 @@ class CRM_Core_DAO_OptionValue extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['option_value'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'option_value', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/Persistent.php b/CRM/Core/DAO/Persistent.php index 7dcbf53fa6..e0df0794a8 100644 --- a/CRM/Core/DAO/Persistent.php +++ b/CRM/Core/DAO/Persistent.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_Persistent extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -211,20 +197,8 @@ class CRM_Core_DAO_Persistent extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['persistent'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'persistent', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -234,19 +208,7 @@ class CRM_Core_DAO_Persistent extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['persistent'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'persistent', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/Phone.php b/CRM/Core/DAO/Phone.php index cbfc153f2e..dedb23359e 100644 --- a/CRM/Core/DAO/Phone.php +++ b/CRM/Core/DAO/Phone.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_Phone extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -320,20 +306,8 @@ class CRM_Core_DAO_Phone extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['phone'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'phone', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -343,19 +317,7 @@ class CRM_Core_DAO_Phone extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['phone'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'phone', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/PreferencesDate.php b/CRM/Core/DAO/PreferencesDate.php index 750cc6603f..483c70e07e 100644 --- a/CRM/Core/DAO/PreferencesDate.php +++ b/CRM/Core/DAO/PreferencesDate.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_PreferencesDate extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -239,20 +225,8 @@ class CRM_Core_DAO_PreferencesDate extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['preferences_date'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'preferences_date', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -262,19 +236,7 @@ class CRM_Core_DAO_PreferencesDate extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['preferences_date'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'preferences_date', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/PrevNextCache.php b/CRM/Core/DAO/PrevNextCache.php index 3916bf80c7..6684c99bfd 100644 --- a/CRM/Core/DAO/PrevNextCache.php +++ b/CRM/Core/DAO/PrevNextCache.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_PrevNextCache extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -232,20 +218,8 @@ class CRM_Core_DAO_PrevNextCache extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['prevnext_cache'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'prevnext_cache', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -255,19 +229,7 @@ class CRM_Core_DAO_PrevNextCache extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['prevnext_cache'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'prevnext_cache', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/PrintLabel.php b/CRM/Core/DAO/PrintLabel.php index 4363cb1766..91d69480e7 100644 --- a/CRM/Core/DAO/PrintLabel.php +++ b/CRM/Core/DAO/PrintLabel.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_PrintLabel extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -317,20 +303,8 @@ class CRM_Core_DAO_PrintLabel extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['print_label'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'print_label', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -340,19 +314,7 @@ class CRM_Core_DAO_PrintLabel extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['print_label'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'print_label', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/RecurringEntity.php b/CRM/Core/DAO/RecurringEntity.php index c44f1866af..d7ed30781c 100644 --- a/CRM/Core/DAO/RecurringEntity.php +++ b/CRM/Core/DAO/RecurringEntity.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_RecurringEntity extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -208,20 +194,8 @@ class CRM_Core_DAO_RecurringEntity extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['recurring_entity'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'recurring_entity', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -231,19 +205,7 @@ class CRM_Core_DAO_RecurringEntity extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['recurring_entity'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'recurring_entity', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/Setting.php b/CRM/Core/DAO/Setting.php index 9d543d384a..0af49a9132 100644 --- a/CRM/Core/DAO/Setting.php +++ b/CRM/Core/DAO/Setting.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_Setting extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -290,20 +276,8 @@ class CRM_Core_DAO_Setting extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['setting'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'setting', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -313,19 +287,7 @@ class CRM_Core_DAO_Setting extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['setting'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'setting', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/StateProvince.php b/CRM/Core/DAO/StateProvince.php index a7a9f0fc72..113a029f20 100644 --- a/CRM/Core/DAO/StateProvince.php +++ b/CRM/Core/DAO/StateProvince.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_StateProvince extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -215,20 +201,8 @@ class CRM_Core_DAO_StateProvince extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['state_province'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'state_province', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -238,19 +212,7 @@ class CRM_Core_DAO_StateProvince extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['state_province'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'state_province', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/StatusPreference.php b/CRM/Core/DAO/StatusPreference.php index b573277449..828ea5efec 100644 --- a/CRM/Core/DAO/StatusPreference.php +++ b/CRM/Core/DAO/StatusPreference.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_StatusPreference extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -277,20 +263,8 @@ class CRM_Core_DAO_StatusPreference extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['status_pref'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'status_pref', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -300,19 +274,7 @@ class CRM_Core_DAO_StatusPreference extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['status_pref'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'status_pref', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/SystemLog.php b/CRM/Core/DAO/SystemLog.php index 871c11f854..5f00b39a87 100644 --- a/CRM/Core/DAO/SystemLog.php +++ b/CRM/Core/DAO/SystemLog.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_SystemLog extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -239,20 +225,8 @@ class CRM_Core_DAO_SystemLog extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['system_log'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'system_log', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -262,19 +236,7 @@ class CRM_Core_DAO_SystemLog extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['system_log'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'system_log', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/Tag.php b/CRM/Core/DAO/Tag.php index 7f793a908c..2670780d52 100644 --- a/CRM/Core/DAO/Tag.php +++ b/CRM/Core/DAO/Tag.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_Tag extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -296,20 +282,8 @@ class CRM_Core_DAO_Tag extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['tag'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'tag', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -319,19 +293,7 @@ class CRM_Core_DAO_Tag extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['tag'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'tag', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/Timezone.php b/CRM/Core/DAO/Timezone.php index 3d32ae9328..788ba9a2ff 100644 --- a/CRM/Core/DAO/Timezone.php +++ b/CRM/Core/DAO/Timezone.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_Timezone extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -236,20 +222,8 @@ class CRM_Core_DAO_Timezone extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['timezone'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'timezone', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -259,19 +233,7 @@ class CRM_Core_DAO_Timezone extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['timezone'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'timezone', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/UFField.php b/CRM/Core/DAO/UFField.php index 4214d4f426..e7b90635b4 100644 --- a/CRM/Core/DAO/UFField.php +++ b/CRM/Core/DAO/UFField.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_UFField extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -431,20 +417,8 @@ class CRM_Core_DAO_UFField extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['uf_field'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'uf_field', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -454,19 +428,7 @@ class CRM_Core_DAO_UFField extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['uf_field'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'uf_field', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/UFGroup.php b/CRM/Core/DAO/UFGroup.php index 705bca67b3..5f9fd7946b 100644 --- a/CRM/Core/DAO/UFGroup.php +++ b/CRM/Core/DAO/UFGroup.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_UFGroup extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -486,20 +472,8 @@ class CRM_Core_DAO_UFGroup extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['uf_group'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'uf_group', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -509,19 +483,7 @@ class CRM_Core_DAO_UFGroup extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['uf_group'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'uf_group', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/UFJoin.php b/CRM/Core/DAO/UFJoin.php index a7e0b3b37a..27a7d86f4b 100644 --- a/CRM/Core/DAO/UFJoin.php +++ b/CRM/Core/DAO/UFJoin.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_UFJoin extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -278,20 +264,8 @@ class CRM_Core_DAO_UFJoin extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['uf_join'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'uf_join', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -301,19 +275,7 @@ class CRM_Core_DAO_UFJoin extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['uf_join'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'uf_join', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/UFMatch.php b/CRM/Core/DAO/UFMatch.php index 6772967d68..10b4fbc9db 100644 --- a/CRM/Core/DAO/UFMatch.php +++ b/CRM/Core/DAO/UFMatch.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_UFMatch extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -244,20 +230,8 @@ class CRM_Core_DAO_UFMatch extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['uf_match'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'uf_match', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -267,19 +241,7 @@ class CRM_Core_DAO_UFMatch extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['uf_match'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'uf_match', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/Website.php b/CRM/Core/DAO/Website.php index 0aeaffe467..a99b7580e0 100644 --- a/CRM/Core/DAO/Website.php +++ b/CRM/Core/DAO/Website.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_Website extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -222,20 +208,8 @@ class CRM_Core_DAO_Website extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['website'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'website', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -245,19 +219,7 @@ class CRM_Core_DAO_Website extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['website'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'website', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/WordReplacement.php b/CRM/Core/DAO/WordReplacement.php index 3941ec26ce..09c65a762f 100644 --- a/CRM/Core/DAO/WordReplacement.php +++ b/CRM/Core/DAO/WordReplacement.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_WordReplacement extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -248,20 +234,8 @@ class CRM_Core_DAO_WordReplacement extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['word_replacement'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'word_replacement', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -271,19 +245,7 @@ class CRM_Core_DAO_WordReplacement extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['word_replacement'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'word_replacement', $prefix, array()); + return $r; } } diff --git a/CRM/Core/DAO/Worldregion.php b/CRM/Core/DAO/Worldregion.php index d632949fe2..901e8274f9 100644 --- a/CRM/Core/DAO/Worldregion.php +++ b/CRM/Core/DAO/Worldregion.php @@ -59,20 +59,6 @@ class CRM_Core_DAO_Worldregion extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -171,20 +157,8 @@ class CRM_Core_DAO_Worldregion extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['worldregion'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'worldregion', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -194,19 +168,7 @@ class CRM_Core_DAO_Worldregion extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['worldregion'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'worldregion', $prefix, array()); + return $r; } } diff --git a/CRM/Cxn/DAO/Cxn.php b/CRM/Cxn/DAO/Cxn.php index c16f813844..fb68a9edec 100644 --- a/CRM/Cxn/DAO/Cxn.php +++ b/CRM/Cxn/DAO/Cxn.php @@ -59,20 +59,6 @@ class CRM_Cxn_DAO_Cxn extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -293,20 +279,8 @@ class CRM_Cxn_DAO_Cxn extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['cxn'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'cxn', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -316,19 +290,7 @@ class CRM_Cxn_DAO_Cxn extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['cxn'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'cxn', $prefix, array()); + return $r; } } diff --git a/CRM/Dedupe/DAO/Exception.php b/CRM/Dedupe/DAO/Exception.php index 350b807200..3c1252156e 100644 --- a/CRM/Dedupe/DAO/Exception.php +++ b/CRM/Dedupe/DAO/Exception.php @@ -59,20 +59,6 @@ class CRM_Dedupe_DAO_Exception extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -194,20 +180,8 @@ class CRM_Dedupe_DAO_Exception extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['dedupe_exception'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'dedupe_exception', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -217,19 +191,7 @@ class CRM_Dedupe_DAO_Exception extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['dedupe_exception'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'dedupe_exception', $prefix, array()); + return $r; } } diff --git a/CRM/Dedupe/DAO/Rule.php b/CRM/Dedupe/DAO/Rule.php index 6be1a7913b..08469ab69b 100644 --- a/CRM/Dedupe/DAO/Rule.php +++ b/CRM/Dedupe/DAO/Rule.php @@ -59,20 +59,6 @@ class CRM_Dedupe_DAO_Rule extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -245,20 +231,8 @@ class CRM_Dedupe_DAO_Rule extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['dedupe_rule'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'dedupe_rule', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -268,19 +242,7 @@ class CRM_Dedupe_DAO_Rule extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['dedupe_rule'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'dedupe_rule', $prefix, array()); + return $r; } } diff --git a/CRM/Dedupe/DAO/RuleGroup.php b/CRM/Dedupe/DAO/RuleGroup.php index 554a320a37..b5b71fb8ec 100644 --- a/CRM/Dedupe/DAO/RuleGroup.php +++ b/CRM/Dedupe/DAO/RuleGroup.php @@ -59,20 +59,6 @@ class CRM_Dedupe_DAO_RuleGroup extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -264,20 +250,8 @@ class CRM_Dedupe_DAO_RuleGroup extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['dedupe_rule_group'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'dedupe_rule_group', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -287,19 +261,7 @@ class CRM_Dedupe_DAO_RuleGroup extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['dedupe_rule_group'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'dedupe_rule_group', $prefix, array()); + return $r; } } diff --git a/CRM/Event/Cart/DAO/Cart.php b/CRM/Event/Cart/DAO/Cart.php index 4312b91285..64441f3994 100644 --- a/CRM/Event/Cart/DAO/Cart.php +++ b/CRM/Event/Cart/DAO/Cart.php @@ -59,20 +59,6 @@ class CRM_Event_Cart_DAO_Cart extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -190,20 +176,8 @@ class CRM_Event_Cart_DAO_Cart extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['event_carts'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'event_carts', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -213,19 +187,7 @@ class CRM_Event_Cart_DAO_Cart extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['event_carts'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'event_carts', $prefix, array()); + return $r; } } diff --git a/CRM/Event/Cart/DAO/EventInCart.php b/CRM/Event/Cart/DAO/EventInCart.php index f3046f131a..f2e2d595f8 100644 --- a/CRM/Event/Cart/DAO/EventInCart.php +++ b/CRM/Event/Cart/DAO/EventInCart.php @@ -59,20 +59,6 @@ class CRM_Event_Cart_DAO_EventInCart extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -194,20 +180,8 @@ class CRM_Event_Cart_DAO_EventInCart extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['events_in_carts'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'events_in_carts', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -217,19 +191,7 @@ class CRM_Event_Cart_DAO_EventInCart extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['events_in_carts'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'events_in_carts', $prefix, array()); + return $r; } } diff --git a/CRM/Event/DAO/Event.php b/CRM/Event/DAO/Event.php index fe70d7d87d..30973f607b 100644 --- a/CRM/Event/DAO/Event.php +++ b/CRM/Event/DAO/Event.php @@ -59,20 +59,6 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -1381,20 +1367,8 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['event'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'event', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -1404,19 +1378,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['event'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'event', $prefix, array()); + return $r; } } diff --git a/CRM/Event/DAO/Participant.php b/CRM/Event/DAO/Participant.php index dafd6eb8e7..61b4963d7f 100644 --- a/CRM/Event/DAO/Participant.php +++ b/CRM/Event/DAO/Participant.php @@ -59,20 +59,6 @@ class CRM_Event_DAO_Participant extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -536,20 +522,8 @@ class CRM_Event_DAO_Participant extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['participant'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'participant', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -559,19 +533,7 @@ class CRM_Event_DAO_Participant extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['participant'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'participant', $prefix, array()); + return $r; } } diff --git a/CRM/Event/DAO/ParticipantPayment.php b/CRM/Event/DAO/ParticipantPayment.php index 01dcf21aad..37f6ad8680 100644 --- a/CRM/Event/DAO/ParticipantPayment.php +++ b/CRM/Event/DAO/ParticipantPayment.php @@ -59,20 +59,6 @@ class CRM_Event_DAO_ParticipantPayment extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -196,20 +182,8 @@ class CRM_Event_DAO_ParticipantPayment extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['participant_payment'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'participant_payment', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -219,19 +193,7 @@ class CRM_Event_DAO_ParticipantPayment extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['participant_payment'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'participant_payment', $prefix, array()); + return $r; } } diff --git a/CRM/Event/DAO/ParticipantStatusType.php b/CRM/Event/DAO/ParticipantStatusType.php index 83c11ef74b..6073a64b01 100644 --- a/CRM/Event/DAO/ParticipantStatusType.php +++ b/CRM/Event/DAO/ParticipantStatusType.php @@ -59,20 +59,6 @@ class CRM_Event_DAO_ParticipantStatusType extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -282,20 +268,8 @@ class CRM_Event_DAO_ParticipantStatusType extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['participant_status_type'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'participant_status_type', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -305,19 +279,7 @@ class CRM_Event_DAO_ParticipantStatusType extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['participant_status_type'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'participant_status_type', $prefix, array()); + return $r; } } diff --git a/CRM/Financial/DAO/Currency.php b/CRM/Financial/DAO/Currency.php index 9d7084a920..79abca083a 100644 --- a/CRM/Financial/DAO/Currency.php +++ b/CRM/Financial/DAO/Currency.php @@ -59,20 +59,6 @@ class CRM_Financial_DAO_Currency extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -231,20 +217,8 @@ class CRM_Financial_DAO_Currency extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['currency'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'currency', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -254,19 +228,7 @@ class CRM_Financial_DAO_Currency extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['currency'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'currency', $prefix, array()); + return $r; } } diff --git a/CRM/Financial/DAO/EntityFinancialAccount.php b/CRM/Financial/DAO/EntityFinancialAccount.php index 205bef95a2..2ca5782bba 100644 --- a/CRM/Financial/DAO/EntityFinancialAccount.php +++ b/CRM/Financial/DAO/EntityFinancialAccount.php @@ -59,20 +59,6 @@ class CRM_Financial_DAO_EntityFinancialAccount extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -245,20 +231,8 @@ class CRM_Financial_DAO_EntityFinancialAccount extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['entity_financial_account'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'entity_financial_account', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -268,19 +242,7 @@ class CRM_Financial_DAO_EntityFinancialAccount extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['entity_financial_account'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'entity_financial_account', $prefix, array()); + return $r; } } diff --git a/CRM/Financial/DAO/EntityFinancialTrxn.php b/CRM/Financial/DAO/EntityFinancialTrxn.php index ff9fc50489..7436aa893b 100644 --- a/CRM/Financial/DAO/EntityFinancialTrxn.php +++ b/CRM/Financial/DAO/EntityFinancialTrxn.php @@ -59,20 +59,6 @@ class CRM_Financial_DAO_EntityFinancialTrxn extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -234,20 +220,8 @@ class CRM_Financial_DAO_EntityFinancialTrxn extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['entity_financial_trxn'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'entity_financial_trxn', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -257,19 +231,7 @@ class CRM_Financial_DAO_EntityFinancialTrxn extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['entity_financial_trxn'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'entity_financial_trxn', $prefix, array()); + return $r; } } diff --git a/CRM/Financial/DAO/FinancialAccount.php b/CRM/Financial/DAO/FinancialAccount.php index 9af3811787..53a1f55676 100644 --- a/CRM/Financial/DAO/FinancialAccount.php +++ b/CRM/Financial/DAO/FinancialAccount.php @@ -59,20 +59,6 @@ class CRM_Financial_DAO_FinancialAccount extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -415,20 +401,8 @@ class CRM_Financial_DAO_FinancialAccount extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['financial_account'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'financial_account', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -438,19 +412,7 @@ class CRM_Financial_DAO_FinancialAccount extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['financial_account'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'financial_account', $prefix, array()); + return $r; } } diff --git a/CRM/Financial/DAO/FinancialItem.php b/CRM/Financial/DAO/FinancialItem.php index ed0d9e95bb..336e1ab9c4 100644 --- a/CRM/Financial/DAO/FinancialItem.php +++ b/CRM/Financial/DAO/FinancialItem.php @@ -59,20 +59,6 @@ class CRM_Financial_DAO_FinancialItem extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -348,20 +334,8 @@ class CRM_Financial_DAO_FinancialItem extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['financial_item'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'financial_item', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -371,19 +345,7 @@ class CRM_Financial_DAO_FinancialItem extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['financial_item'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'financial_item', $prefix, array()); + return $r; } } diff --git a/CRM/Financial/DAO/FinancialTrxn.php b/CRM/Financial/DAO/FinancialTrxn.php index dd478eca59..bbe94b8afb 100644 --- a/CRM/Financial/DAO/FinancialTrxn.php +++ b/CRM/Financial/DAO/FinancialTrxn.php @@ -59,20 +59,6 @@ class CRM_Financial_DAO_FinancialTrxn extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -427,20 +413,8 @@ class CRM_Financial_DAO_FinancialTrxn extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['financial_trxn'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'financial_trxn', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -450,19 +424,7 @@ class CRM_Financial_DAO_FinancialTrxn extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['financial_trxn'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'financial_trxn', $prefix, array()); + return $r; } } diff --git a/CRM/Financial/DAO/FinancialType.php b/CRM/Financial/DAO/FinancialType.php index 498c403803..0e557632d1 100644 --- a/CRM/Financial/DAO/FinancialType.php +++ b/CRM/Financial/DAO/FinancialType.php @@ -59,20 +59,6 @@ class CRM_Financial_DAO_FinancialType extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -228,20 +214,8 @@ class CRM_Financial_DAO_FinancialType extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['financial_type'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'financial_type', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -251,19 +225,7 @@ class CRM_Financial_DAO_FinancialType extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['financial_type'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'financial_type', $prefix, array()); + return $r; } } diff --git a/CRM/Financial/DAO/PaymentProcessor.php b/CRM/Financial/DAO/PaymentProcessor.php index 2f76987694..1b5c73239b 100644 --- a/CRM/Financial/DAO/PaymentProcessor.php +++ b/CRM/Financial/DAO/PaymentProcessor.php @@ -59,20 +59,6 @@ class CRM_Financial_DAO_PaymentProcessor extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -446,20 +432,8 @@ class CRM_Financial_DAO_PaymentProcessor extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['payment_processor'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'payment_processor', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -469,19 +443,7 @@ class CRM_Financial_DAO_PaymentProcessor extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['payment_processor'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'payment_processor', $prefix, array()); + return $r; } } diff --git a/CRM/Financial/DAO/PaymentProcessorType.php b/CRM/Financial/DAO/PaymentProcessorType.php index 07f6cc836d..f578c3c986 100644 --- a/CRM/Financial/DAO/PaymentProcessorType.php +++ b/CRM/Financial/DAO/PaymentProcessorType.php @@ -59,20 +59,6 @@ class CRM_Financial_DAO_PaymentProcessorType extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -457,20 +443,8 @@ class CRM_Financial_DAO_PaymentProcessorType extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['payment_processor_type'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'payment_processor_type', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -480,19 +454,7 @@ class CRM_Financial_DAO_PaymentProcessorType extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['payment_processor_type'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'payment_processor_type', $prefix, array()); + return $r; } } diff --git a/CRM/Financial/DAO/PaymentToken.php b/CRM/Financial/DAO/PaymentToken.php index 3cab610ea8..d1b6a6a2fd 100644 --- a/CRM/Financial/DAO/PaymentToken.php +++ b/CRM/Financial/DAO/PaymentToken.php @@ -59,20 +59,6 @@ class CRM_Financial_DAO_PaymentToken extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -342,20 +328,8 @@ class CRM_Financial_DAO_PaymentToken extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['payment_token'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'payment_token', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -365,19 +339,7 @@ class CRM_Financial_DAO_PaymentToken extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['payment_token'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'payment_token', $prefix, array()); + return $r; } } diff --git a/CRM/Friend/DAO/Friend.php b/CRM/Friend/DAO/Friend.php index 99d47ca54d..f8f303956d 100644 --- a/CRM/Friend/DAO/Friend.php +++ b/CRM/Friend/DAO/Friend.php @@ -59,20 +59,6 @@ class CRM_Friend_DAO_Friend extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -314,20 +300,8 @@ class CRM_Friend_DAO_Friend extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['tell_friend'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'tell_friend', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -337,19 +311,7 @@ class CRM_Friend_DAO_Friend extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['tell_friend'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'tell_friend', $prefix, array()); + return $r; } } diff --git a/CRM/Grant/DAO/Grant.php b/CRM/Grant/DAO/Grant.php index d881e49b8e..5bd37e837a 100644 --- a/CRM/Grant/DAO/Grant.php +++ b/CRM/Grant/DAO/Grant.php @@ -59,20 +59,6 @@ class CRM_Grant_DAO_Grant extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -479,20 +465,8 @@ class CRM_Grant_DAO_Grant extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['grant'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'grant', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -502,19 +476,7 @@ class CRM_Grant_DAO_Grant extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['grant'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'grant', $prefix, array()); + return $r; } } diff --git a/CRM/Mailing/DAO/BouncePattern.php b/CRM/Mailing/DAO/BouncePattern.php index cc888ec1a1..da29da5070 100644 --- a/CRM/Mailing/DAO/BouncePattern.php +++ b/CRM/Mailing/DAO/BouncePattern.php @@ -59,20 +59,6 @@ class CRM_Mailing_DAO_BouncePattern extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -193,20 +179,8 @@ class CRM_Mailing_DAO_BouncePattern extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['mailing_bounce_pattern'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_bounce_pattern', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -216,19 +190,7 @@ class CRM_Mailing_DAO_BouncePattern extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['mailing_bounce_pattern'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_bounce_pattern', $prefix, array()); + return $r; } } diff --git a/CRM/Mailing/DAO/BounceType.php b/CRM/Mailing/DAO/BounceType.php index 270dd28e1e..c31528c671 100644 --- a/CRM/Mailing/DAO/BounceType.php +++ b/CRM/Mailing/DAO/BounceType.php @@ -59,20 +59,6 @@ class CRM_Mailing_DAO_BounceType extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -195,20 +181,8 @@ class CRM_Mailing_DAO_BounceType extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['mailing_bounce_type'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_bounce_type', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -218,19 +192,7 @@ class CRM_Mailing_DAO_BounceType extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['mailing_bounce_type'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_bounce_type', $prefix, array()); + return $r; } } diff --git a/CRM/Mailing/DAO/Component.php b/CRM/Mailing/DAO/Component.php index ed66bc8841..8e71b90b97 100644 --- a/CRM/Mailing/DAO/Component.php +++ b/CRM/Mailing/DAO/Component.php @@ -59,20 +59,6 @@ class CRM_Mailing_DAO_Component extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -261,20 +247,8 @@ class CRM_Mailing_DAO_Component extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['mailing_component'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_component', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -284,19 +258,7 @@ class CRM_Mailing_DAO_Component extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['mailing_component'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_component', $prefix, array()); + return $r; } } diff --git a/CRM/Mailing/DAO/Mailing.php b/CRM/Mailing/DAO/Mailing.php index e574eccbd7..b6ee2d6497 100644 --- a/CRM/Mailing/DAO/Mailing.php +++ b/CRM/Mailing/DAO/Mailing.php @@ -59,20 +59,6 @@ class CRM_Mailing_DAO_Mailing extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -783,20 +769,8 @@ class CRM_Mailing_DAO_Mailing extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['mailing'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -806,19 +780,7 @@ class CRM_Mailing_DAO_Mailing extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['mailing'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing', $prefix, array()); + return $r; } } diff --git a/CRM/Mailing/DAO/MailingAB.php b/CRM/Mailing/DAO/MailingAB.php index 3ff0529f8b..910bce6e67 100644 --- a/CRM/Mailing/DAO/MailingAB.php +++ b/CRM/Mailing/DAO/MailingAB.php @@ -59,20 +59,6 @@ class CRM_Mailing_DAO_MailingAB extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -349,20 +335,8 @@ class CRM_Mailing_DAO_MailingAB extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['mailing_abtest'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_abtest', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -372,19 +346,7 @@ class CRM_Mailing_DAO_MailingAB extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['mailing_abtest'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_abtest', $prefix, array()); + return $r; } } diff --git a/CRM/Mailing/DAO/MailingGroup.php b/CRM/Mailing/DAO/MailingGroup.php index 4675968a20..461a041866 100644 --- a/CRM/Mailing/DAO/MailingGroup.php +++ b/CRM/Mailing/DAO/MailingGroup.php @@ -59,20 +59,6 @@ class CRM_Mailing_DAO_MailingGroup extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -259,20 +245,8 @@ class CRM_Mailing_DAO_MailingGroup extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['mailing_group'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_group', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -282,19 +256,7 @@ class CRM_Mailing_DAO_MailingGroup extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['mailing_group'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_group', $prefix, array()); + return $r; } } diff --git a/CRM/Mailing/DAO/MailingJob.php b/CRM/Mailing/DAO/MailingJob.php index ae78c1e301..e90b1d2a32 100644 --- a/CRM/Mailing/DAO/MailingJob.php +++ b/CRM/Mailing/DAO/MailingJob.php @@ -59,20 +59,6 @@ class CRM_Mailing_DAO_MailingJob extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -308,20 +294,8 @@ class CRM_Mailing_DAO_MailingJob extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['mailing_job'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_job', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -331,19 +305,7 @@ class CRM_Mailing_DAO_MailingJob extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['mailing_job'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_job', $prefix, array()); + return $r; } } diff --git a/CRM/Mailing/DAO/Recipients.php b/CRM/Mailing/DAO/Recipients.php index 0430ddcf92..7927419fca 100644 --- a/CRM/Mailing/DAO/Recipients.php +++ b/CRM/Mailing/DAO/Recipients.php @@ -59,20 +59,6 @@ class CRM_Mailing_DAO_Recipients extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -226,20 +212,8 @@ class CRM_Mailing_DAO_Recipients extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['mailing_recipients'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_recipients', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -249,19 +223,7 @@ class CRM_Mailing_DAO_Recipients extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['mailing_recipients'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_recipients', $prefix, array()); + return $r; } } diff --git a/CRM/Mailing/DAO/Spool.php b/CRM/Mailing/DAO/Spool.php index 596c1ae9dc..ee46e2c511 100644 --- a/CRM/Mailing/DAO/Spool.php +++ b/CRM/Mailing/DAO/Spool.php @@ -59,20 +59,6 @@ class CRM_Mailing_DAO_Spool extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -243,20 +229,8 @@ class CRM_Mailing_DAO_Spool extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['mailing_spool'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_spool', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -266,19 +240,7 @@ class CRM_Mailing_DAO_Spool extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['mailing_spool'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_spool', $prefix, array()); + return $r; } } diff --git a/CRM/Mailing/DAO/TrackableURL.php b/CRM/Mailing/DAO/TrackableURL.php index c8fe7cda59..bfc5809b67 100644 --- a/CRM/Mailing/DAO/TrackableURL.php +++ b/CRM/Mailing/DAO/TrackableURL.php @@ -59,20 +59,6 @@ class CRM_Mailing_DAO_TrackableURL extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -192,20 +178,8 @@ class CRM_Mailing_DAO_TrackableURL extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['mailing_trackable_url'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_trackable_url', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -215,19 +189,7 @@ class CRM_Mailing_DAO_TrackableURL extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['mailing_trackable_url'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_trackable_url', $prefix, array()); + return $r; } } diff --git a/CRM/Mailing/Event/DAO/Bounce.php b/CRM/Mailing/Event/DAO/Bounce.php index dd66ca2ba4..893328a7ea 100644 --- a/CRM/Mailing/Event/DAO/Bounce.php +++ b/CRM/Mailing/Event/DAO/Bounce.php @@ -59,20 +59,6 @@ class CRM_Mailing_Event_DAO_Bounce extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -228,20 +214,8 @@ class CRM_Mailing_Event_DAO_Bounce extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['mailing_event_bounce'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_event_bounce', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -251,19 +225,7 @@ class CRM_Mailing_Event_DAO_Bounce extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['mailing_event_bounce'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_event_bounce', $prefix, array()); + return $r; } } diff --git a/CRM/Mailing/Event/DAO/Confirm.php b/CRM/Mailing/Event/DAO/Confirm.php index 95ab2db549..7f82488fbd 100644 --- a/CRM/Mailing/Event/DAO/Confirm.php +++ b/CRM/Mailing/Event/DAO/Confirm.php @@ -59,20 +59,6 @@ class CRM_Mailing_Event_DAO_Confirm extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -192,20 +178,8 @@ class CRM_Mailing_Event_DAO_Confirm extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['mailing_event_confirm'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_event_confirm', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -215,19 +189,7 @@ class CRM_Mailing_Event_DAO_Confirm extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['mailing_event_confirm'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_event_confirm', $prefix, array()); + return $r; } } diff --git a/CRM/Mailing/Event/DAO/Delivered.php b/CRM/Mailing/Event/DAO/Delivered.php index 77c03cdfbe..dcc86b4602 100644 --- a/CRM/Mailing/Event/DAO/Delivered.php +++ b/CRM/Mailing/Event/DAO/Delivered.php @@ -59,20 +59,6 @@ class CRM_Mailing_Event_DAO_Delivered extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -192,20 +178,8 @@ class CRM_Mailing_Event_DAO_Delivered extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['mailing_event_delivered'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_event_delivered', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -215,19 +189,7 @@ class CRM_Mailing_Event_DAO_Delivered extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['mailing_event_delivered'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_event_delivered', $prefix, array()); + return $r; } } diff --git a/CRM/Mailing/Event/DAO/Forward.php b/CRM/Mailing/Event/DAO/Forward.php index dce54e316c..6cbfbdb19a 100644 --- a/CRM/Mailing/Event/DAO/Forward.php +++ b/CRM/Mailing/Event/DAO/Forward.php @@ -59,20 +59,6 @@ class CRM_Mailing_Event_DAO_Forward extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -207,20 +193,8 @@ class CRM_Mailing_Event_DAO_Forward extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['mailing_event_forward'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_event_forward', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -230,19 +204,7 @@ class CRM_Mailing_Event_DAO_Forward extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['mailing_event_forward'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_event_forward', $prefix, array()); + return $r; } } diff --git a/CRM/Mailing/Event/DAO/Opened.php b/CRM/Mailing/Event/DAO/Opened.php index cec83bb7ec..8ea1b5c93d 100644 --- a/CRM/Mailing/Event/DAO/Opened.php +++ b/CRM/Mailing/Event/DAO/Opened.php @@ -59,20 +59,6 @@ class CRM_Mailing_Event_DAO_Opened extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -192,20 +178,8 @@ class CRM_Mailing_Event_DAO_Opened extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['mailing_event_opened'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_event_opened', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -215,19 +189,7 @@ class CRM_Mailing_Event_DAO_Opened extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['mailing_event_opened'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_event_opened', $prefix, array()); + return $r; } } diff --git a/CRM/Mailing/Event/DAO/Queue.php b/CRM/Mailing/Event/DAO/Queue.php index 314434bffd..748802e882 100644 --- a/CRM/Mailing/Event/DAO/Queue.php +++ b/CRM/Mailing/Event/DAO/Queue.php @@ -59,20 +59,6 @@ class CRM_Mailing_Event_DAO_Queue extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -242,20 +228,8 @@ class CRM_Mailing_Event_DAO_Queue extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['mailing_event_queue'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_event_queue', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -265,19 +239,7 @@ class CRM_Mailing_Event_DAO_Queue extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['mailing_event_queue'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_event_queue', $prefix, array()); + return $r; } } diff --git a/CRM/Mailing/Event/DAO/Reply.php b/CRM/Mailing/Event/DAO/Reply.php index 45058ea832..57c3b97d06 100644 --- a/CRM/Mailing/Event/DAO/Reply.php +++ b/CRM/Mailing/Event/DAO/Reply.php @@ -59,20 +59,6 @@ class CRM_Mailing_Event_DAO_Reply extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -192,20 +178,8 @@ class CRM_Mailing_Event_DAO_Reply extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['mailing_event_reply'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_event_reply', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -215,19 +189,7 @@ class CRM_Mailing_Event_DAO_Reply extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['mailing_event_reply'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_event_reply', $prefix, array()); + return $r; } } diff --git a/CRM/Mailing/Event/DAO/Subscribe.php b/CRM/Mailing/Event/DAO/Subscribe.php index 54f102ff87..ce895591a0 100644 --- a/CRM/Mailing/Event/DAO/Subscribe.php +++ b/CRM/Mailing/Event/DAO/Subscribe.php @@ -59,20 +59,6 @@ class CRM_Mailing_Event_DAO_Subscribe extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -232,20 +218,8 @@ class CRM_Mailing_Event_DAO_Subscribe extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['mailing_event_subscribe'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_event_subscribe', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -255,19 +229,7 @@ class CRM_Mailing_Event_DAO_Subscribe extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['mailing_event_subscribe'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_event_subscribe', $prefix, array()); + return $r; } } diff --git a/CRM/Mailing/Event/DAO/TrackableURLOpen.php b/CRM/Mailing/Event/DAO/TrackableURLOpen.php index 2be5c0bc48..daf185d045 100644 --- a/CRM/Mailing/Event/DAO/TrackableURLOpen.php +++ b/CRM/Mailing/Event/DAO/TrackableURLOpen.php @@ -59,20 +59,6 @@ class CRM_Mailing_Event_DAO_TrackableURLOpen extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -208,20 +194,8 @@ class CRM_Mailing_Event_DAO_TrackableURLOpen extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['mailing_event_trackable_url_open'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_event_trackable_url_open', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -231,19 +205,7 @@ class CRM_Mailing_Event_DAO_TrackableURLOpen extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['mailing_event_trackable_url_open'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_event_trackable_url_open', $prefix, array()); + return $r; } } diff --git a/CRM/Mailing/Event/DAO/Unsubscribe.php b/CRM/Mailing/Event/DAO/Unsubscribe.php index 9ee7b397f9..65c0abd596 100644 --- a/CRM/Mailing/Event/DAO/Unsubscribe.php +++ b/CRM/Mailing/Event/DAO/Unsubscribe.php @@ -59,20 +59,6 @@ class CRM_Mailing_Event_DAO_Unsubscribe extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -206,20 +192,8 @@ class CRM_Mailing_Event_DAO_Unsubscribe extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['mailing_event_unsubscribe'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_event_unsubscribe', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -229,19 +203,7 @@ class CRM_Mailing_Event_DAO_Unsubscribe extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['mailing_event_unsubscribe'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_event_unsubscribe', $prefix, array()); + return $r; } } diff --git a/CRM/Member/DAO/Membership.php b/CRM/Member/DAO/Membership.php index 6e555bd557..2171426f3e 100644 --- a/CRM/Member/DAO/Membership.php +++ b/CRM/Member/DAO/Membership.php @@ -59,20 +59,6 @@ class CRM_Member_DAO_Membership extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -472,20 +458,8 @@ class CRM_Member_DAO_Membership extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['membership'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'membership', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -495,19 +469,7 @@ class CRM_Member_DAO_Membership extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['membership'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'membership', $prefix, array()); + return $r; } } diff --git a/CRM/Member/DAO/MembershipBlock.php b/CRM/Member/DAO/MembershipBlock.php index 90175bfe2d..4c858d5197 100644 --- a/CRM/Member/DAO/MembershipBlock.php +++ b/CRM/Member/DAO/MembershipBlock.php @@ -59,20 +59,6 @@ class CRM_Member_DAO_MembershipBlock extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -336,20 +322,8 @@ class CRM_Member_DAO_MembershipBlock extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['membership_block'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'membership_block', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -359,19 +333,7 @@ class CRM_Member_DAO_MembershipBlock extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['membership_block'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'membership_block', $prefix, array()); + return $r; } } diff --git a/CRM/Member/DAO/MembershipLog.php b/CRM/Member/DAO/MembershipLog.php index 78d1bf88ca..73cca13349 100644 --- a/CRM/Member/DAO/MembershipLog.php +++ b/CRM/Member/DAO/MembershipLog.php @@ -59,20 +59,6 @@ class CRM_Member_DAO_MembershipLog extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -276,20 +262,8 @@ class CRM_Member_DAO_MembershipLog extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['membership_log'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'membership_log', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -299,19 +273,7 @@ class CRM_Member_DAO_MembershipLog extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['membership_log'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'membership_log', $prefix, array()); + return $r; } } diff --git a/CRM/Member/DAO/MembershipPayment.php b/CRM/Member/DAO/MembershipPayment.php index 1abc323d35..da6c25ce8d 100644 --- a/CRM/Member/DAO/MembershipPayment.php +++ b/CRM/Member/DAO/MembershipPayment.php @@ -59,20 +59,6 @@ class CRM_Member_DAO_MembershipPayment extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -193,20 +179,8 @@ class CRM_Member_DAO_MembershipPayment extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['membership_payment'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'membership_payment', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -216,19 +190,7 @@ class CRM_Member_DAO_MembershipPayment extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['membership_payment'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'membership_payment', $prefix, array()); + return $r; } } diff --git a/CRM/Member/DAO/MembershipStatus.php b/CRM/Member/DAO/MembershipStatus.php index 4aa215c813..e8cdf6501f 100644 --- a/CRM/Member/DAO/MembershipStatus.php +++ b/CRM/Member/DAO/MembershipStatus.php @@ -59,20 +59,6 @@ class CRM_Member_DAO_MembershipStatus extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -374,20 +360,8 @@ class CRM_Member_DAO_MembershipStatus extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['membership_status'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'membership_status', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -397,19 +371,7 @@ class CRM_Member_DAO_MembershipStatus extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['membership_status'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'membership_status', $prefix, array()); + return $r; } } diff --git a/CRM/Member/DAO/MembershipType.php b/CRM/Member/DAO/MembershipType.php index b530a96150..0cad73d35c 100644 --- a/CRM/Member/DAO/MembershipType.php +++ b/CRM/Member/DAO/MembershipType.php @@ -59,20 +59,6 @@ class CRM_Member_DAO_MembershipType extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -492,20 +478,8 @@ class CRM_Member_DAO_MembershipType extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['membership_type'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'membership_type', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -515,19 +489,7 @@ class CRM_Member_DAO_MembershipType extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['membership_type'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'membership_type', $prefix, array()); + return $r; } } diff --git a/CRM/PCP/DAO/PCP.php b/CRM/PCP/DAO/PCP.php index f01281c849..eedd42e78b 100644 --- a/CRM/PCP/DAO/PCP.php +++ b/CRM/PCP/DAO/PCP.php @@ -59,20 +59,6 @@ class CRM_PCP_DAO_PCP extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -418,20 +404,8 @@ class CRM_PCP_DAO_PCP extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['pcp'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'pcp', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -441,19 +415,7 @@ class CRM_PCP_DAO_PCP extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['pcp'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'pcp', $prefix, array()); + return $r; } } diff --git a/CRM/PCP/DAO/PCPBlock.php b/CRM/PCP/DAO/PCPBlock.php index 792265ff57..ec1c2b8a06 100644 --- a/CRM/PCP/DAO/PCPBlock.php +++ b/CRM/PCP/DAO/PCPBlock.php @@ -59,20 +59,6 @@ class CRM_PCP_DAO_PCPBlock extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -348,20 +334,8 @@ class CRM_PCP_DAO_PCPBlock extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['pcp_block'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'pcp_block', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -371,19 +345,7 @@ class CRM_PCP_DAO_PCPBlock extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['pcp_block'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'pcp_block', $prefix, array()); + return $r; } } diff --git a/CRM/Pledge/DAO/Pledge.php b/CRM/Pledge/DAO/Pledge.php index 29feea90fc..2f8a5a8bc2 100644 --- a/CRM/Pledge/DAO/Pledge.php +++ b/CRM/Pledge/DAO/Pledge.php @@ -59,20 +59,6 @@ class CRM_Pledge_DAO_Pledge extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -600,20 +586,8 @@ class CRM_Pledge_DAO_Pledge extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['pledge'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'pledge', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -623,19 +597,7 @@ class CRM_Pledge_DAO_Pledge extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['pledge'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'pledge', $prefix, array()); + return $r; } } diff --git a/CRM/Pledge/DAO/PledgeBlock.php b/CRM/Pledge/DAO/PledgeBlock.php index 6117ac2bdb..41159d1531 100644 --- a/CRM/Pledge/DAO/PledgeBlock.php +++ b/CRM/Pledge/DAO/PledgeBlock.php @@ -59,20 +59,6 @@ class CRM_Pledge_DAO_PledgeBlock extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -307,20 +293,8 @@ class CRM_Pledge_DAO_PledgeBlock extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['pledge_block'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'pledge_block', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -330,19 +304,7 @@ class CRM_Pledge_DAO_PledgeBlock extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['pledge_block'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'pledge_block', $prefix, array()); + return $r; } } diff --git a/CRM/Pledge/DAO/PledgePayment.php b/CRM/Pledge/DAO/PledgePayment.php index 806be3a26b..b4f11f4ae0 100644 --- a/CRM/Pledge/DAO/PledgePayment.php +++ b/CRM/Pledge/DAO/PledgePayment.php @@ -59,20 +59,6 @@ class CRM_Pledge_DAO_PledgePayment extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -343,20 +329,8 @@ class CRM_Pledge_DAO_PledgePayment extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['pledge_payment'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'pledge_payment', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -366,19 +340,7 @@ class CRM_Pledge_DAO_PledgePayment extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['pledge_payment'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'pledge_payment', $prefix, array()); + return $r; } } diff --git a/CRM/Price/DAO/LineItem.php b/CRM/Price/DAO/LineItem.php index 691c823d67..bb86f1b1fb 100644 --- a/CRM/Price/DAO/LineItem.php +++ b/CRM/Price/DAO/LineItem.php @@ -59,20 +59,6 @@ class CRM_Price_DAO_LineItem extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -408,20 +394,8 @@ class CRM_Price_DAO_LineItem extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['line_item'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'line_item', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -431,19 +405,7 @@ class CRM_Price_DAO_LineItem extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['line_item'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'line_item', $prefix, array()); + return $r; } } diff --git a/CRM/Price/DAO/PriceField.php b/CRM/Price/DAO/PriceField.php index f5a38ed954..7c139a23de 100644 --- a/CRM/Price/DAO/PriceField.php +++ b/CRM/Price/DAO/PriceField.php @@ -59,20 +59,6 @@ class CRM_Price_DAO_PriceField extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -448,20 +434,8 @@ class CRM_Price_DAO_PriceField extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['price_field'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'price_field', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -471,19 +445,7 @@ class CRM_Price_DAO_PriceField extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['price_field'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'price_field', $prefix, array()); + return $r; } } diff --git a/CRM/Price/DAO/PriceFieldValue.php b/CRM/Price/DAO/PriceFieldValue.php index ed951ec4c9..14c6b7446d 100644 --- a/CRM/Price/DAO/PriceFieldValue.php +++ b/CRM/Price/DAO/PriceFieldValue.php @@ -59,20 +59,6 @@ class CRM_Price_DAO_PriceFieldValue extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -455,20 +441,8 @@ class CRM_Price_DAO_PriceFieldValue extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['price_field_value'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'price_field_value', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -478,19 +452,7 @@ class CRM_Price_DAO_PriceFieldValue extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['price_field_value'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'price_field_value', $prefix, array()); + return $r; } } diff --git a/CRM/Price/DAO/PriceSet.php b/CRM/Price/DAO/PriceSet.php index 741b2633aa..e8ca215ddf 100644 --- a/CRM/Price/DAO/PriceSet.php +++ b/CRM/Price/DAO/PriceSet.php @@ -59,20 +59,6 @@ class CRM_Price_DAO_PriceSet extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -376,20 +362,8 @@ class CRM_Price_DAO_PriceSet extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['price_set'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'price_set', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -399,19 +373,7 @@ class CRM_Price_DAO_PriceSet extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['price_set'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'price_set', $prefix, array()); + return $r; } } diff --git a/CRM/Price/DAO/PriceSetEntity.php b/CRM/Price/DAO/PriceSetEntity.php index 3cb2dfd252..feaa971e84 100644 --- a/CRM/Price/DAO/PriceSetEntity.php +++ b/CRM/Price/DAO/PriceSetEntity.php @@ -59,20 +59,6 @@ class CRM_Price_DAO_PriceSetEntity extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -211,20 +197,8 @@ class CRM_Price_DAO_PriceSetEntity extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['price_set_entity'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'price_set_entity', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -234,19 +208,7 @@ class CRM_Price_DAO_PriceSetEntity extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['price_set_entity'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'price_set_entity', $prefix, array()); + return $r; } } diff --git a/CRM/Queue/DAO/QueueItem.php b/CRM/Queue/DAO/QueueItem.php index c3cbcf29d9..8c64aeb381 100644 --- a/CRM/Queue/DAO/QueueItem.php +++ b/CRM/Queue/DAO/QueueItem.php @@ -59,20 +59,6 @@ class CRM_Queue_DAO_QueueItem extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -230,20 +216,8 @@ class CRM_Queue_DAO_QueueItem extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['queue_item'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'queue_item', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -253,19 +227,7 @@ class CRM_Queue_DAO_QueueItem extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['queue_item'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'queue_item', $prefix, array()); + return $r; } } diff --git a/CRM/Report/DAO/ReportInstance.php b/CRM/Report/DAO/ReportInstance.php index 4ec2c7c033..478666c7a3 100644 --- a/CRM/Report/DAO/ReportInstance.php +++ b/CRM/Report/DAO/ReportInstance.php @@ -59,20 +59,6 @@ class CRM_Report_DAO_ReportInstance extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -516,20 +502,8 @@ class CRM_Report_DAO_ReportInstance extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['report_instance'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'report_instance', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -539,19 +513,7 @@ class CRM_Report_DAO_ReportInstance extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['report_instance'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'report_instance', $prefix, array()); + return $r; } } diff --git a/CRM/SMS/DAO/Provider.php b/CRM/SMS/DAO/Provider.php index 019fa27744..3f86628959 100644 --- a/CRM/SMS/DAO/Provider.php +++ b/CRM/SMS/DAO/Provider.php @@ -59,20 +59,6 @@ class CRM_SMS_DAO_Provider extends CRM_Core_DAO { * @var string */ static $_links = null; - /** - * static instance to hold the values that can - * be imported - * - * @var array - */ - static $_import = null; - /** - * static instance to hold the values that can - * be exported - * - * @var array - */ - static $_export = null; /** * static value to see if we should log any modifications to * this table in the civicrm_log table @@ -294,20 +280,8 @@ class CRM_SMS_DAO_Provider extends CRM_Core_DAO { * @return array */ static function &import($prefix = false) { - if (!(self::$_import)) { - self::$_import = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('import', $field)) { - if ($prefix) { - self::$_import['sms_provider'] = & $fields[$name]; - } else { - self::$_import[$name] = & $fields[$name]; - } - } - } - } - return self::$_import; + $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'sms_provider', $prefix, array()); + return $r; } /** * Returns the list of fields that can be exported @@ -317,19 +291,7 @@ class CRM_SMS_DAO_Provider extends CRM_Core_DAO { * @return array */ static function &export($prefix = false) { - if (!(self::$_export)) { - self::$_export = array(); - $fields = self::fields(); - foreach($fields as $name => $field) { - if (CRM_Utils_Array::value('export', $field)) { - if ($prefix) { - self::$_export['sms_provider'] = & $fields[$name]; - } else { - self::$_export[$name] = & $fields[$name]; - } - } - } - } - return self::$_export; + $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'sms_provider', $prefix, array()); + return $r; } } -- 2.25.1