From 8ef12e641c29ddfb6ea443c61ac323b71dbcdb4a Mon Sep 17 00:00:00 2001 From: eileen Date: Tue, 18 Jun 2013 13:55:43 +1200 Subject: [PATCH] remove new trailing spaces --- CRM/Activity/Form/Search.php | 22 ++++----- CRM/Admin/Form/Navigation.php | 2 +- CRM/Admin/Form/Options.php | 6 +-- CRM/Admin/Form/PaymentProcessor.php | 12 ++--- CRM/Admin/Form/ScheduleReminders.php | 2 +- CRM/Admin/Page/AJAX.php | 14 +++--- CRM/Admin/Page/Admin.php | 2 +- CRM/Admin/Page/ConfigTaskList.php | 2 +- CRM/Admin/Page/Extensions.php | 2 +- CRM/Admin/Page/Navigation.php | 2 +- CRM/Admin/Page/Options.php | 3 +- CRM/Admin/Page/PaymentProcessor.php | 4 +- CRM/Batch/Form/Batch.php | 6 +-- CRM/Batch/Form/Entry.php | 48 +++++++++---------- CRM/Bridge/OG/CiviCRM.php | 2 +- CRM/Campaign/BAO/Petition.php | 14 +++--- CRM/Campaign/BAO/Query.php | 2 +- CRM/Campaign/BAO/Survey.php | 2 +- CRM/Campaign/Form/Petition.php | 6 +-- CRM/Campaign/Form/Search.php | 6 +-- CRM/Campaign/Form/Survey/Delete.php | 2 +- CRM/Campaign/Form/Survey/Results.php | 16 +++---- CRM/Campaign/Form/Task/Interview.php | 14 +++--- CRM/Campaign/Page/Vote.php | 2 +- CRM/Campaign/xml/Menu/Campaign.xml | 4 +- CRM/Case/Audit/audit.conf.xml | 8 ++-- CRM/Case/BAO/Case.php | 4 +- CRM/Case/Form/Activity.php | 2 +- CRM/Case/Form/Task/SearchTaskHookSample.php | 2 +- CRM/Case/Page/AJAX.php | 2 +- CRM/Case/PseudoConstant.php | 2 +- CRM/Case/XMLProcessor/Process.php | 2 +- CRM/Case/XMLProcessor/Report.php | 2 +- CRM/Case/XMLProcessor/Settings.php | 2 +- CRM/Case/xml/HRD/HRD.mysql | 8 ++-- .../AdultDayCareReferral.xml | 2 +- .../configuration.sample/HousingSupport.xml | 4 +- .../configuration.sample/SampleConfig.mysql | 2 +- .../xml/configuration.sample/Settings.xml | 4 +- CRM/Contact/BAO/Contact/Location.php | 4 +- CRM/Contact/Form/Contact.php | 4 +- CRM/Contact/Form/CustomData.php | 4 +- CRM/Contact/Form/DedupeRules.php | 8 ++-- CRM/Contact/Form/Domain.php | 6 +-- CRM/Contact/Form/Edit/Individual.php | 6 +-- CRM/Contact/Form/Merge.php | 10 ++-- .../Form/Search/Custom/ActivitySearch.php | 2 +- CRM/Contact/Form/Task.php | 10 ++-- CRM/Contact/Form/Task/Batch.php | 20 ++++---- CRM/Contact/Form/Task/PDFLetterCommon.php | 2 +- CRM/Contact/Form/Task/Unhold.php | 2 +- CRM/Contact/Page/DedupeFind.php | 2 +- CRM/Contact/Page/Inline/Actions.php | 4 +- CRM/Contact/Page/Inline/Address.php | 12 ++--- .../Page/Inline/CommunicationPreferences.php | 6 +-- CRM/Contact/Page/Inline/ContactInfo.php | 6 +-- CRM/Contact/Page/Inline/ContactName.php | 14 +++--- CRM/Contact/Page/Inline/Demographics.php | 8 ++-- CRM/Contact/Page/Inline/Email.php | 4 +- CRM/Contact/Page/Inline/IM.php | 6 +-- CRM/Contact/Page/Inline/OpenID.php | 6 +-- CRM/Contact/Page/Inline/Phone.php | 6 +-- CRM/Contact/Page/Inline/Website.php | 6 +-- CRM/Contact/Page/View/Log.php | 4 +- CRM/Contact/Page/View/Note.php | 2 +- CRM/Contribute/BAO/Contribution.php | 4 +- CRM/Contribute/BAO/ContributionPage.php | 8 ++-- CRM/Contribute/Form/Contribution.php | 2 +- CRM/Contribute/Form/SoftCredit.php | 2 +- CRM/Contribute/Import/Parser/Contribution.php | 2 +- CRM/Core/BAO/CustomValueTable.php | 2 +- CRM/Core/BAO/EntityTag.php | 4 +- CRM/Core/BAO/Mapping.php | 10 ++-- CRM/Core/I18n/PseudoConstant.php | 2 +- CRM/Core/OptionGroup.php | 4 +- CRM/Core/Page.php | 2 +- CRM/Core/PseudoConstant.php | 2 +- CRM/Core/Resources.php | 2 +- CRM/Core/ScheduledJob.php | 4 +- CRM/Core/xml/Menu/Activity.xml | 2 +- CRM/Custom/Form/ChangeFieldType.php | 2 +- CRM/Custom/Form/CustomData.php | 4 +- CRM/Custom/Form/DeleteField.php | 2 +- CRM/Custom/Form/DeleteGroup.php | 2 +- CRM/Custom/Form/Field.php | 10 ++-- CRM/Custom/Form/Group.php | 2 +- CRM/Custom/Form/MoveField.php | 2 +- CRM/Custom/Form/Preview.php | 2 +- CRM/Dedupe/Finder.php | 2 +- CRM/Event/Form/EventFees.php | 4 +- CRM/Event/Form/Registration.php | 4 +- CRM/Financial/BAO/FinancialType.php | 20 ++++---- CRM/Financial/BAO/FinancialTypeAccount.php | 8 ++-- CRM/Financial/Form/FinancialAccount.php | 8 ++-- CRM/Financial/Form/FinancialTypeAccount.php | 16 +++---- CRM/Financial/Page/FinancialTypeAccount.php | 2 +- CRM/Friend/BAO/Friend.php | 2 +- CRM/Logging/Differ.php | 14 +++--- CRM/Member/BAO/Membership.php | 40 ++++++++-------- CRM/Member/Page/DashBoard.php | 10 ++-- CRM/Report/Form/Case/TimeSpent.php | 2 +- CRM/Report/Form/Contact/Detail.php | 4 +- CRM/Report/Form/Contribute/Detail.php | 2 +- CRM/Upgrade/Incremental/sql/4.3.4.mysql.tpl | 18 +++---- api/class.api.php | 2 +- api/v3/Contribution.php | 2 +- api/v3/MessageTemplates.php | 2 +- templates/CRM/Activity/Form/Activity.tpl | 2 +- .../api/v3/dataset/mailing_bounced.xml | 2 +- .../api/v3/dataset/mailing_delivered.xml | 2 +- 110 files changed, 326 insertions(+), 327 deletions(-) diff --git a/CRM/Activity/Form/Search.php b/CRM/Activity/Form/Search.php index fa430881e6..b3403e087c 100644 --- a/CRM/Activity/Form/Search.php +++ b/CRM/Activity/Form/Search.php @@ -437,21 +437,21 @@ class CRM_Activity_Form_Search extends CRM_Core_Form { $this->_single = TRUE; } } - + // Added for membership search - + $signupType = CRM_Utils_Request::retrieve('signupType', 'Positive', CRM_Core_DAO::$_nullObject ); - + if ($signupType) { //$this->_formValues['activity_type_id'] = array(); - + $activityTypes = CRM_Core_PseudoConstant::activityType(TRUE, FALSE, FALSE, 'name'); $renew = CRM_Utils_Array::key('Membership Renewal', $activityTypes); $signup = CRM_Utils_Array::key('Membership Signup', $activityTypes); - + switch ($signupType) { case 3: // signups and renewals $this->_formValues['activity_type_id'][$renew] = 1; @@ -460,18 +460,18 @@ class CRM_Activity_Form_Search extends CRM_Core_Form { $this->_formValues['activity_type_id'][$signup] = 1; $this->_defaults['activity_type_id'][$signup] = 1; break; - + case 2: // renewals only $this->_formValues['activity_type_id'][$renew] = 1; $this->_defaults['activity_type_id'][$renew] = 1; break; } } - + $dateLow = CRM_Utils_Request::retrieve('dateLow', 'String', CRM_Core_DAO::$_nullObject ); - + if ($dateLow) { $dateLow = date('m/d/Y', strtotime($dateLow)); $this->_formValues['activity_date_relative'] = 0; @@ -479,11 +479,11 @@ class CRM_Activity_Form_Search extends CRM_Core_Form { $this->_formValues['activity_date_low'] = $dateLow; $this->_defaults['activity_date_low'] = $dateLow; } - + $dateHigh = CRM_Utils_Request::retrieve('dateHigh', 'String', CRM_Core_DAO::$_nullObject ); - + if ($dateHigh) { // Activity date time assumes midnight at the beginning of the date // This sets it to almost midnight at the end of the date @@ -495,7 +495,7 @@ class CRM_Activity_Form_Search extends CRM_Core_Form { $this->_defaults['activity_date_relative'] = 0; $this->_formValues['activity_date_high'] = $dateHigh; $this->_defaults['activity_date_high'] = $dateHigh; - } + } if (!empty($this->_defaults)) { $this->setDefaults($this->_defaults); diff --git a/CRM/Admin/Form/Navigation.php b/CRM/Admin/Form/Navigation.php index 3f57bcd66e..1275b77bc4 100644 --- a/CRM/Admin/Form/Navigation.php +++ b/CRM/Admin/Form/Navigation.php @@ -95,7 +95,7 @@ class CRM_Admin_Form_Navigation extends CRM_Admin_Form { //make separator location configurable $separator = array(0 => 'None', 1 => 'After Menu Element', 2 => 'Before Menu Element'); $this->add('select', 'has_separator', ts('Separator?'), $separator); - + $active = $this->add('checkbox', 'is_active', ts('Enabled?')); if (CRM_Utils_Array::value('name', $this->_defaults) == 'Home') { diff --git a/CRM/Admin/Form/Options.php b/CRM/Admin/Form/Options.php index 32ae6c12f8..bb815a9e53 100644 --- a/CRM/Admin/Form/Options.php +++ b/CRM/Admin/Form/Options.php @@ -192,8 +192,8 @@ class CRM_Admin_Form_Options extends CRM_Admin_Form { if ($this->_gName == 'payment_instrument') { $accountType = CRM_Core_PseudoConstant::accountOptionValues('financial_account_type', NULL, " AND v.name = 'Asset' "); $financialAccount = CRM_Contribute_PseudoConstant::financialAccount(NULL, key($accountType)); - - $this->add('select', 'financial_account_id', ts('Financial Account'), + + $this->add('select', 'financial_account_id', ts('Financial Account'), array('' => ts('- select -')) + $financialAccount ); } @@ -402,7 +402,7 @@ class CRM_Admin_Form_Options extends CRM_Admin_Form { $groupParams = array('name' => ($this->_gName)); $optionValue = CRM_Core_OptionValue::addOptionValue($params, $groupParams, $this->_action, $this->_id); - + // CRM-11516 if (CRM_Utils_Array::value('financial_account_id', $params)) { $relationTypeId = key(CRM_Core_PseudoConstant::accountOptionValues('account_relationship', NULL, " AND v.name LIKE 'Asset Account is' ")); diff --git a/CRM/Admin/Form/PaymentProcessor.php b/CRM/Admin/Form/PaymentProcessor.php index bc34146d0e..5f6e166538 100644 --- a/CRM/Admin/Form/PaymentProcessor.php +++ b/CRM/Admin/Form/PaymentProcessor.php @@ -45,7 +45,7 @@ class CRM_Admin_Form_PaymentProcessor extends CRM_Admin_Form { protected $_fields = NULL; protected $_ppDAO; - + function preProcess() { parent::preProcess(); @@ -185,7 +185,7 @@ class CRM_Admin_Form_PaymentProcessor extends CRM_Admin_Form { $types = CRM_Core_PseudoConstant::paymentProcessorType(); $this->add( 'select', 'payment_processor_type_id', ts('Payment Processor Type'), $types, true, - array('onchange' => "reload(true)") + array('onchange' => "reload(true)") ); // Financial Account of account type asset CRM-11515 @@ -194,9 +194,9 @@ class CRM_Admin_Form_PaymentProcessor extends CRM_Admin_Form { if ($fcount = count($financialAccount)) { $this->assign('financialAccount', $fcount); } - $this->add('select', 'financial_account_id', ts('Financial Account'), + $this->add('select', 'financial_account_id', ts('Financial Account'), array('' => ts('- select -')) + $financialAccount, - true + true ); // is this processor active ? $this->add('checkbox', 'is_active', ts('Is this Payment Processor active?')); @@ -377,9 +377,9 @@ class CRM_Admin_Form_PaymentProcessor extends CRM_Admin_Form { $dao->payment_type = $this->_ppDAO->payment_type; $dao->save(); - + //CRM-11515 - + $relationTypeId = key(CRM_Core_PseudoConstant::accountOptionValues('account_relationship', NULL, " AND v.name LIKE 'Asset Account is' ")); $params = array( 'entity_table' => 'civicrm_payment_processor', diff --git a/CRM/Admin/Form/ScheduleReminders.php b/CRM/Admin/Form/ScheduleReminders.php index dbefe63ece..c655db408e 100644 --- a/CRM/Admin/Form/ScheduleReminders.php +++ b/CRM/Admin/Form/ScheduleReminders.php @@ -177,7 +177,7 @@ class CRM_Admin_Form_ScheduleReminders extends CRM_Admin_Form { $limitOptions = array(1 => ts('Limit to'), 0 => ts('Addition to')); $this->add('select', 'limit_to', ts('Limit Options'), $limitOptions); - + $this->add('select', 'recipient', ts('Recipients'), $sel5[$recipient], FALSE, array('onClick' => "showHideByValue('recipient','manual','recipientManual','table-row','select',false); showHideByValue('recipient','group','recipientGroup','table-row','select',false);") ); diff --git a/CRM/Admin/Page/AJAX.php b/CRM/Admin/Page/AJAX.php index 74caa4451f..d2e5e2cf26 100644 --- a/CRM/Admin/Page/AJAX.php +++ b/CRM/Admin/Page/AJAX.php @@ -132,7 +132,7 @@ class CRM_Admin_Page_AJAX { case 'CRM_Financial_BAO_FinancialType': $status = ts('Are you sure you want to disable this financial type?'); break; - + case 'CRM_Financial_BAO_FinancialAccount': if (!CRM_Financial_BAO_FinancialAccount::getARAccounts($recordID)) { $show = 'noButton'; @@ -143,7 +143,7 @@ class CRM_Admin_Page_AJAX { } break; - case 'CRM_Financial_BAO_PaymentProcessor': + case 'CRM_Financial_BAO_PaymentProcessor': $status = ts('Are you sure you want to disable this payment processor?') . '

' . ts('Users will no longer be able to select this value when adding or editing transaction pages.'); break; @@ -222,7 +222,7 @@ class CRM_Admin_Page_AJAX { $status .= '

' . ts('This recurring contribution is linked to an auto-renew membership. If you cancel it, the associated membership will no longer renew automatically. However, the current membership status will not be affected.') . ''; } break; - + case 'CRM_Batch_BAO_Batch': if ($op == 'close') { $status = ts('Are you sure you want to close this batch?'); @@ -243,7 +243,7 @@ class CRM_Admin_Page_AJAX { $status = ts('Are you sure you want to assign this financial transaction to the batch?'); } break; - + default: $status = ts('Are you sure you want to disable this record?'); break; @@ -314,11 +314,11 @@ class CRM_Admin_Page_AJAX { // query to list mergable tags $query = " SELECT t1.name, t1.id, t1.used_for, t2.name as parent -FROM civicrm_tag t1 +FROM civicrm_tag t1 LEFT JOIN civicrm_tag t2 ON t1.parent_id = t2.id -WHERE t1.id <> {$fromId} AND +WHERE t1.id <> {$fromId} AND t1.name LIKE '%{$name}%' AND - ({$usedForClause}) + ({$usedForClause}) LIMIT $limit"; $dao = CRM_Core_DAO::executeQuery($query); diff --git a/CRM/Admin/Page/Admin.php b/CRM/Admin/Page/Admin.php index 6c7ea745f4..0e881b3c1f 100644 --- a/CRM/Admin/Page/Admin.php +++ b/CRM/Admin/Page/Admin.php @@ -95,7 +95,7 @@ class CRM_Admin_Page_Admin extends CRM_Core_Page { $this->_showHide = new CRM_Core_ShowHideBlocks(); foreach ($groups as $group => $title) { $groupId = str_replace(' ', '_', $group); - + $this->_showHide->addShow("id_{$groupId}_show"); $this->_showHide->addHide("id_{$groupId}"); $v = CRM_Core_ShowHideBlocks::links($this, $groupId, '', '', FALSE); diff --git a/CRM/Admin/Page/ConfigTaskList.php b/CRM/Admin/Page/ConfigTaskList.php index 31ecd8630e..cf7c7e8040 100644 --- a/CRM/Admin/Page/ConfigTaskList.php +++ b/CRM/Admin/Page/ConfigTaskList.php @@ -55,7 +55,7 @@ class CRM_Admin_Page_ConfigTaskList extends CRM_Core_Page { list($id) = array_keys($optionValue); $this->assign('fromEmailId', $id); } - + $payPalProId = CRM_Core_DAO::getFieldValue( 'CRM_Financial_DAO_PaymentProcessorType', 'PayPal', 'id', 'name' ); diff --git a/CRM/Admin/Page/Extensions.php b/CRM/Admin/Page/Extensions.php index a6bc3528c0..a62a0d6129 100644 --- a/CRM/Admin/Page/Extensions.php +++ b/CRM/Admin/Page/Extensions.php @@ -58,7 +58,7 @@ class CRM_Admin_Page_Extensions extends CRM_Core_Page_Basic { CRM_Utils_System::setTitle(ts('CiviCRM Extensions')); $destination = CRM_Utils_System::url( 'civicrm/admin/extensions', 'reset=1' ); - + $destination = urlencode( $destination ); $this->assign( 'destination', $destination ); } diff --git a/CRM/Admin/Page/Navigation.php b/CRM/Admin/Page/Navigation.php index cdd25d3b3c..9e17879aa2 100644 --- a/CRM/Admin/Page/Navigation.php +++ b/CRM/Admin/Page/Navigation.php @@ -96,7 +96,7 @@ class CRM_Admin_Page_Navigation extends CRM_Core_Page_Basic { // assign home id to the template $homeMenuId = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_Navigation', 'Home', 'id', 'name'); $this->assign('homeMenuId', $homeMenuId); - + // Add jstree support CRM_Core_Resources::singleton() ->addScriptFile('civicrm', 'packages/jquery/plugins/jstree/jquery.jstree.js', 0, 'html-header', FALSE) diff --git a/CRM/Admin/Page/Options.php b/CRM/Admin/Page/Options.php index e9ec1ef8c3..ccfe9c0cd5 100644 --- a/CRM/Admin/Page/Options.php +++ b/CRM/Admin/Page/Options.php @@ -227,8 +227,7 @@ class CRM_Admin_Page_Options extends CRM_Core_Page_Basic { // retrieve financial account name for the payment instrument page if ($gName = "payment_instrument") { foreach ($optionValue as $key => $option) { - $optionValue[$key]['financial_account'] = CRM_Financial_BAO_FinancialTypeAccount::getFinancialAccount($key, 'civicrm_option_value'); - } + $optionValue[$key]['financial_account'] = CRM_Financial_BAO_FinancialTypeAccount::getFinancialAccount($key, 'civicrm_option_value'); } } $this->assign('rows', $optionValue); diff --git a/CRM/Admin/Page/PaymentProcessor.php b/CRM/Admin/Page/PaymentProcessor.php index 9c5d6a261c..f21bc804f3 100644 --- a/CRM/Admin/Page/PaymentProcessor.php +++ b/CRM/Admin/Page/PaymentProcessor.php @@ -134,7 +134,7 @@ class CRM_Admin_Page_PaymentProcessor extends CRM_Core_Page_Basic { while ($dao->fetch()) { $paymentProcessor[$dao->id] = array(); CRM_Core_DAO::storeValues($dao, $paymentProcessor[$dao->id]); - $paymentProcessor[$dao->id]['payment_processor_type'] = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_PaymentProcessorType', + $paymentProcessor[$dao->id]['payment_processor_type'] = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_PaymentProcessorType', $paymentProcessor[$dao->id]['payment_processor_type_id']); // form all action links @@ -151,7 +151,7 @@ class CRM_Admin_Page_PaymentProcessor extends CRM_Core_Page_Basic { $paymentProcessor[$dao->id]['action'] = CRM_Core_Action::formLink(self::links(), $action, array('id' => $dao->id) ); - $paymentProcessor[$dao->id]['financialAccount'] = CRM_Financial_BAO_FinancialTypeAccount::getFinancialAccount($dao->id, 'civicrm_payment_processor'); + $paymentProcessor[$dao->id]['financialAccount'] = CRM_Financial_BAO_FinancialTypeAccount::getFinancialAccount($dao->id, 'civicrm_payment_processor'); } $this->assign('rows', $paymentProcessor); diff --git a/CRM/Batch/Form/Batch.php b/CRM/Batch/Form/Batch.php index c722d7b45f..3af565e66a 100644 --- a/CRM/Batch/Form/Batch.php +++ b/CRM/Batch/Form/Batch.php @@ -64,7 +64,7 @@ class CRM_Batch_Form_Batch extends CRM_Admin_Form { $this->add('text', 'title', ts('Batch Name'), $attributes['name'], TRUE); $batchTypes = CRM_Core_PseudoConstant::get('CRM_Batch_DAO_Batch', 'type_id'); - + // unset non-related types unset($batchTypes[3]); unset($batchTypes[4]); @@ -124,9 +124,9 @@ class CRM_Batch_Form_Batch extends CRM_Admin_Form { $params['created_id'] = $session->get('userID'); $params['created_date'] = CRM_Utils_Date::processDate( date( "Y-m-d" ), date( "H:i:s" ) ); } - + // always create with data entry status - $params['status_id'] = 3; + $params['status_id'] = 3; $batch = CRM_Batch_BAO_Batch::create($params); // redirect to batch entry page. diff --git a/CRM/Batch/Form/Entry.php b/CRM/Batch/Form/Entry.php index 58c85a9788..b3663b8665 100644 --- a/CRM/Batch/Form/Entry.php +++ b/CRM/Batch/Form/Entry.php @@ -60,7 +60,7 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { protected $_profileId; public $_action; - + public $_mode; public $_params; @@ -81,12 +81,12 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { * * @return void * @access public - */ + */ function preProcess() { $this->_batchId = CRM_Utils_Request::retrieve('id', 'Positive', $this, TRUE); $this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse'); - + if (empty($this->_batchInfo)) { $params = array('id' => $this->_batchId); CRM_Batch_BAO_Batch::retrieve($params, $this->_batchInfo); @@ -238,11 +238,11 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { if (CRM_Utils_Array::value($key, $params['soft_credit_contact_select_id']) && !CRM_Utils_Array::value($key, $params['soft_credit_amount'])) { $errors["soft_credit_amount[$key]"] = ts('Please enter the soft credit amount'); } - if (CRM_Utils_Array::value($key, $params['soft_credit_amount']) + if (CRM_Utils_Array::value($key, $params['soft_credit_amount']) && CRM_Utils_Rule::cleanMoney(CRM_Utils_Array::value($key, $params['soft_credit_amount'])) > CRM_Utils_Rule::cleanMoney($value['total_amount'])) { $errors["soft_credit_amount[$key]"] = ts('Soft credit amount should not be greater than the total amount'); } - + //membership type is required for membership batch entry if ( $self->_batchInfo['type_id'] == 2 ) { if ( !CRM_Utils_Array::value( 1, $value['membership_type'] ) ) { @@ -291,19 +291,19 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { //get all status $allStatus = CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'name'); - $completeStatus = array_search( 'Completed', $allStatus ); - $specialFields = array( + $completeStatus = array_search( 'Completed', $allStatus ); + $specialFields = array( 'join_date' => $currentDate, 'receive_date' => $currentDate, 'receive_date_time' => $currentTime, - 'contribution_status_id' => $completeStatus + 'contribution_status_id' => $completeStatus ); for ($rowNumber = 1; $rowNumber <= $this->_batchInfo['item_count']; $rowNumber++) { foreach ($specialFields as $key => $value ) { - $defaults['field'][$rowNumber][$key] = $value; + $defaults['field'][$rowNumber][$key] = $value; } - } + } } else { // get the existing batch values from cache table @@ -444,8 +444,8 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { //unset amount level since we always use quick config price set unset($value['amount_level']); - //CRM-11529 for backoffice transactions - //when financial_type_id is passed in form, update the + //CRM-11529 for backoffice transactions + //when financial_type_id is passed in form, update the //lineitems with the financial type selected in form if (CRM_Utils_Array::value('financial_type_id', $value) && CRM_Utils_Array::value($priceSetId, $lineItem)) { foreach ($lineItem[$priceSetId] as &$values) { @@ -510,7 +510,7 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { 'membership_start_date' => 'startDate', 'membership_end_date' => 'endDate' ); - + $dates = array( 'join_date', 'start_date', @@ -620,10 +620,10 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { $value['skipRecentView'] = TRUE; // make entry in line item for contribution - + $editedFieldParams = array( 'price_set_id' => $priceSetId, - 'name' => $value['membership_type'][0] + 'name' => $value['membership_type'][0] ); $editedResults = array(); @@ -649,20 +649,20 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { $fieldID = key($this->_priceSet['fields']); $value['price_' . $fieldID] = $editedResults['id']; - $lineItem = array(); + $lineItem = array(); CRM_Price_BAO_Set::processAmount($this->_priceSet['fields'], $value, $lineItem[$priceSetId] ); - //CRM-11529 for backoffice transactions - //when financial_type_id is passed in form, update the + //CRM-11529 for backoffice transactions + //when financial_type_id is passed in form, update the //lineitems with the financial type selected in form if (CRM_Utils_Array::value('financial_type_id', $value) && CRM_Utils_Array::value($priceSetId, $lineItem)) { foreach ($lineItem[$priceSetId] as &$values) { $values['financial_type_id'] = $value['financial_type_id']; } } - + $value['lineItems'] = $lineItem; $value['processPriceSet'] = TRUE; } @@ -671,12 +671,12 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { unset($value['membership_type']); unset($value['membership_start_date']); unset($value['membership_end_date']); - - $value['is_renew'] = false; + + $value['is_renew'] = false; if ( CRM_Utils_Array::value('member_option', $params) && CRM_Utils_Array::value( $key, $params['member_option'] ) == 2 ) { $this->_params = $params; - $value['is_renew'] = true; - $membership = CRM_Member_BAO_Membership::renewMembership( + $value['is_renew'] = true; + $membership = CRM_Member_BAO_Membership::renewMembership( $value['contact_id'], $value['membership_type_id'], FALSE, $this, NULL, NULL, @@ -685,7 +685,7 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { // make contribution entry CRM_Member_BAO_Membership::recordMembershipContribution( $value, CRM_Core_DAO::$_nullArray, $membership->id ); - } + } else { $membership = CRM_Member_BAO_Membership::create($value, CRM_Core_DAO::$_nullArray); } diff --git a/CRM/Bridge/OG/CiviCRM.php b/CRM/Bridge/OG/CiviCRM.php index 2278b9180c..a988bfa760 100644 --- a/CRM/Bridge/OG/CiviCRM.php +++ b/CRM/Bridge/OG/CiviCRM.php @@ -85,7 +85,7 @@ class CRM_Bridge_OG_CiviCRM { static function groupContact($groupID, $contactIDs, $op) { $config = CRM_Core_Config::singleton(); $ogID = CRM_Bridge_OG_Utils::ogID($groupID, FALSE); - + if (!$ogID) { return; } diff --git a/CRM/Campaign/BAO/Petition.php b/CRM/Campaign/BAO/Petition.php index c5fec67991..96c546a395 100644 --- a/CRM/Campaign/BAO/Petition.php +++ b/CRM/Campaign/BAO/Petition.php @@ -72,7 +72,7 @@ class CRM_Campaign_BAO_Petition extends CRM_Campaign_BAO_Survey { elseif ($sortParams['sort'] == 'activity_type') { $orderOnPetitionTable = FALSE; $lookupTableJoins = " - LEFT JOIN civicrm_option_value activity_type ON ( activity_type.value = petition.activity_type_id + LEFT JOIN civicrm_option_value activity_type ON ( activity_type.value = petition.activity_type_id OR petition.activity_type_id IS NULL ) INNER JOIN civicrm_option_group grp ON ( activity_type.option_group_id = grp.id AND grp.name = 'activity_type' )"; $orderByClause = "ORDER BY activity_type.label {$sortParams['sortOrder']}"; @@ -234,8 +234,8 @@ SELECT petition.id as id, $activityContacts = CRM_Core_PseudoConstant::activityContacts('name'); $sourceID = CRM_Utils_Array::key('Activity Source', $activityContacts); $params = array( - 1 => array($activity_id, 'Integer'), - 2 => array($contact_id, 'Integer'), + 1 => array($activity_id, 'Integer'), + 2 => array($contact_id, 'Integer'), 3 => array($sourceID, 'Integer') ); CRM_Core_DAO::executeQuery($sql, $params); @@ -250,9 +250,9 @@ SELECT petition.id as id, ); $sql = " -DELETE FROM civicrm_entity_tag -WHERE entity_table = 'civicrm_contact' -AND entity_id = %1 +DELETE FROM civicrm_entity_tag +WHERE entity_table = 'civicrm_contact' +AND entity_id = %1 AND tag_id = ( SELECT id FROM civicrm_tag WHERE name = %2 )"; $params = array(1 => array($contact_id, 'Integer'), 2 => array($tag_name, 'String'), @@ -522,7 +522,7 @@ AND tag_id = ( SELECT id FROM civicrm_tag WHERE name = %2 )"; * CRM_Campaign_Form_Petition_Signature::EMAIL_CONFIRM * send a confirmation request email */ - + // check if the group defined by CIVICRM_PETITION_CONTACTS exists, else create it $petitionGroupName = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'petition_contacts', diff --git a/CRM/Campaign/BAO/Query.php b/CRM/Campaign/BAO/Query.php index c536a003a5..b85f9850e3 100755 --- a/CRM/Campaign/BAO/Query.php +++ b/CRM/Campaign/BAO/Query.php @@ -208,7 +208,7 @@ class CRM_Campaign_BAO_Query { $sourceID = CRM_Utils_Array::key('Activity Source', $activityContacts); $assigneeID = CRM_Utils_Array::key('Activity Assignees', $activityContacts); $targetID = CRM_Utils_Array::key('Activity Targets', $activityContacts); - + switch ($name) { case self::CIVICRM_ACTIVITY_TARGET: $from = " INNER JOIN civicrm_activity_contact civicrm_activity_target diff --git a/CRM/Campaign/BAO/Survey.php b/CRM/Campaign/BAO/Survey.php index 884b86ed6d..a23168ef41 100644 --- a/CRM/Campaign/BAO/Survey.php +++ b/CRM/Campaign/BAO/Survey.php @@ -519,7 +519,7 @@ Group By contact.id"; $activityContacts = CRM_Core_OptionGroup::values('activity_contacts', FALSE, FALSE, FALSE, NULL, 'name'); $assigneeID = CRM_Utils_Array::key('Activity Assignees', $activityContacts); $targetID = CRM_Utils_Array::key('Activity Targets', $activityContacts); - + $query = " SELECT activity.id, activity.status_id, activityTarget.contact_id as voter_id, diff --git a/CRM/Campaign/Form/Petition.php b/CRM/Campaign/Form/Petition.php index 7cfd51df2f..6ac3fbac66 100644 --- a/CRM/Campaign/Form/Petition.php +++ b/CRM/Campaign/Form/Petition.php @@ -86,7 +86,7 @@ class CRM_Campaign_Form_Petition extends CRM_Core_Form { $session->pushUserContext($url); $this->_values = $this->get('values'); - + if (!is_array($this->_values)) { $this->_values = array(); if ($this->_surveyId) { @@ -140,7 +140,7 @@ class CRM_Campaign_Form_Petition extends CRM_Core_Form { if ($ufGroupId = CRM_Core_BAO_UFJoin::findUFGroupId($ufJoinParams)) { $defaults['contact_profile_id'] = $ufGroupId; } - + if (!isset($defaults['is_active'])) { $defaults['is_active'] = 1; } @@ -205,7 +205,7 @@ class CRM_Campaign_Form_Petition extends CRM_Core_Form { // thank you title and text (html allowed in text) $this->add('text', 'thankyou_title', ts('Thank-you Page Title'), CRM_Core_DAO::getAttribute('CRM_Campaign_DAO_Survey', 'thankyou_title')); $this->addWysiwyg('thankyou_text', ts('Thank-you Message'), CRM_Core_DAO::getAttribute('CRM_Campaign_DAO_Survey', 'thankyou_text')); - + // bypass email confirmation? $this->add('checkbox', 'bypass_confirm', ts('Bypass email confirmation')); diff --git a/CRM/Campaign/Form/Search.php b/CRM/Campaign/Form/Search.php index b4f00d61a1..c6ef6c894f 100755 --- a/CRM/Campaign/Form/Search.php +++ b/CRM/Campaign/Form/Search.php @@ -260,9 +260,9 @@ class CRM_Campaign_Form_Search extends CRM_Core_Form { //build the search form. CRM_Campaign_BAO_Query::buildSearchForm($this); - /* - * add form checkboxes for each row. This is needed out here to conform to QF protocol - * of all elements being declared in builQuickForm + /* + * add form checkboxes for each row. This is needed out here to conform to QF protocol + * of all elements being declared in builQuickForm */ diff --git a/CRM/Campaign/Form/Survey/Delete.php b/CRM/Campaign/Form/Survey/Delete.php index df34285e06..b9dd68b04c 100644 --- a/CRM/Campaign/Form/Survey/Delete.php +++ b/CRM/Campaign/Form/Survey/Delete.php @@ -105,7 +105,7 @@ class CRM_Campaign_Form_Survey_Delete extends CRM_Core_Form { CRM_Core_Session::setStatus('', ts("'%1' survey has been deleted.", array(1 => $this->_surveyTitle)), 'success'); CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/campaign', 'reset=1&subPage=survey')); } else { - CRM_Core_Error::fatal(ts('Delete action is missing expected survey ID.')); + CRM_Core_Error::fatal(ts('Delete action is missing expected survey ID.')); } } } diff --git a/CRM/Campaign/Form/Survey/Results.php b/CRM/Campaign/Form/Survey/Results.php index 304b545c2d..cb2e5e4a24 100644 --- a/CRM/Campaign/Form/Survey/Results.php +++ b/CRM/Campaign/Form/Survey/Results.php @@ -189,7 +189,7 @@ class CRM_Campaign_Form_Survey_Results extends CRM_Campaign_Form_Survey { $this->addElement('checkbox', 'create_report', ts('Create Report')); $this->addElement('text', 'report_title', ts('Report Title')); - + if( $this->_reportId){ $this->freeze('create_report'); $this->freeze('report_title'); @@ -402,12 +402,12 @@ class CRM_Campaign_Form_Survey_Results extends CRM_Campaign_Form_Survey { if ( !$this->_reportId && $survey->id && CRM_Utils_Array::value('create_report', $params) ) { $activityStatus = CRM_Core_PseudoConstant::activityStatus('name'); $activityStatus = array_flip($activityStatus); - $this->_params = + $this->_params = array( 'name' => "survey_{$survey->id}", - 'title' => $params['report_title'] ? $params['report_title'] : $this->_values['title'], + 'title' => $params['report_title'] ? $params['report_title'] : $this->_values['title'], 'status_id_op' => 'eq', 'status_id_value' => $activityStatus['Scheduled'], // reserved status - 'survey_id_value' => array($survey->id), + 'survey_id_value' => array($survey->id), 'description' => ts('Detailed report for canvassing, phone-banking, walk lists or other surveys.'), ); //Default value of order by @@ -449,22 +449,22 @@ class CRM_Campaign_Form_Survey_Results extends CRM_Campaign_Form_Survey { elseif ( CRM_Core_OptionGroup::getValue('activity_type','PhoneBank') == $this->_values['activity_type_id'] ) { array_push($displayFields, 'phone'); } - elseif ((CRM_Core_OptionGroup::getValue('activity_type','Survey') == $this->_values['activity_type_id']) || + elseif ((CRM_Core_OptionGroup::getValue('activity_type','Survey') == $this->_values['activity_type_id']) || (CRM_Core_OptionGroup::getValue('activity_type','Canvass') == $this->_values['activity_type_id']) ) { array_push($displayFields, 'phone','city','state_province_id','postal_code','email'); } foreach($displayFields as $key){ $this->_params['fields'][$key] = 1; - } + } $this->_createNew = TRUE; $this->_id = CRM_Report_Utils_Report::getInstanceIDForValue('survey/detail'); CRM_Report_Form_Instance::postProcess($this, FALSE); - + $query = "SELECT MAX(id) FROM civicrm_report_instance WHERE name = %1"; $reportID = CRM_Core_DAO::singleValueQuery($query, array(1 => array("survey_{$survey->id}",'String'))); if ($reportID) { $url = CRM_Utils_System::url("civicrm/report/instance/{$reportID}",'reset=1'); - $status = ts("A Survey Detail Report %2 has been created.", + $status = ts("A Survey Detail Report %2 has been created.", array(1 => $url, 2 => $this->_params['title'])); } } diff --git a/CRM/Campaign/Form/Task/Interview.php b/CRM/Campaign/Form/Task/Interview.php index 1f60d11d98..abc0d8576b 100755 --- a/CRM/Campaign/Form/Task/Interview.php +++ b/CRM/Campaign/Form/Task/Interview.php @@ -553,11 +553,11 @@ WHERE {$clause} $activityParams = array( 'details' => 'details', 'result' => 'result', - 'engagement_level' => 'activity_engagement_level', + 'engagement_level' => 'activity_engagement_level', 'subject' => 'activity_subject', 'status_id' => 'activity_status_id', - 'source_contact_id' => 'source_contact', - 'location' => 'activity_location', + 'source_contact_id' => 'source_contact', + 'location' => 'activity_location', 'campaign_id' => 'activity_campaign_id', 'duration' => 'activity_duration' ); @@ -566,7 +566,7 @@ WHERE {$clause} $activity->$key = $params[$field]; } } - + $activity->save(); //really this should use Activity BAO& not be here but refactoring will have to be later //actually the whole ajax call could be done as an api ajax call & post hook would be sorted @@ -626,7 +626,7 @@ WHERE {$clause} $query = " CREATE TEMPORARY TABLE {$tempTableName} ( id int unsigned NOT NULL AUTO_INCREMENT, - survey_contact_id int unsigned NOT NULL, + survey_contact_id int unsigned NOT NULL, PRIMARY KEY ( id ) ); "; @@ -637,7 +637,7 @@ WHERE {$clause} $processIds = $this->_contactIds; $insertIds = array_splice($processIds, $insertedCount, $batch); if (!empty($insertIds)) { - $insertSQL = "INSERT IGNORE INTO {$tempTableName}( survey_contact_id ) + $insertSQL = "INSERT IGNORE INTO {$tempTableName}( survey_contact_id ) VALUES (" . implode('),(', $insertIds) . ');'; CRM_Core_DAO::executeQuery($insertSQL); } @@ -646,7 +646,7 @@ WHERE {$clause} $query = " SELECT contact.id as id - FROM civicrm_contact contact + FROM civicrm_contact contact INNER JOIN {$tempTableName} ON ( {$tempTableName}.survey_contact_id = contact.id ) WHERE contact.contact_type != %1"; $removeContact = CRM_Core_DAO::executeQuery($query, diff --git a/CRM/Campaign/Page/Vote.php b/CRM/Campaign/Page/Vote.php index 5763747b5c..4648435f63 100644 --- a/CRM/Campaign/Page/Vote.php +++ b/CRM/Campaign/Page/Vote.php @@ -39,7 +39,7 @@ class CRM_Campaign_Page_Vote extends CRM_Core_Page { private $_surveyId; private $_interviewerId; - + function reserve() { //build ajax voter search and selector. $controller = new CRM_Core_Controller_Simple('CRM_Campaign_Form_Gotv', ts('Reserve Respondents')); diff --git a/CRM/Campaign/xml/Menu/Campaign.xml b/CRM/Campaign/xml/Menu/Campaign.xml index d29a5f84ba..b846b1afaa 100644 --- a/CRM/Campaign/xml/Menu/Campaign.xml +++ b/CRM/Campaign/xml/Menu/Campaign.xml @@ -117,14 +117,14 @@ New Petition CRM_Campaign_Form_Petition administer CiviCampaign;manage campaign - + civicrm/petition/sign Sign Petition CRM_Campaign_Form_Petition_Signature sign CiviCRM Petition true - + civicrm/petition/browse View Petition Signatures diff --git a/CRM/Case/Audit/audit.conf.xml b/CRM/Case/Audit/audit.conf.xml index 9a45b26673..4bf1fe5e6e 100644 --- a/CRM/Case/Audit/audit.conf.xml +++ b/CRM/Case/Audit/audit.conf.xml @@ -6,8 +6,8 @@ includeRule can be "include" or "exclude". includeTime is true or false and says whether to include the time component of date fields. It can be overridden at the Field level. - -ifBlank specifies an alternate field to display if the field is blank. + + ifBlank specifies an alternate field to display if the field is blank. --> @@ -32,7 +32,7 @@ ifBlank specifies an alternate field to display if the field is blank. the fields you specify here. This seems a good compromise over explicitly having to define which fields we want for each activity type, given that they are custom. - + One future tweak is to improve the way the fields get ordered here. Right now they'll just come out the same order as in the export, which will likely be semi-random. --> @@ -54,7 +54,7 @@ ifBlank specifies an alternate field to display if the field is blank. - + diff --git a/CRM/Case/BAO/Case.php b/CRM/Case/BAO/Case.php index 3cfbd0c118..85eb833c5a 100644 --- a/CRM/Case/BAO/Case.php +++ b/CRM/Case/BAO/Case.php @@ -1010,7 +1010,7 @@ SELECT case_status.label AS case_status, status_id, case_type.label AS case_type LEFT OUTER JOIN civicrm_option_group og ON og.name="activity_status" LEFT OUTER JOIN civicrm_option_value ov ON ov.option_group_id=og.id AND ov.name="Scheduled" LEFT JOIN civicrm_activity_contact caa - ON caa.activity_id = ca.id AND caa.record_type_id = "$assigneeID" + ON caa.activity_id = ca.id AND caa.record_type_id = "$assigneeID" LEFT JOIN civicrm_contact acc ON acc.id = caa.contact_id '; $where = 'WHERE cca.case_id= %1 @@ -2260,7 +2260,7 @@ INNER JOIN civicrm_case_contact ON ( civicrm_case.id = civicrm_case_contact.cas $sourceID = CRM_Utils_Array::key('Activity Source', $activityContacts); $assigneeID = CRM_Utils_Array::key('Activity Assignees', $activityContacts); $targetID = CRM_Utils_Array::key('Activity Targets', $activityContacts); - + $processCaseIds = array($otherCaseId); if ($duplicateContacts && !$duplicateCases) { if ($changeClient) { diff --git a/CRM/Case/Form/Activity.php b/CRM/Case/Form/Activity.php index cdbc2bd97d..3a9addfc86 100644 --- a/CRM/Case/Form/Activity.php +++ b/CRM/Case/Form/Activity.php @@ -595,7 +595,7 @@ class CRM_Case_Form_Activity extends CRM_Activity_Form_Activity { // Insert civicrm_log record for the activity (e.g. store the // created / edited by contact id and date for the activity) // Note - civicrm_log is already created by CRM_Activity_BAO_Activity::create() - + // send copy to selected contacts. $mailStatus = ''; $mailToContacts = array(); diff --git a/CRM/Case/Form/Task/SearchTaskHookSample.php b/CRM/Case/Form/Task/SearchTaskHookSample.php index c02f9da85f..6f4981cd7f 100644 --- a/CRM/Case/Form/Task/SearchTaskHookSample.php +++ b/CRM/Case/Form/Task/SearchTaskHookSample.php @@ -54,7 +54,7 @@ class CRM_Case_Form_Task_SearchTaskHookSample extends CRM_Case_Form_Task { SELECT ct.display_name as display_name, cs.start_date as start_date, ov.label as status - + FROM civicrm_case cs INNER JOIN civicrm_case_contact cc ON ( cs.id = cc.case_id) INNER JOIN civicrm_contact ct ON ( cc.contact_id = ct.id) diff --git a/CRM/Case/Page/AJAX.php b/CRM/Case/Page/AJAX.php index 860566625c..4686ad1e68 100644 --- a/CRM/Case/Page/AJAX.php +++ b/CRM/Case/Page/AJAX.php @@ -134,7 +134,7 @@ class CRM_Case_Page_AJAX { $caseStatuses = CRM_Case_PseudoConstant::caseStatus(); $cs = $caseStatuses[$dao->status_id]; $caseDetails = " - + " . CRM_Utils_Date::customFormat($dao->end_date) . "
" . ts('Case Subject') . "{$dao->subject}
" . ts('Case Type') . "{$caseType}
" . ts('Case Type') . "{$caseType}
" . ts('Case Status') . "{$cs}
" . ts('Case Start Date') . "" . CRM_Utils_Date::customFormat($dao->start_date) . "
" . ts('Case End Date') . "
"; diff --git a/CRM/Case/PseudoConstant.php b/CRM/Case/PseudoConstant.php index c597da5b15..f916913866 100644 --- a/CRM/Case/PseudoConstant.php +++ b/CRM/Case/PseudoConstant.php @@ -194,7 +194,7 @@ class CRM_Case_PseudoConstant extends CRM_Core_PseudoConstant { civicrm_option_group g WHERE v.option_group_id = g.id AND g.name = 'activity_type' - AND v.is_active = 1 + AND v.is_active = 1 AND g.is_active = 1"; if (!$all) { diff --git a/CRM/Case/XMLProcessor/Process.php b/CRM/Case/XMLProcessor/Process.php index 59377b45cb..6ca5f077e3 100644 --- a/CRM/Case/XMLProcessor/Process.php +++ b/CRM/Case/XMLProcessor/Process.php @@ -255,7 +255,7 @@ class CRM_Case_XMLProcessor_Process extends CRM_Case_XMLProcessor { function deleteEmptyActivity(&$params) { $activityContacts = CRM_Core_OptionGroup::values('activity_contacts', FALSE, FALSE, FALSE, NULL, 'name'); $targetID = CRM_Utils_Array::key('Activity Targets', $activityContacts); - + $query = " DELETE a FROM civicrm_activity a diff --git a/CRM/Case/XMLProcessor/Report.php b/CRM/Case/XMLProcessor/Report.php index 104fd866f0..4f146dbac9 100644 --- a/CRM/Case/XMLProcessor/Report.php +++ b/CRM/Case/XMLProcessor/Report.php @@ -228,7 +228,7 @@ AND ac.case_id = %1 $activityContacts = CRM_Core_OptionGroup::values('activity_contacts', FALSE, FALSE, FALSE, NULL, 'name'); $targetID = CRM_Utils_Array::key('Activity Targets', $activityContacts); $assigneeID = CRM_Utils_Array::key('Activity Assignees', $activityContacts); - + $query = " SELECT a.*, aa.contact_id as assigneeID, at.contact_id as targetID {$selectCaseActivity} diff --git a/CRM/Case/XMLProcessor/Settings.php b/CRM/Case/XMLProcessor/Settings.php index 373f9cd553..7bc074b0e6 100644 --- a/CRM/Case/XMLProcessor/Settings.php +++ b/CRM/Case/XMLProcessor/Settings.php @@ -37,7 +37,7 @@ class CRM_Case_XMLProcessor_Settings extends CRM_Case_XMLProcessor { private $_settings = array(); // Input: The base filename without the .xml extension - // Output: An array of settings. + // Output: An array of settings. function run($filename = 'settings') { $xml = $this->retrieve($filename); diff --git a/CRM/Case/xml/HRD/HRD.mysql b/CRM/Case/xml/HRD/HRD.mysql index ea55d332fc..fb77d4cf03 100644 --- a/CRM/Case/xml/HRD/HRD.mysql +++ b/CRM/Case/xml/HRD/HRD.mysql @@ -13,8 +13,8 @@ SELECT @option_group_id_case_type := max(id) from civicrm_option_group where name = 'case_type'; SELECT @caseCompId := id FROM `civicrm_component` where `name` like 'CiviCase'; -INSERT INTO - `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`) +INSERT INTO + `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`) VALUES (@option_group_id_case_type, 'Civil and Political' , 1, 'Civil and Political' , NULL, 0, 1, 1, NULL, 0, 1, 1), (@option_group_id_case_type, 'Economic, Social and Cultural', 2, 'Economic, Social and Cultural', NULL, 0, 0, 2, NULL, 0, 1, 1), @@ -30,8 +30,8 @@ SELECT @option_group_id_activity_type := max(id) from civicrm_option_grou SELECT @max_val := MAX(ROUND(op.value)) FROM civicrm_option_value op WHERE op.option_group_id = @option_group_id_activity_type; -INSERT INTO - `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id` ) +INSERT INTO + `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id` ) VALUES (@option_group_id_activity_type, 'Source(incoming)', (SELECT @max_val := @max_val+1), 'Source(incoming)', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId ), (@option_group_id_activity_type, 'Incoming correspondence', (SELECT @max_val := @max_val+1), 'Incoming correspondence', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId ), diff --git a/CRM/Case/xml/configuration.sample/AdultDayCareReferral.xml b/CRM/Case/xml/configuration.sample/AdultDayCareReferral.xml index cde1a97f28..d43daeae17 100644 --- a/CRM/Case/xml/configuration.sample/AdultDayCareReferral.xml +++ b/CRM/Case/xml/configuration.sample/AdultDayCareReferral.xml @@ -79,6 +79,6 @@ Benefits Specialist - + diff --git a/CRM/Case/xml/configuration.sample/HousingSupport.xml b/CRM/Case/xml/configuration.sample/HousingSupport.xml index 33412b6d6d..3865c7d0c3 100644 --- a/CRM/Case/xml/configuration.sample/HousingSupport.xml +++ b/CRM/Case/xml/configuration.sample/HousingSupport.xml @@ -30,7 +30,7 @@ Change Case Status - + Change Case Start Date @@ -104,6 +104,6 @@ Benefits Specialist - + diff --git a/CRM/Case/xml/configuration.sample/SampleConfig.mysql b/CRM/Case/xml/configuration.sample/SampleConfig.mysql index 92ca672c34..b5af50a998 100644 --- a/CRM/Case/xml/configuration.sample/SampleConfig.mysql +++ b/CRM/Case/xml/configuration.sample/SampleConfig.mysql @@ -36,7 +36,7 @@ SELECT @option_group_id_activity_type := max(id) from civicrm_option_grou SELECT @max_val := MAX(ROUND(op.value)) FROM civicrm_option_value op WHERE op.option_group_id = @option_group_id_activity_type; -INSERT INTO `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id` ) VALUES (@option_group_id_activity_type, 'Medical evaluation', (SELECT @max_val := @max_val+1), 'Medical evaluation', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId ), (@option_group_id_activity_type, 'Mental health evaluation', (SELECT @max_val := @max_val+1), 'Mental health evaluation', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId ), (@option_group_id_activity_type, 'Secure temporary housing', (SELECT @max_val := @max_val+1), 'Secure temporary housing', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId ), (@option_group_id_activity_type, 'Income and benefits stabilization', (SELECT @max_val := @max_val+1), 'Income and benefits stabilization', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId ), (@option_group_id_activity_type, 'Long-term housing plan', (SELECT @max_val := @max_val+1), 'Long-term housing plan', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId ), (@option_group_id_activity_type, 'ADC referral', (SELECT @max_val := @max_val+1), 'ADC referral', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId ); +INSERT INTO `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id` ) VALUES (@option_group_id_activity_type, 'Medical evaluation', (SELECT @max_val := @max_val+1), 'Medical evaluation', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId ), (@option_group_id_activity_type, 'Mental health evaluation', (SELECT @max_val := @max_val+1), 'Mental health evaluation', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId ), (@option_group_id_activity_type, 'Secure temporary housing', (SELECT @max_val := @max_val+1), 'Secure temporary housing', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId ), (@option_group_id_activity_type, 'Income and benefits stabilization', (SELECT @max_val := @max_val+1), 'Income and benefits stabilization', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId ), (@option_group_id_activity_type, 'Long-term housing plan', (SELECT @max_val := @max_val+1), 'Long-term housing plan', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId ), (@option_group_id_activity_type, 'ADC referral', (SELECT @max_val := @max_val+1), 'ADC referral', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId ); -- Get Open Case id so we can add custom fields for this activity type if we need to SELECT @at1 := max(value) from civicrm_option_value where name = 'Open Case'; diff --git a/CRM/Case/xml/configuration.sample/Settings.xml b/CRM/Case/xml/configuration.sample/Settings.xml index 6fca653644..58dbb7cff9 100644 --- a/CRM/Case/xml/configuration.sample/Settings.xml +++ b/CRM/Case/xml/configuration.sample/Settings.xml @@ -5,12 +5,12 @@ It needs to match the name column in the civicrm_group table (not the title), so avoid using space characters. --> - 0 + 0 0 - 0 + 0 diff --git a/CRM/Contact/BAO/Contact/Location.php b/CRM/Contact/BAO/Contact/Location.php index 35b295f9e3..f9e288cef7 100644 --- a/CRM/Contact/BAO/Contact/Location.php +++ b/CRM/Contact/BAO/Contact/Location.php @@ -141,8 +141,8 @@ LEFT JOIN civicrm_address ON civicrm_address.contact_id = civicrm_contact.id LEFT JOIN civicrm_state_province ON civicrm_address.state_province_id = civicrm_state_province.id LEFT JOIN civicrm_country ON civicrm_address.country_id = civicrm_country.id LEFT JOIN civicrm_location_type ON civicrm_location_type.id = civicrm_address.location_type_id -WHERE civicrm_address.geo_code_1 IS NOT NULL -AND civicrm_address.geo_code_2 IS NOT NULL +WHERE civicrm_address.geo_code_1 IS NOT NULL +AND civicrm_address.geo_code_2 IS NOT NULL AND civicrm_contact.id IN $idString "; $params = array(); diff --git a/CRM/Contact/Form/Contact.php b/CRM/Contact/Form/Contact.php index 555afde009..00fe65e9a4 100644 --- a/CRM/Contact/Form/Contact.php +++ b/CRM/Contact/Form/Contact.php @@ -214,12 +214,12 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form { $displayName = CRM_Contact_BAO_Contact::displayName($this->_contactId); $displayName = ts('Edit %1', array(1 => $displayName)); - + // Check if this is default domain contact CRM-10482 if (CRM_Contact_BAO_Contact::checkDomainContact($this->_contactId)) { $displayName .= ' (' . ts('default organization') . ')'; } - + // omitting contactImage from title for now since the summary overlay css doesn't work outside of our crm-container CRM_Utils_System::setTitle($displayName); $context = CRM_Utils_Request::retrieve('context', 'String', $this); diff --git a/CRM/Contact/Form/CustomData.php b/CRM/Contact/Form/CustomData.php index 596b097c3d..17bf789213 100644 --- a/CRM/Contact/Form/CustomData.php +++ b/CRM/Contact/Form/CustomData.php @@ -94,7 +94,7 @@ class CRM_Contact_Form_CustomData extends CRM_Core_Form { protected $_groupCollapseDisplay; /** - * custom group id + * custom group id * * @int * @access public @@ -112,7 +112,7 @@ class CRM_Contact_Form_CustomData extends CRM_Core_Form { * * @access public * - */ + */ function preProcess() { $this->_cdType = CRM_Utils_Array::value('type', $_GET); diff --git a/CRM/Contact/Form/DedupeRules.php b/CRM/Contact/Form/DedupeRules.php index 8e8739b945..7b2c2b054a 100644 --- a/CRM/Contact/Form/DedupeRules.php +++ b/CRM/Contact/Form/DedupeRules.php @@ -49,7 +49,7 @@ class CRM_Contact_Form_DedupeRules extends CRM_Admin_Form { * * @return None * @access public - */ + */ function preProcess() { // Ensure user has permission to be here if (!CRM_Core_Permission::check('administer dedupe rules')) { @@ -185,16 +185,16 @@ class CRM_Contact_Form_DedupeRules extends CRM_Admin_Form { */ public function postProcess() { $values = $this->exportValues(); - + //FIXME: Handle logic to replace is_default column by usage $used = CRM_Utils_Array::value('used', $values, FALSE); // reset used column to General (since there can only // be one 'Supervised' or 'Unsupervised' rule) if ($this->_options[$used] != 'General') { $query = " -UPDATE civicrm_dedupe_rule_group +UPDATE civicrm_dedupe_rule_group SET used = 'General' - WHERE contact_type = %1 + WHERE contact_type = %1 AND used = %2"; $queryParams = array(1 => array($this->_contactType, 'String'), 2 => array($this->_options[$used], 'String'), diff --git a/CRM/Contact/Form/Domain.php b/CRM/Contact/Form/Domain.php index 3bac77102f..b91f421781 100644 --- a/CRM/Contact/Form/Domain.php +++ b/CRM/Contact/Form/Domain.php @@ -65,7 +65,7 @@ class CRM_Contact_Form_Domain extends CRM_Core_Form { * @var int * @const */ - CONST LOCATION_BLOCKS = 1; + CONST LOCATION_BLOCKS = 1; function preProcess() { CRM_Utils_System::setTitle(ts('Organization Address and Contact Info')); @@ -121,7 +121,7 @@ class CRM_Contact_Form_Domain extends CRM_Core_Form { if (!isset($defaults['address'][1]['country_id'])) { $defaults['address'][1]['country_id'] = $config->defaultContactCountry; } - + if (!isset($defaults['address'][1]['state_province_id'])) { $defaults['address'][1]['state_province_id'] = $config->defaultContactStateProvince; } @@ -251,7 +251,7 @@ class CRM_Contact_Form_Domain extends CRM_Core_Form { 'display_name' => $domain->name, 'legal_name' => $domain->name, 'organization_name' => $domain->name, - 'contact_id' => $this->_contactId, + 'contact_id' => $this->_contactId, ); CRM_Contact_BAO_Contact::add($contactParams); $location = CRM_Core_BAO_Location::create($params, TRUE); diff --git a/CRM/Contact/Form/Edit/Individual.php b/CRM/Contact/Form/Edit/Individual.php index 369c3268bf..53464851c8 100644 --- a/CRM/Contact/Form/Edit/Individual.php +++ b/CRM/Contact/Form/Edit/Individual.php @@ -41,15 +41,15 @@ class CRM_Contact_Form_Edit_Individual { /** - * This function provides the HTML form elements that are specific + * This function provides the HTML form elements that are specific * to the Individual Contact Type * * @param object $form form object - * @param int $inlineEditMode ( 1 for contact summary + * @param int $inlineEditMode ( 1 for contact summary * top bar form and 2 for display name edit ) * * @access public - * @return void + * @return void */ public static function buildQuickForm(&$form, $inlineEditMode = NULL) { $form->applyFilter('__ALL__', 'trim'); diff --git a/CRM/Contact/Form/Merge.php b/CRM/Contact/Form/Merge.php index 5f93efbc77..768aa75d36 100644 --- a/CRM/Contact/Form/Merge.php +++ b/CRM/Contact/Form/Merge.php @@ -51,8 +51,8 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form { // see HTML_QuickForm_advcheckbox::setValues() - but patching that doesn't // help, as QF doesn't put the 0-value elements in exportValues() anyway... // to side-step this, we use the below UUID as a (re)placeholder - var $_qfZeroBug = 'e8cddb72-a257-11dc-b9cc-0016d3330ee9'; - + var $_qfZeroBug = 'e8cddb72-a257-11dc-b9cc-0016d3330ee9'; + function preProcess() { if (!CRM_Core_Permission::check('merge duplicate contacts')) { CRM_Core_Error::fatal(ts('You do not have access to this page')); @@ -77,7 +77,7 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form { $cacheKey .= $rgid ? "_{$rgid}" : '_0'; $cacheKey .= $gid ? "_{$gid}" : '_0'; - $join = "LEFT JOIN civicrm_dedupe_exception de ON ( pn.entity_id1 = de.contact_id1 AND + $join = "LEFT JOIN civicrm_dedupe_exception de ON ( pn.entity_id1 = de.contact_id1 AND pn.entity_id2 = de.contact_id2 )"; $where = "de.id IS NULL"; @@ -296,7 +296,7 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form { public function postProcess() { $formValues = $this->exportValues(); - + // reset all selected contact ids from session // when we came from search context, CRM-3526 $session = CRM_Core_Session::singleton(); @@ -332,7 +332,7 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form { $cacheKey .= $this->_rgid ? "_{$this->_rgid}" : '_0'; $cacheKey .= $this->_gid ? "_{$this->_gid}" : '_0'; - $join = "LEFT JOIN civicrm_dedupe_exception de ON ( pn.entity_id1 = de.contact_id1 AND + $join = "LEFT JOIN civicrm_dedupe_exception de ON ( pn.entity_id1 = de.contact_id1 AND pn.entity_id2 = de.contact_id2 )"; $where = "de.id IS NULL"; diff --git a/CRM/Contact/Form/Search/Custom/ActivitySearch.php b/CRM/Contact/Form/Search/Custom/ActivitySearch.php index bb9b3f7679..605de96a0b 100644 --- a/CRM/Contact/Form/Search/Custom/ActivitySearch.php +++ b/CRM/Contact/Form/Search/Custom/ActivitySearch.php @@ -242,7 +242,7 @@ class CRM_Contact_Form_Search_Custom_ActivitySearch implements CRM_Contact_Form_ JOIN civicrm_option_value ov2 ON activity.status_id = ov2.value AND ov2.option_group_id = {$this->_groupId} LEFT JOIN civicrm_activity_contact sourceContact - ON activity.id = sourceContact.activity_id AND sourceContact.record_type_id = {$sourceID} + ON activity.id = sourceContact.activity_id AND sourceContact.record_type_id = {$sourceID} JOIN civicrm_contact contact_b ON sourceContact.contact_id = contact_b.id LEFT JOIN civicrm_case_activity cca diff --git a/CRM/Contact/Form/Task.php b/CRM/Contact/Form/Task.php index eb96060ceb..f2ec4a2754 100644 --- a/CRM/Contact/Form/Task.php +++ b/CRM/Contact/Form/Task.php @@ -93,7 +93,7 @@ class CRM_Contact_Form_Task extends CRM_Core_Form { * * @return void * @access public - */ + */ function preProcess() { self::preProcessCommon($this); } @@ -154,7 +154,7 @@ class CRM_Contact_Form_Task extends CRM_Core_Form { ) { $sortByCharacter = $form->get('sortByCharacter'); $cacheKey = ($sortByCharacter && $sortByCharacter != 'all') ? "{$cacheKey}_alphabet" : $cacheKey; - + if ($form->_action == CRM_Core_Action::COPY) { $allCids[$cacheKey] = $form->getContactIds( ); } @@ -227,7 +227,7 @@ class CRM_Contact_Form_Task extends CRM_Core_Form { } } } - + if (!empty($insertString)) { $string = implode(',', $insertString); $sql = "REPLACE INTO {$form->_componentTable} ( contact_id ) VALUES $string"; @@ -252,7 +252,7 @@ class CRM_Contact_Form_Task extends CRM_Core_Form { } } - + if (CRM_Utils_Array::value('radio_ts', self::$_searchFormValues) == 'ts_sel' && ($form->_action != CRM_Core_Action::COPY) ) { $params = array(); @@ -261,7 +261,7 @@ class CRM_Contact_Form_Task extends CRM_Core_Form { $result = CRM_Core_BAO_PrevNextCache::getSelectedContacts(); $form->assign("value", $result); } - + if (!empty($form->_contactIds)) { $form->_componentClause = ' contact_a.id IN ( ' . implode(',', $form->_contactIds) . ' ) '; $form->assign('totalSelectedContacts', count($form->_contactIds)); diff --git a/CRM/Contact/Form/Task/Batch.php b/CRM/Contact/Form/Task/Batch.php index 1af75b4657..e86a1f3b18 100644 --- a/CRM/Contact/Form/Task/Batch.php +++ b/CRM/Contact/Form/Task/Batch.php @@ -67,12 +67,12 @@ class CRM_Contact_Form_Task_Batch extends CRM_Contact_Form_Task { * when not to reset sort_name */ protected $_preserveDefault = TRUE; - + /** * the internal QF names for the state/country/county fields */ - - protected $_stateCountryCountyFields = array(); + + protected $_stateCountryCountyFields = array(); /** * build all the data structures needed to build the form @@ -145,21 +145,21 @@ class CRM_Contact_Form_Task_Batch extends CRM_Contact_Form_Task { 'organization_name', 'household_name', ); - + $stateCountryMap = array(); foreach ($this->_contactIds as $contactId) { $profileFields = $this->_fields; CRM_Core_BAO_Address::checkContactSharedAddressFields($profileFields, $contactId); foreach ($profileFields as $name => $field) { - + // Link state to country, county to state per location per contact list($prefixName, $index) = CRM_Utils_System::explode('-', $name, 2); if ($prefixName == 'state_province' || $prefixName == 'country' || $prefixName == 'county') { $stateCountryMap["$index-$contactId"][$prefixName] = "field_{$contactId}_{$field['name']}"; $this->_stateCountryCountyFields["$index-$contactId"][$prefixName] = "field[{$contactId}][{$field['name']}]"; } - + CRM_Core_BAO_UFGroup::buildProfile($this, $field, NULL, $contactId); if (in_array($field['name'], $preserveDefaultsArray)) { @@ -167,9 +167,9 @@ class CRM_Contact_Form_Task_Batch extends CRM_Contact_Form_Task { } } } - + CRM_Core_BAO_Address::addStateCountryMap($stateCountryMap); - + $this->assign('fields', $this->_fields); @@ -211,9 +211,9 @@ class CRM_Contact_Form_Task_Batch extends CRM_Contact_Form_Task { } $this->assign('sortName', $sortName); - + // now fix all state country selectors - CRM_Core_BAO_Address::fixAllStateSelects($this, $defaults, $this->_stateCountryCountyFields); + CRM_Core_BAO_Address::fixAllStateSelects($this, $defaults, $this->_stateCountryCountyFields); return $defaults; } diff --git a/CRM/Contact/Form/Task/PDFLetterCommon.php b/CRM/Contact/Form/Task/PDFLetterCommon.php index c865c1ceb2..4f8d1fb989 100644 --- a/CRM/Contact/Form/Task/PDFLetterCommon.php +++ b/CRM/Contact/Form/Task/PDFLetterCommon.php @@ -399,7 +399,7 @@ class CRM_Contact_Form_Task_PDFLetterCommon { $activityContacts = CRM_Core_OptionGroup::values('activity_contacts', FALSE, FALSE, FALSE, NULL, 'name'); $targetID = CRM_Utils_Array::key('Activity Targets', $activityContacts); - + foreach ($form->_contactIds as $contactId) { $activityTargetParams = array( 'activity_id' => empty($activity->id) ? $activityIds[$contactId] : $activity->id, diff --git a/CRM/Contact/Form/Task/Unhold.php b/CRM/Contact/Form/Task/Unhold.php index d72a405bea..c3b4ad1df2 100644 --- a/CRM/Contact/Form/Task/Unhold.php +++ b/CRM/Contact/Form/Task/Unhold.php @@ -20,7 +20,7 @@ class CRM_Contact_Form_Task_Unhold extends CRM_Contact_Form_Task { $num = count($this->_contactIds); if ($num >= 1) { $queryString = " -UPDATE civicrm_email SET on_hold = 0, hold_date = null +UPDATE civicrm_email SET on_hold = 0, hold_date = null WHERE on_hold = 1 AND hold_date is not null AND contact_id in (" . implode(",", $this->_contactIds) . ")"; CRM_Core_DAO::executeQuery($queryString); $sql = "SELECT ROW_COUNT( )"; diff --git a/CRM/Contact/Page/DedupeFind.php b/CRM/Contact/Page/DedupeFind.php index 1d93c62ae4..44578b31f6 100644 --- a/CRM/Contact/Page/DedupeFind.php +++ b/CRM/Contact/Page/DedupeFind.php @@ -42,7 +42,7 @@ class CRM_Contact_Page_DedupeFind extends CRM_Core_Page_Basic { * Get BAO Name * * @return string Classname of BAO. - */ + */ function getBAOName() { return 'CRM_Dedupe_BAO_RuleGroup'; } diff --git a/CRM/Contact/Page/Inline/Actions.php b/CRM/Contact/Page/Inline/Actions.php index e209ff219d..3e65dec3a1 100644 --- a/CRM/Contact/Page/Inline/Actions.php +++ b/CRM/Contact/Page/Inline/Actions.php @@ -65,8 +65,8 @@ class CRM_Contact_Page_Inline_Actions extends CRM_Core_Page { // check logged in user permission CRM_Contact_Page_View::checkUserPermission($this, $contactId); - - // finally call parent + + // finally call parent parent::run(); } } diff --git a/CRM/Contact/Page/Inline/Address.php b/CRM/Contact/Page/Inline/Address.php index 8cc436d9c2..92cc876f18 100644 --- a/CRM/Contact/Page/Inline/Address.php +++ b/CRM/Contact/Page/Inline/Address.php @@ -34,7 +34,7 @@ */ /** - * Dummy page for details of address + * Dummy page for details of address * */ class CRM_Contact_Page_Inline_Address extends CRM_Core_Page { @@ -68,8 +68,8 @@ class CRM_Contact_Page_Inline_Address extends CRM_Core_Page { } // we just need current address block - $currentAddressBlock['address'][$locBlockNo] = array_pop( $address ); - + $currentAddressBlock['address'][$locBlockNo] = array_pop( $address ); + if ( !empty( $currentAddressBlock['address'][$locBlockNo] ) ) { // get contact name of shared contact names $sharedAddresses = array(); @@ -93,7 +93,7 @@ class CRM_Contact_Page_Inline_Address extends CRM_Core_Page { // we setting the prefix to dnc_ below so that we don't overwrite smarty's grouptree var. $currentAddressBlock['address'][$locBlockNo]['custom'] = CRM_Core_BAO_CustomGroup::buildCustomDataView( $this, $groupTree, FALSE, NULL, "dnc_"); $this->assign("dnc_viewCustomData", NULL); - + $this->assign('add', $currentAddressBlock['address'][$locBlockNo]); $this->assign('sharedAddresses', $sharedAddresses); } @@ -111,11 +111,11 @@ class CRM_Contact_Page_Inline_Address extends CRM_Core_Page { $this->assign('locationIndex', $locBlockNo); $this->assign('addressId', $addressId); $this->assign('privacy', $privacy); - + // check logged in user permission CRM_Contact_Page_View::checkUserPermission($this, $contactId); - // finally call parent + // finally call parent parent::run(); } } diff --git a/CRM/Contact/Page/Inline/CommunicationPreferences.php b/CRM/Contact/Page/Inline/CommunicationPreferences.php index cd22caf4de..16b7d129f6 100644 --- a/CRM/Contact/Page/Inline/CommunicationPreferences.php +++ b/CRM/Contact/Page/Inline/CommunicationPreferences.php @@ -34,7 +34,7 @@ */ /** - * Dummy page for details of communication preferences + * Dummy page for details of communication preferences * */ class CRM_Contact_Page_Inline_CommunicationPreferences extends CRM_Core_Page { @@ -60,11 +60,11 @@ class CRM_Contact_Page_Inline_CommunicationPreferences extends CRM_Core_Page { $this->assign('contactId', $contactId); $this->assign($defaults); - + // check logged in user permission CRM_Contact_Page_View::checkUserPermission($this, $contactId); - // finally call parent + // finally call parent parent::run(); } } diff --git a/CRM/Contact/Page/Inline/ContactInfo.php b/CRM/Contact/Page/Inline/ContactInfo.php index 950a1edd93..4a4748c072 100644 --- a/CRM/Contact/Page/Inline/ContactInfo.php +++ b/CRM/Contact/Page/Inline/ContactInfo.php @@ -34,7 +34,7 @@ */ /** - * Page to disply contact information on topi of summary + * Page to disply contact information on topi of summary * */ class CRM_Contact_Page_Inline_ContactInfo extends CRM_Core_Page { @@ -71,8 +71,8 @@ class CRM_Contact_Page_Inline_ContactInfo extends CRM_Core_Page { // check logged in user permission CRM_Contact_Page_View::checkUserPermission($this, $contactId); - - // finally call parent + + // finally call parent parent::run(); } } diff --git a/CRM/Contact/Page/Inline/ContactName.php b/CRM/Contact/Page/Inline/ContactName.php index 7e10b3a8f6..1dc5e398a5 100644 --- a/CRM/Contact/Page/Inline/ContactName.php +++ b/CRM/Contact/Page/Inline/ContactName.php @@ -34,7 +34,7 @@ */ /** - * Page to disply contact name on top of the summary + * Page to disply contact name on top of the summary * */ class CRM_Contact_Page_Inline_ContactName extends CRM_Core_Page { @@ -51,25 +51,25 @@ class CRM_Contact_Page_Inline_ContactName extends CRM_Core_Page { function run() { // get the emails for this contact $contactId = CRM_Utils_Request::retrieve('cid', 'Positive', CRM_Core_DAO::$_nullObject, TRUE, NULL, $_REQUEST); - + $isDeleted = (bool) CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $contactId, 'is_deleted'); $this->assign('contactId', $contactId); - - $title = CRM_Contact_Page_View::setTitle($contactId, $isDeleted); + + $title = CRM_Contact_Page_View::setTitle($contactId, $isDeleted); $this->assign('title', $title); // Check if this is default domain contact CRM-10482 if (CRM_Contact_BAO_Contact::checkDomainContact($contactId)) { $this->assign('domainContact', TRUE); } else { - $this->assign('domainContact', FALSE); + $this->assign('domainContact', FALSE); } // check logged in user permission CRM_Contact_Page_View::checkUserPermission($this, $contactId); - - // finally call parent + + // finally call parent parent::run(); } } diff --git a/CRM/Contact/Page/Inline/Demographics.php b/CRM/Contact/Page/Inline/Demographics.php index 8745b838b6..c374b7a82a 100644 --- a/CRM/Contact/Page/Inline/Demographics.php +++ b/CRM/Contact/Page/Inline/Demographics.php @@ -34,7 +34,7 @@ */ /** - * Dummy page for details of demographics + * Dummy page for details of demographics * */ class CRM_Contact_Page_Inline_Demographics extends CRM_Core_Page { @@ -64,14 +64,14 @@ class CRM_Contact_Page_Inline_Demographics extends CRM_Core_Page { $this->assign('contactId', $contactId); $this->assign($defaults); - + //for birthdate format with respect to birth format set $this->assign('birthDateViewFormat', CRM_Utils_Array::value('qfMapping', CRM_Utils_Date::checkBirthDateFormat())); // check logged in user permission CRM_Contact_Page_View::checkUserPermission($this, $contactId); - - // finally call parent + + // finally call parent parent::run(); } } diff --git a/CRM/Contact/Page/Inline/Email.php b/CRM/Contact/Page/Inline/Email.php index caaae2ab49..9e07a7072d 100644 --- a/CRM/Contact/Page/Inline/Email.php +++ b/CRM/Contact/Page/Inline/Email.php @@ -78,8 +78,8 @@ class CRM_Contact_Page_Inline_Email extends CRM_Core_Page { // check logged in user permission CRM_Contact_Page_View::checkUserPermission($this, $contactId); - - // finally call parent + + // finally call parent parent::run(); } } diff --git a/CRM/Contact/Page/Inline/IM.php b/CRM/Contact/Page/Inline/IM.php index b7defce668..ccf463a58d 100644 --- a/CRM/Contact/Page/Inline/IM.php +++ b/CRM/Contact/Page/Inline/IM.php @@ -63,14 +63,14 @@ class CRM_Contact_Page_Inline_IM extends CRM_Core_Page { $value['provider'] = $IMProviders[$value['provider_id']]; } } - + $this->assign('contactId', $contactId); $this->assign('im', $ims); // check logged in user permission CRM_Contact_Page_View::checkUserPermission($this, $contactId); - - // finally call parent + + // finally call parent parent::run(); } } diff --git a/CRM/Contact/Page/Inline/OpenID.php b/CRM/Contact/Page/Inline/OpenID.php index 1317a40c63..4cc15a94db 100644 --- a/CRM/Contact/Page/Inline/OpenID.php +++ b/CRM/Contact/Page/Inline/OpenID.php @@ -61,14 +61,14 @@ class CRM_Contact_Page_Inline_OpenID extends CRM_Core_Page { $value['location_type'] = $locationTypes[$value['location_type_id']]; } } - + $this->assign('contactId', $contactId); $this->assign('openid', $openids); // check logged in user permission CRM_Contact_Page_View::checkUserPermission($this, $contactId); - - // finally call parent + + // finally call parent parent::run(); } } diff --git a/CRM/Contact/Page/Inline/Phone.php b/CRM/Contact/Page/Inline/Phone.php index 0685362a17..05ca80e460 100644 --- a/CRM/Contact/Page/Inline/Phone.php +++ b/CRM/Contact/Page/Inline/Phone.php @@ -73,15 +73,15 @@ class CRM_Contact_Page_Inline_Phone extends CRM_Core_Page { $privacy[$name] = $contact->$name; } } - + $this->assign('contactId', $contactId); $this->assign('phone', $phones); $this->assign('privacy', $privacy); // check logged in user permission CRM_Contact_Page_View::checkUserPermission($this, $contactId); - - // finally call parent + + // finally call parent parent::run(); } } diff --git a/CRM/Contact/Page/Inline/Website.php b/CRM/Contact/Page/Inline/Website.php index ab4a2a29ad..f87695e680 100644 --- a/CRM/Contact/Page/Inline/Website.php +++ b/CRM/Contact/Page/Inline/Website.php @@ -34,7 +34,7 @@ */ /** - * Dummy page for details of website + * Dummy page for details of website * */ class CRM_Contact_Page_Inline_Website extends CRM_Core_Page { @@ -67,8 +67,8 @@ class CRM_Contact_Page_Inline_Website extends CRM_Core_Page { // check logged in user permission CRM_Contact_Page_View::checkUserPermission($this, $contactId); - - // finally call parent + + // finally call parent parent::run(); } } diff --git a/CRM/Contact/Page/View/Log.php b/CRM/Contact/Page/View/Log.php index 24b4c02980..cb3663bb29 100644 --- a/CRM/Contact/Page/View/Log.php +++ b/CRM/Contact/Page/View/Log.php @@ -45,8 +45,8 @@ class CRM_Contact_Page_View_Log extends CRM_Core_Page { $this->assign('useLogging', $loggingReport); if ($loggingReport) { - $this->assign('instanceUrl', - CRM_Utils_System::url("civicrm/report/instance/{$loggingReport}", + $this->assign('instanceUrl', + CRM_Utils_System::url("civicrm/report/instance/{$loggingReport}", "reset=1&force=1&snippet=4§ion=2&altered_contact_id_op=eq&altered_contact_id_value={$this->_contactId}&cid={$this->_contactId}", FALSE, NULL, FALSE)); return; } diff --git a/CRM/Contact/Page/View/Note.php b/CRM/Contact/Page/View/Note.php index 02ead389a5..13e0cdb5e3 100644 --- a/CRM/Contact/Page/View/Note.php +++ b/CRM/Contact/Page/View/Note.php @@ -194,7 +194,7 @@ class CRM_Contact_Page_View_Note extends CRM_Core_Page { // set page title CRM_Contact_Page_View::setTitle($this->_contactId); - + $displayName = CRM_Contact_BAO_Contact::displayName($this->_contactId); CRM_Utils_System::setTitle(ts('Notes for') . ' ' . $displayName); diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index 85bb0ec7e0..81aec9c479 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -2540,7 +2540,7 @@ WHERE contribution_id = %1 "; ); if (CRM_Utils_Array::value('payment_processor', $params)) { - $trxnParams['payment_processor_id'] = $params['payment_processor']; + $trxnParams['payment_processor_id'] = $params['payment_processor']; } $params['trxnParams'] = $trxnParams; @@ -2689,7 +2689,7 @@ WHERE contribution_id = %1 "; $params['trxnParams']['to_financial_account_id'] = NULL; $params['trxnParams']['total_amount'] = - $params['total_amount']; } - $relationTypeId = key(CRM_Core_PseudoConstant::accountOptionValues('account_relationship', NULL, " AND v.name LIKE 'Accounts Receivable Account is' ")); + $relationTypeId = key(CRM_Core_PseudoConstant::accountOptionValues('account_relationship', NULL, " AND v.name LIKE 'Accounts Receivable Account is' ")); $params['trxnParams']['from_financial_account_id'] = CRM_Contribute_PseudoConstant::financialAccountType( $financialTypeID, $relationTypeId); } diff --git a/CRM/Contribute/BAO/ContributionPage.php b/CRM/Contribute/BAO/ContributionPage.php index bf380b5766..61717fa294 100644 --- a/CRM/Contribute/BAO/ContributionPage.php +++ b/CRM/Contribute/BAO/ContributionPage.php @@ -73,7 +73,7 @@ class CRM_Contribute_BAO_ContributionPage extends CRM_Contribute_DAO_Contributio ); CRM_Core_DAO::commonRetrieve('CRM_Contribute_DAO_ContributionPage', $params, $values); - + // get the profile ids $ufJoinParams = array( 'module' => 'CiviContribute', @@ -210,7 +210,7 @@ class CRM_Contribute_BAO_ContributionPage extends CRM_Contribute_DAO_Contributio 0, ); } - + if (!$returnMessageText && !empty($gIds)) { //send notification email if field values are set (CRM-1941) foreach ($gIds as $key => $gId) { @@ -391,7 +391,7 @@ class CRM_Contribute_BAO_ContributionPage extends CRM_Contribute_DAO_Contributio } } } - + /* * Construct the message to be sent by the send function * @@ -710,7 +710,7 @@ WHERE entity_table = 'civicrm_contribution_page' ); $query = " SELECT civicrm_contribution_page.id as id, - civicrm_contribution_page.financial_type_id as settings, + civicrm_contribution_page.financial_type_id as settings, amount_block_is_active as amount, civicrm_membership_block.id as membership, civicrm_uf_join.id as custom, diff --git a/CRM/Contribute/Form/Contribution.php b/CRM/Contribute/Form/Contribution.php index b951b772b3..04b0cf0ef8 100644 --- a/CRM/Contribute/Form/Contribution.php +++ b/CRM/Contribute/Form/Contribution.php @@ -1394,7 +1394,7 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP ); //get the payment processor id as per mode. - $this->_params['payment_processor'] = $params['payment_processor_id'] = + $this->_params['payment_processor'] = $params['payment_processor_id'] = $this->_params['payment_processor_id'] = $submittedValues['payment_processor_id'] = $this->_paymentProcessor['id']; $now = date('YmdHis'); diff --git a/CRM/Contribute/Form/SoftCredit.php b/CRM/Contribute/Form/SoftCredit.php index e57d8623bd..b3e3833090 100644 --- a/CRM/Contribute/Form/SoftCredit.php +++ b/CRM/Contribute/Form/SoftCredit.php @@ -150,7 +150,7 @@ class CRM_Contribute_Form_SoftCredit { if ($repeat[$fields['soft_credit_contact_select_id'][$key]] > 1) { $errors["soft_credit_contact_select_id[$key]"] = ts('You cannot enter multiple soft credits for the same contact.'); } - if ($fields['soft_credit_amount'][$key] + if ($fields['soft_credit_amount'][$key] && (CRM_Utils_Rule::cleanMoney($fields['soft_credit_amount'][$key]) > CRM_Utils_Rule::cleanMoney($fields['total_amount']))) { $errors["soft_credit_amount[$key]"] = ts('Soft credit amount cannot be more than the total amount.'); } diff --git a/CRM/Contribute/Import/Parser/Contribution.php b/CRM/Contribute/Import/Parser/Contribution.php index 63c425545d..14dce5b34e 100644 --- a/CRM/Contribute/Import/Parser/Contribution.php +++ b/CRM/Contribute/Import/Parser/Contribution.php @@ -387,7 +387,7 @@ class CRM_Contribute_Import_Parser_Contribution extends CRM_Contribute_Import_Pa 'contact_id' => $formatted['soft_credit_to'], 'contribution_id' => $ids['contribution'], ); - + //FIXE ME: Need to fix this logic $existingSoftCredit = CRM_Contribute_BAO_ContributionSoft::getSoftContribution($dupeSoftCredit); if (CRM_Utils_Array::value('soft_credit_id', $existingSoftCredit)) { diff --git a/CRM/Core/BAO/CustomValueTable.php b/CRM/Core/BAO/CustomValueTable.php index 861f546903..3e7df8ecaa 100644 --- a/CRM/Core/BAO/CustomValueTable.php +++ b/CRM/Core/BAO/CustomValueTable.php @@ -40,7 +40,7 @@ class CRM_Core_BAO_CustomValueTable { ) { return; } - + foreach ($customParams as $tableName => $tables) { foreach ($tables as $index => $fields) { $sqlOP = NULL; diff --git a/CRM/Core/BAO/EntityTag.php b/CRM/Core/BAO/EntityTag.php index 28842861d7..09b320a8af 100644 --- a/CRM/Core/BAO/EntityTag.php +++ b/CRM/Core/BAO/EntityTag.php @@ -294,8 +294,8 @@ class CRM_Core_BAO_EntityTag extends CRM_Core_DAO_EntityTag { $select = "SELECT count(*) as cnt"; } - $query = "{$select} - FROM civicrm_tag ct + $query = "{$select} + FROM civicrm_tag ct INNER JOIN civicrm_entity_tag et ON ( ct.id = et.tag_id AND et.entity_id = {$contactID} AND et.entity_table = 'civicrm_contact' AND diff --git a/CRM/Core/BAO/Mapping.php b/CRM/Core/BAO/Mapping.php index 0a4912d3b8..47f813fdec 100644 --- a/CRM/Core/BAO/Mapping.php +++ b/CRM/Core/BAO/Mapping.php @@ -467,14 +467,14 @@ class CRM_Core_BAO_Mapping extends CRM_Core_DAO_Mapping { $csRelationships = array(); if ($mappingType == 'Export') { - $subTypeRelationshipTypes = + $subTypeRelationshipTypes = CRM_Contact_BAO_Relationship::getContactRelationshipType(NULL, NULL, NULL, $val['parent'], FALSE, 'label', TRUE, $subType); - + foreach ($subTypeRelationshipTypes as $key => $var) { if (!array_key_exists($key, $fields[$val['parent']])) { list($type) = explode('_', $key); - + $csRelationships[$key]['title'] = $var; $csRelationships[$key]['headerPattern'] = '/' . preg_quote($var, '/') . '/'; $csRelationships[$key]['export'] = TRUE; @@ -1024,7 +1024,7 @@ class CRM_Core_BAO_Mapping extends CRM_Core_DAO_Mapping { } } - if ($v[0] == 'Contribution' && substr($fldName, 0, 7) != 'custom_' + if ($v[0] == 'Contribution' && substr($fldName, 0, 7) != 'custom_' && substr($fldName, 0, 10) != 'financial_') { if (substr($fldName, 0, 13) != 'contribution_') { $fldName = 'contribution_' . $fldName; @@ -1173,7 +1173,7 @@ class CRM_Core_BAO_Mapping extends CRM_Core_DAO_Mapping { } if (CRM_Utils_Array::value('operator', $params)) { - $saveMappingFields->operator = CRM_Utils_Array::value($k, $params['operator'][$key]); + $saveMappingFields->operator = CRM_Utils_Array::value($k, $params['operator'][$key]); } if (CRM_Utils_Array::value('value', $params)) { $saveMappingFields->value = CRM_Utils_Array::value($k, $params['value'][$key]); diff --git a/CRM/Core/I18n/PseudoConstant.php b/CRM/Core/I18n/PseudoConstant.php index b96c2bc5ee..ef5ea2be4f 100644 --- a/CRM/Core/I18n/PseudoConstant.php +++ b/CRM/Core/I18n/PseudoConstant.php @@ -50,7 +50,7 @@ class CRM_Core_I18n_PseudoConstant { $longForShortMapping[$row['value']] = $row['name']; } // hand-crafted enforced overrides for language variants - // NB: when adding support for a regional override for a new language below, update + // NB: when adding support for a regional override for a new language below, update // relevant comments in templates/CRM/common/civicrm.settings.php.tpl as well $longForShortMapping['zh'] = defined("CIVICRM_LANGUAGE_MAPPING_ZH") ? CIVICRM_LANGUAGE_MAPPING_ZH : 'zh_CN'; $longForShortMapping['en'] = defined("CIVICRM_LANGUAGE_MAPPING_EN") ? CIVICRM_LANGUAGE_MAPPING_EN : 'en_US'; diff --git a/CRM/Core/OptionGroup.php b/CRM/Core/OptionGroup.php index 9a9c9bb8ca..66ab0bade0 100644 --- a/CRM/Core/OptionGroup.php +++ b/CRM/Core/OptionGroup.php @@ -372,7 +372,7 @@ WHERE v.option_group_id = g.id * @static * * @return string the value from the row where is_default = true - */ + */ static function getDefaultValue($groupName) { if (empty($groupName)) { return NULL; @@ -394,7 +394,7 @@ WHERE v.option_group_id = g.id $p = array(1 => array($groupName, 'String')); return CRM_Core_DAO::singleValueQuery($query, $p); } - + /** * Creates a new option group with the passed in values * @TODO: Should update the group if it already exists intelligently, so multi-lingual is diff --git a/CRM/Core/Page.php b/CRM/Core/Page.php index 8d69a0a807..3776ee4cbc 100644 --- a/CRM/Core/Page.php +++ b/CRM/Core/Page.php @@ -195,7 +195,7 @@ class CRM_Core_Page { if (empty($_GET['snippet'])) { // Version check and intermittent alert to admins CRM_Utils_VersionCheck::singleton()->versionAlert(); - + // Debug msg once per hour if ($config->debug && CRM_Core_Permission::check('administer CiviCRM') && CRM_Core_Session::singleton()->timer('debug_alert', 3600)) { $msg = ts('Warning: Debug is enabled in system settings. This should not be enabled on production servers.', array(1 => CRM_Utils_System::url('civicrm/admin/setting/debug', 'reset=1'))); diff --git a/CRM/Core/PseudoConstant.php b/CRM/Core/PseudoConstant.php index e5a0c27091..f70baac25b 100644 --- a/CRM/Core/PseudoConstant.php +++ b/CRM/Core/PseudoConstant.php @@ -251,7 +251,7 @@ class CRM_Core_PseudoConstant { $params['onlyActive'], $params['fresh'] ); - + CRM_Utils_Hook::customFieldOptions($customFieldID, $options, FALSE); return $options; } diff --git a/CRM/Core/Resources.php b/CRM/Core/Resources.php index 7e3d620ade..4868cba491 100644 --- a/CRM/Core/Resources.php +++ b/CRM/Core/Resources.php @@ -275,7 +275,7 @@ class CRM_Core_Resources { * Add translated string to the js CRM object. * It can then be retrived from the client-side ts() function * Variable substitutions can happen from client-side - * + * * Note: this function rarely needs to be called directly and is mostly for internal use. * @see CRM_Core_Resources::addScriptFile which automatically adds translated strings from js files * diff --git a/CRM/Core/ScheduledJob.php b/CRM/Core/ScheduledJob.php index decb45e903..1f4706c8ef 100644 --- a/CRM/Core/ScheduledJob.php +++ b/CRM/Core/ScheduledJob.php @@ -46,10 +46,10 @@ class CRM_Core_ScheduledJob { /* * Class constructor - * + * * @param string $namespace namespace prefix for component's files * @access public - * + * */ public function __construct($params) { diff --git a/CRM/Core/xml/Menu/Activity.xml b/CRM/Core/xml/Menu/Activity.xml index 59d635ebbd..b453219920 100644 --- a/CRM/Core/xml/Menu/Activity.xml +++ b/CRM/Core/xml/Menu/Activity.xml @@ -45,7 +45,7 @@ CRM_Activity_Page_AJAX::convertToCaseActivity access CiviCRM 3 -
+ civicrm/activity/search Find Activities diff --git a/CRM/Custom/Form/ChangeFieldType.php b/CRM/Custom/Form/ChangeFieldType.php index cea17606c2..a485e2ada6 100644 --- a/CRM/Custom/Form/ChangeFieldType.php +++ b/CRM/Custom/Form/ChangeFieldType.php @@ -61,7 +61,7 @@ class CRM_Custom_Form_ChangeFieldType extends CRM_Core_Form { * * @return void * @acess protected - */ + */ function preProcess() { $this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this, TRUE diff --git a/CRM/Custom/Form/CustomData.php b/CRM/Custom/Form/CustomData.php index 70e4e713d1..88a9198d75 100644 --- a/CRM/Custom/Form/CustomData.php +++ b/CRM/Custom/Form/CustomData.php @@ -102,7 +102,7 @@ class CRM_Custom_Form_CustomData { $typeCheck = CRM_Utils_Request::retrieve( 'type', 'String', CRM_Core_DAO::$_nullObject ); $urlGroupId = CRM_Utils_Request::retrieve('groupID', 'Positive', CRM_Core_DAO::$_nullObject); - if ( isset($typeCheck) && $urlGroupId) { + if ( isset($typeCheck) && $urlGroupId) { $form->_groupID = $urlGroupId; } else { $form->_groupID = CRM_Utils_Request::retrieve('groupID', 'Positive', $form); @@ -115,7 +115,7 @@ class CRM_Custom_Form_CustomData { if (!is_array($subType) && strstr($subType, CRM_Core_DAO::VALUE_SEPARATOR)) { $subType = str_replace(CRM_Core_DAO::VALUE_SEPARATOR, ',', trim($subType, CRM_Core_DAO::VALUE_SEPARATOR)); } - + $groupTree = &CRM_Core_BAO_CustomGroup::getTree($form->_type, $form, $form->_entityId, diff --git a/CRM/Custom/Form/DeleteField.php b/CRM/Custom/Form/DeleteField.php index 26d328d867..06111a6d16 100644 --- a/CRM/Custom/Form/DeleteField.php +++ b/CRM/Custom/Form/DeleteField.php @@ -59,7 +59,7 @@ class CRM_Custom_Form_DeleteField extends CRM_Core_Form { * * @return void * @acess protected - */ + */ function preProcess() { $this->_id = $this->get('id'); diff --git a/CRM/Custom/Form/DeleteGroup.php b/CRM/Custom/Form/DeleteGroup.php index 72cd177c35..27e0bd6117 100644 --- a/CRM/Custom/Form/DeleteGroup.php +++ b/CRM/Custom/Form/DeleteGroup.php @@ -57,7 +57,7 @@ class CRM_Custom_Form_DeleteGroup extends CRM_Core_Form { * * @return void * @acess protected - */ + */ function preProcess() { $this->_id = $this->get('id'); diff --git a/CRM/Custom/Form/Field.php b/CRM/Custom/Form/Field.php index 7de6ba95f8..75f9cbcbb3 100644 --- a/CRM/Custom/Form/Field.php +++ b/CRM/Custom/Form/Field.php @@ -563,7 +563,7 @@ class CRM_Custom_Form_Field extends CRM_Core_Form { $title = $fields['label']; $name = CRM_Utils_String::munge($title, '_', 64); $gId = $self->_gid; // CRM-7564 - $query = 'select count(*) from civicrm_custom_field where ( name like %1 OR label like %2 ) and id != %3 and custom_group_id = %4'; + $query = 'select count(*) from civicrm_custom_field where ( name like %1 OR label like %2 ) and id != %3 and custom_group_id = %4'; $fldCnt = CRM_Core_DAO::singleValueQuery($query, array(1 => array($name, 'String'), 2 => array($title, 'String'), 3 => array((int)$self->_id, 'Integer'), @@ -644,7 +644,7 @@ class CRM_Custom_Form_Field extends CRM_Core_Form { case 'StateProvince': if (!empty($default)) { $query = " -SELECT count(*) +SELECT count(*) FROM civicrm_state_province WHERE name = %1 OR abbreviation = %1"; @@ -945,8 +945,8 @@ AND option_group_id = %2"; $fieldStateProvince = $strtolower($params['default_value']); $query = " SELECT id - FROM civicrm_state_province - WHERE LOWER(name) = '$fieldStateProvince' + FROM civicrm_state_province + WHERE LOWER(name) = '$fieldStateProvince' OR abbreviation = '$fieldStateProvince'"; $dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray); if ($dao->fetch()) { @@ -959,7 +959,7 @@ SELECT id $query = " SELECT id FROM civicrm_country - WHERE LOWER(name) = '$fieldCountry' + WHERE LOWER(name) = '$fieldCountry' OR iso_code = '$fieldCountry'"; $dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray); if ($dao->fetch()) { diff --git a/CRM/Custom/Form/Group.php b/CRM/Custom/Form/Group.php index a56f2c93b1..8655f58e4c 100644 --- a/CRM/Custom/Form/Group.php +++ b/CRM/Custom/Form/Group.php @@ -528,7 +528,7 @@ class CRM_Custom_Form_Group extends CRM_Core_Form { /* * Function to return a formatted list of relationship name. * @param $list array array of relationship name. - * @static + * @static * return array array of relationship name. */ static function getFormattedList(&$list) { diff --git a/CRM/Custom/Form/MoveField.php b/CRM/Custom/Form/MoveField.php index f44a86d7ad..25946dc49d 100644 --- a/CRM/Custom/Form/MoveField.php +++ b/CRM/Custom/Form/MoveField.php @@ -78,7 +78,7 @@ class CRM_Custom_Form_MoveField extends CRM_Core_Form { * * @return void * @acess protected - */ + */ function preProcess() { $this->_srcFID = CRM_Utils_Request::retrieve('fid', 'Positive', $this, TRUE diff --git a/CRM/Custom/Form/Preview.php b/CRM/Custom/Form/Preview.php index 54db25835c..28d2aa568e 100644 --- a/CRM/Custom/Form/Preview.php +++ b/CRM/Custom/Form/Preview.php @@ -59,7 +59,7 @@ class CRM_Custom_Form_Preview extends CRM_Core_Form { * * @return void * @access public - */ + */ function preProcess() { // get the controller vars $this->_groupId = $this->get('groupId'); diff --git a/CRM/Dedupe/Finder.php b/CRM/Dedupe/Finder.php index c946ad2880..2de2da662b 100644 --- a/CRM/Dedupe/Finder.php +++ b/CRM/Dedupe/Finder.php @@ -81,7 +81,7 @@ class CRM_Dedupe_Finder { * * @param array $params array of params of the form $params[$table][$field] == $value * @param string $ctype contact type to match against - * @param string $used dedupe rule group usage ('Unsupervised' or 'Supervised' or 'General') + * @param string $used dedupe rule group usage ('Unsupervised' or 'Supervised' or 'General') * @param array $except array of contacts that shouldn't be considered dupes * @param int $ruleGroupID the id of the dedupe rule we should be using * diff --git a/CRM/Event/Form/EventFees.php b/CRM/Event/Form/EventFees.php index d67714cb55..ac04f9bdf7 100644 --- a/CRM/Event/Form/EventFees.php +++ b/CRM/Event/Form/EventFees.php @@ -193,7 +193,7 @@ class CRM_Event_Form_EventFees { else { $discountId = CRM_Core_BAO_Discount::findSet($form->_eventId, 'civicrm_event'); } - + if ($discountId) { $priceSetId = CRM_Core_DAO::getFieldValue('CRM_Core_BAO_Discount', $discountId, 'price_set_id'); } @@ -221,7 +221,7 @@ class CRM_Event_Form_EventFees { $defaults[$form->_pId] = array_merge($defaults[$form->_pId], $priceSetValues); } } - + if ($form->_action == CRM_Core_Action::ADD && CRM_Utils_Array::value('fields', $form->_priceSet)) { foreach ($form->_priceSet['fields'] as $key => $val) { foreach ($val['options'] as $keys => $values) { diff --git a/CRM/Event/Form/Registration.php b/CRM/Event/Form/Registration.php index a0e2288276..75cd2214f4 100644 --- a/CRM/Event/Form/Registration.php +++ b/CRM/Event/Form/Registration.php @@ -690,8 +690,8 @@ class CRM_Event_Form_Registration extends CRM_Core_Form { else { $price = CRM_Price_BAO_Set::initSet($form, $eventID, 'civicrm_event', TRUE); } - - if (property_exists($form, '_context') && ($form->_context == 'standalone' + + if (property_exists($form, '_context') && ($form->_context == 'standalone' || $form->_context == 'participant')) { $discountedEvent = CRM_Core_BAO_Discount::getOptionGroup($eventID, 'civicrm_event'); if (is_array( $discountedEvent)) { diff --git a/CRM/Financial/BAO/FinancialType.php b/CRM/Financial/BAO/FinancialType.php index 197474f4d6..a492e9145e 100644 --- a/CRM/Financial/BAO/FinancialType.php +++ b/CRM/Financial/BAO/FinancialType.php @@ -127,7 +127,7 @@ class CRM_Financial_BAO_FinancialType extends CRM_Financial_DAO_FinancialType { $financialType->find(true); // tables to ingore checks for financial_type_id $ignoreTables = array('CRM_Financial_DAO_EntityFinancialAccount'); - + //TODO: if (!$financialType->find(true)) { // ensure that we have no objects that have an FK to this financial type id TODO: that cannot be null @@ -159,7 +159,7 @@ class CRM_Financial_BAO_FinancialType extends CRM_Financial_DAO_FinancialType { $entityFinancialType->delete(); return FALSE; } - + /** * to fetch financial type having relationship as Income Account is * @@ -167,24 +167,24 @@ class CRM_Financial_BAO_FinancialType extends CRM_Financial_DAO_FinancialType { * @return array all financial type with income account is relationship * @static */ - static function getIncomeFinancialType() { + static function getIncomeFinancialType() { // Financial Type $financialType = CRM_Contribute_PseudoConstant::financialType(); $revenueFinancialType = array(); $relationTypeId = key(CRM_Core_PseudoConstant::accountOptionValues('account_relationship', NULL, " AND v.name LIKE 'Income Account is' ")); - CRM_Core_PseudoConstant::populate( + CRM_Core_PseudoConstant::populate( $revenueFinancialType, 'CRM_Financial_DAO_EntityFinancialAccount', - $all = True, - $retrieve = 'entity_id', - $filter = null, - "account_relationship = $relationTypeId AND entity_table = 'civicrm_financial_type' " + $all = True, + $retrieve = 'entity_id', + $filter = null, + "account_relationship = $relationTypeId AND entity_table = 'civicrm_financial_type' " ); - + foreach ($financialType as $key => $financialTypeName) { if (!in_array($key, $revenueFinancialType)) { unset($financialType[$key]); - } + } } return $financialType; } diff --git a/CRM/Financial/BAO/FinancialTypeAccount.php b/CRM/Financial/BAO/FinancialTypeAccount.php index e542d00161..9b76b9b733 100644 --- a/CRM/Financial/BAO/FinancialTypeAccount.php +++ b/CRM/Financial/BAO/FinancialTypeAccount.php @@ -214,10 +214,10 @@ WHERE cog.name = 'payment_instrument' "; /** * Function to create default entity financial accounts * for financial type - * CRM-12470 + * CRM-12470 * * @param int $financialTypeId financial type id - * + * * @static */ static function createDefaultFinancialAccounts($financialType) { @@ -250,7 +250,7 @@ WHERE cog.name = 'payment_instrument' "; $titles[] = 'Accounts Receivable'; } else { - $query = "SELECT financial_account_id, name FROM civicrm_entity_financial_account + $query = "SELECT financial_account_id, name FROM civicrm_entity_financial_account LEFT JOIN civicrm_financial_account ON civicrm_financial_account.id = civicrm_entity_financial_account.financial_account_id WHERE account_relationship = {$key} AND entity_table = 'civicrm_financial_type' LIMIT 1"; $dao = CRM_Core_DAO::executeQuery($query); @@ -270,7 +270,7 @@ WHERE cog.name = 'payment_instrument' "; $titles[] = $dao->name; } $params['account_relationship'] = $key; - self::add($params); + self::add($params); } return $titles; } diff --git a/CRM/Financial/Form/FinancialAccount.php b/CRM/Financial/Form/FinancialAccount.php index a970104d97..f52a1eb806 100644 --- a/CRM/Financial/Form/FinancialAccount.php +++ b/CRM/Financial/Form/FinancialAccount.php @@ -45,7 +45,7 @@ class CRM_Financial_Form_FinancialAccount extends CRM_Contribute_Form { * @var boolean */ protected $_isARFlag = FALSE; - + /** * Function to set variables up before form is built @@ -55,7 +55,7 @@ class CRM_Financial_Form_FinancialAccount extends CRM_Contribute_Form { */ public function preProcess() { parent::preProcess(); - + if ($this->_id) { $params = array( 'id' => $this->_id, @@ -63,11 +63,11 @@ class CRM_Financial_Form_FinancialAccount extends CRM_Contribute_Form { $financialAccount = CRM_Financial_BAO_FinancialAccount::retrieve($params, CRM_Core_DAO::$_nullArray); $financialAccountType = CRM_Core_PseudoConstant::accountOptionValues('financial_account_type'); if ($financialAccount->financial_account_type_id == array_search('Asset', $financialAccountType) - && strtolower($financialAccount->account_type_code) == 'ar' + && strtolower($financialAccount->account_type_code) == 'ar' && !CRM_Financial_BAO_FinancialAccount::getARAccounts($this->_id, array_search('Asset', $financialAccountType))) { $this->_isARFlag = TRUE; if ($this->_action & CRM_Core_Action::DELETE) { - CRM_Core_Session::setStatus(ts("The selected financial account cannot be deleted because at least one Accounts Receivable type account is required (to ensure that accounting transactions are in balance)."), + CRM_Core_Session::setStatus(ts("The selected financial account cannot be deleted because at least one Accounts Receivable type account is required (to ensure that accounting transactions are in balance)."), '', 'error'); CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/admin/financial/financialAccount', "reset=1&action=browse")); diff --git a/CRM/Financial/Form/FinancialTypeAccount.php b/CRM/Financial/Form/FinancialTypeAccount.php index ca03b6d748..424db529d1 100644 --- a/CRM/Financial/Form/FinancialTypeAccount.php +++ b/CRM/Financial/Form/FinancialTypeAccount.php @@ -68,7 +68,7 @@ class CRM_Financial_Form_FinancialTypeAccount extends CRM_Contribute_Form { * @var boolean */ protected $_isARFlag = FALSE; - + /** * Function to set variables up before form is built * @@ -82,25 +82,25 @@ class CRM_Financial_Form_FinancialTypeAccount extends CRM_Contribute_Form { if (!$this->_id && ($this->_action & CRM_Core_Action::UPDATE)) { $this->_id = CRM_Utils_Type::escape($this->_id, 'Positive'); } - $url = CRM_Utils_System::url('civicrm/admin/financial/financialType/accounts', - "reset=1&action=browse&aid={$this->_aid}"); - + $url = CRM_Utils_System::url('civicrm/admin/financial/financialType/accounts', + "reset=1&action=browse&aid={$this->_aid}"); + $this->_BAOName = 'CRM_Financial_BAO_FinancialTypeAccount'; if ($this->_aid && ($this->_action & CRM_Core_Action::ADD)) { $this->_title = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_FinancialType', $this->_aid, 'name'); CRM_Utils_System::setTitle($this->_title . ' - ' . ts('Financial Accounts')); - $session = CRM_Core_Session::singleton(); + $session = CRM_Core_Session::singleton(); $session->pushUserContext($url); - } + } // CRM-12492 - if (!($this->_action & CRM_Core_Action::ADD)) { + if (!($this->_action & CRM_Core_Action::ADD)) { $relationTypeId = key(CRM_Core_PseudoConstant::accountOptionValues('account_relationship', NULL, " AND v.name LIKE 'Accounts Receivable Account is' ")); $accountRelationship = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_EntityFinancialAccount', $this->_id, 'account_relationship'); if ($accountRelationship == $relationTypeId) { $this->_isARFlag = TRUE; if ($this->_action & CRM_Core_Action::DELETE) { - CRM_Core_Session::setStatus(ts("Selected financial type account with 'Accounts Receivable Account is' account relationship cannot be deleted."), + CRM_Core_Session::setStatus(ts("Selected financial type account with 'Accounts Receivable Account is' account relationship cannot be deleted."), '', 'error'); CRM_Utils_System::redirect($url); } diff --git a/CRM/Financial/Page/FinancialTypeAccount.php b/CRM/Financial/Page/FinancialTypeAccount.php index 82f1e78e5c..af12176b3b 100644 --- a/CRM/Financial/Page/FinancialTypeAccount.php +++ b/CRM/Financial/Page/FinancialTypeAccount.php @@ -169,7 +169,7 @@ class CRM_Financial_Page_FinancialTypeAccount extends CRM_Core_Page { // form all action links $action = array_sum(array_keys($this->links())); $links = self::links(); - + //CRM-12492 if ($dao->account_relationship == $relationTypeId) { unset($links[CRM_Core_Action::DELETE]); diff --git a/CRM/Friend/BAO/Friend.php b/CRM/Friend/BAO/Friend.php index e69debe2a9..9393d3ff0e 100644 --- a/CRM/Friend/BAO/Friend.php +++ b/CRM/Friend/BAO/Friend.php @@ -137,7 +137,7 @@ class CRM_Friend_BAO_Friend extends CRM_Friend_DAO_Friend { $activity = CRM_Activity_BAO_Activity::create($activityParams); $activityContacts = CRM_Core_OptionGroup::values('activity_contacts', FALSE, FALSE, FALSE, NULL, 'name'); $targetID = CRM_Utils_Array::key('Activity Targets', $activityContacts); - + //friend contacts creation foreach ($contactParams as $key => $value) { diff --git a/CRM/Logging/Differ.php b/CRM/Logging/Differ.php index 81d73200fd..9ac9f04878 100644 --- a/CRM/Logging/Differ.php +++ b/CRM/Logging/Differ.php @@ -106,10 +106,10 @@ LEFT JOIN civicrm_activity_contact source ON source.activity_id = lt.id AND sour // find ids in this table that were affected in the given connection (based on connection id and a ±10 s time period around the date) $sql = " -SELECT DISTINCT lt.id FROM `{$this->db}`.`log_$table` lt -{$join} -WHERE log_conn_id = %1 AND - log_date BETWEEN DATE_SUB(%2, INTERVAL {$this->interval}) AND DATE_ADD(%2, INTERVAL {$this->interval}) +SELECT DISTINCT lt.id FROM `{$this->db}`.`log_$table` lt +{$join} +WHERE log_conn_id = %1 AND + log_date BETWEEN DATE_SUB(%2, INTERVAL {$this->interval}) AND DATE_ADD(%2, INTERVAL {$this->interval}) {$contactIdClause}"; $dao = CRM_Core_DAO::executeQuery($sql, $params); @@ -159,7 +159,7 @@ WHERE log_conn_id = %1 AND $originalSQL = "SELECT * FROM `{$this->db}`.`log_$table` WHERE log_conn_id != %1 AND log_date < %2 AND id = %3 ORDER BY log_date DESC LIMIT 1"; $original = $this->sqlToArray($originalSQL, $params); if (empty($original)) { - // A blank original array is not possible for Update action, otherwise we 'll end up displaying all information + // A blank original array is not possible for Update action, otherwise we 'll end up displaying all information // in $changed variable as updated-info $original = $changed; } @@ -177,8 +177,8 @@ WHERE log_conn_id = %1 AND if (CRM_Utils_Array::value($diff, $original) === CRM_Utils_Array::value($diff, $changed)) { continue; } - - // hack: case_type_id column is a varchar with separator. For proper mapping to type labels, + + // hack: case_type_id column is a varchar with separator. For proper mapping to type labels, // we need to make sure separators are trimmed if ($diff == 'case_type_id') { foreach (array('original', 'changed') as $var) { diff --git a/CRM/Member/BAO/Membership.php b/CRM/Member/BAO/Membership.php index cba959fc3c..9230019338 100644 --- a/CRM/Member/BAO/Membership.php +++ b/CRM/Member/BAO/Membership.php @@ -41,11 +41,11 @@ class CRM_Member_BAO_Membership extends CRM_Member_DAO_Membership { * @static */ static $_importableFields = NULL; - + static $_renewalActType = NULL; - + static $_signupActType = NULL; - + function __construct() { parent::__construct(); } @@ -1087,7 +1087,7 @@ INNER JOIN civicrm_membership_type type ON ( type.id = membership.membership_ty * Function to get membership joins/renewals for a specified membership * type. Specifically, retrieves a count of memberships whose "Membership * Signup" or "Membership Renewal" activity falls in the given date range. - * Dates match the pattern "yyyy-mm-dd". + * Dates match the pattern "yyyy-mm-dd". * * @param int $membershipTypeId membership type id * @param int $startDate date on which to start counting @@ -1100,16 +1100,16 @@ INNER JOIN civicrm_membership_type type ON ( type.id = membership.membership_ty */ //LCD public static function getMembershipStarts($membershipTypeId, $startDate, $endDate, $isTest = 0, $isOwner = 0) { - + $testClause = 'membership.is_test = 1'; if (!$isTest) { $testClause = '( membership.is_test IS NULL OR membership.is_test = 0 )'; } - + if (!self::$_signupActType || !self::$_renewalActType) { self::_getActTypes(); } - + if (!self::$_signupActType || !self::$_renewalActType) { return 0; } @@ -1123,22 +1123,22 @@ INNER JOIN civicrm_contact contact ON ( contact.id = membership.contact_id AND WHERE membership.membership_type_id = %3 AND activity.activity_date_time >= '$startDate' AND activity.activity_date_time <= '$endDate 23:59:59' AND {$testClause}"; - + $query .= ($isOwner) ? ' AND owner_membership_id IS NULL' : ''; $params = array( 1 => array(self::$_signupActType, 'Integer'), 2 => array(self::$_renewalActType, 'Integer'), - 3 => array($membershipTypeId, 'Integer'), + 3 => array($membershipTypeId, 'Integer'), ); - + $memberCount = CRM_Core_DAO::singleValueQuery($query, $params); return (int)$memberCount; } /** * Function to get a count of membership for a specified membership type, - * optionally for a specified date. The date must have the form yyyy-mm-dd. + * optionally for a specified date. The date must have the form yyyy-mm-dd. * * If $date is omitted, this function counts as a member anyone whose * membership status_id indicates they're a current member. @@ -2318,7 +2318,7 @@ LEFT JOIN civicrm_membership mem ON ( cr.id = mem.contribution_recur_id ) * Function to get membership joins for a specified membership * type. Specifically, retrieves a count of still current memberships whose * join_date and start_date are within a specified date range. Dates match - * the pattern "yyyy-mm-dd". + * the pattern "yyyy-mm-dd". * * @param int $membershipTypeId membership type id * @param int $startDate date on which to start counting @@ -2337,15 +2337,15 @@ LEFT JOIN civicrm_membership mem ON ( cr.id = mem.contribution_recur_id ) if (!self::$_signupActType) { self::_getActTypes(); } - + if (!self::$_signupActType) { return 0; } $query = " - SELECT COUNT(DISTINCT membership.id) as member_count + SELECT COUNT(DISTINCT membership.id) as member_count FROM civicrm_membership membership -INNER JOIN civicrm_activity activity ON (activity.source_record_id = membership.id AND activity.activity_type_id = %1) +INNER JOIN civicrm_activity activity ON (activity.source_record_id = membership.id AND activity.activity_type_id = %1) INNER JOIN civicrm_membership_status status ON ( membership.status_id = status.id AND status.is_current_member = 1 ) INNER JOIN civicrm_contact contact ON ( contact.id = membership.contact_id AND contact.is_deleted = 0 ) WHERE membership.membership_type_id = %2 @@ -2365,7 +2365,7 @@ INNER JOIN civicrm_contact contact ON ( contact.id = membership.contact_id AND /** * Function to get membership renewals for a specified membership * type. Specifically, retrieves a count of still current memberships - * whose join_date is before and start_date is within a specified date + * whose join_date is before and start_date is within a specified date * range. Dates match the pattern "yyyy-mm-dd". * * @param int $membershipTypeId membership type id @@ -2385,19 +2385,19 @@ INNER JOIN civicrm_contact contact ON ( contact.id = membership.contact_id AND if (!self::$_renewalActType) { self::_getActTypes(); } - + if (!self::$_renewalActType) { return 0; } $query = " - SELECT COUNT(DISTINCT membership.id) as member_count + SELECT COUNT(DISTINCT membership.id) as member_count FROM civicrm_membership membership INNER JOIN civicrm_activity activity ON (activity.source_record_id = membership.id AND activity.activity_type_id = %1) INNER JOIN civicrm_membership_status status ON ( membership.status_id = status.id AND status.is_current_member = 1 ) INNER JOIN civicrm_contact contact ON ( contact.id = membership.contact_id AND contact.is_deleted = 0 ) WHERE membership.membership_type_id = %2 - AND activity.activity_date_time >= '$startDate' AND activity.activity_date_time <= '$endDate 23:59:59' + AND activity.activity_date_time >= '$startDate' AND activity.activity_date_time <= '$endDate 23:59:59' AND {$testClause}"; $params = array( @@ -2780,7 +2780,7 @@ WHERE civicrm_membership.is_test = 0"; $fieldID = key($qf->_priceSet['fields']); $qf->_params['price_' . $fieldID] = CRM_Utils_Array::value('id', $editedResults); } - + static function _getActTypes() { $activityTypes = CRM_Core_PseudoConstant::activityType(TRUE, FALSE, FALSE, 'name'); self::$_renewalActType = CRM_Utils_Array::key('Membership Renewal', $activityTypes); diff --git a/CRM/Member/Page/DashBoard.php b/CRM/Member/Page/DashBoard.php index 2642b0d259..7deb2b3f2f 100644 --- a/CRM/Member/Page/DashBoard.php +++ b/CRM/Member/Page/DashBoard.php @@ -60,7 +60,7 @@ class CRM_Member_Page_DashBoard extends CRM_Core_Page { // You can force the dashboard to display based upon a certain date $ym = CRM_Utils_Array::value('date', $_GET); - + if ($ym) { if (preg_match('/^\d{6}$/', $ym) == 0 || !checkdate(substr($ym, 4, 2), 1, substr($ym, 0, 4)) || @@ -165,10 +165,10 @@ class CRM_Member_Page_DashBoard extends CRM_Core_Page { $status = implode(',', $status); /* Disabled for lack of appropriate search - + The Membership search isn't able to properly filter by join or renewal events. Until that works properly, the subtotals shouldn't get links. - + foreach ($membershipSummary as $typeID => $details) { foreach ($details as $key => $value) { switch ($key) { @@ -238,9 +238,9 @@ class CRM_Member_Page_DashBoard extends CRM_Core_Page { } } */ - + // Temporary replacement for current totals column - + foreach ($membershipSummary as $typeID => $details) { if (!$isCurrentMonth) { $membershipSummary[$typeID]['total']['total']['url'] = CRM_Utils_System::url('civicrm/member/search', diff --git a/CRM/Report/Form/Case/TimeSpent.php b/CRM/Report/Form/Case/TimeSpent.php index 3b4ff1d57e..e80873d600 100644 --- a/CRM/Report/Form/Case/TimeSpent.php +++ b/CRM/Report/Form/Case/TimeSpent.php @@ -142,7 +142,7 @@ class CRM_Report_Form_Case_TimeSpent extends CRM_Report_Form { ), ), 'grouping' => 'activity-fields', - ), + ), 'civicrm_case_activity' => array( 'dao' => 'CRM_Case_DAO_CaseActivity', diff --git a/CRM/Report/Form/Contact/Detail.php b/CRM/Report/Form/Contact/Detail.php index 543d291e2e..0f0a650c90 100644 --- a/CRM/Report/Form/Contact/Detail.php +++ b/CRM/Report/Form/Contact/Detail.php @@ -330,7 +330,7 @@ class CRM_Report_Form_Contact_Detail extends CRM_Report_Form { ), ), 'grouping' => 'activity-fields', - ), + ), 'civicrm_group' => array( 'dao' => 'CRM_Contact_DAO_Group', @@ -499,7 +499,7 @@ class CRM_Report_Form_Contact_Detail extends CRM_Report_Form { {$this->_aliases['civicrm_activity']}.id = civicrm_activity_assignment.activity_id AND civicrm_activity_assignment.record_type_id = {$assigneeID} LEFT JOIN civicrm_activity_contact civicrm_activity_source ON {$this->_aliases['civicrm_activity']}.id = civicrm_activity_source.activity_id AND - civicrm_activity_source.record_type_id = {$sourceID} + civicrm_activity_source.record_type_id = {$sourceID} LEFT JOIN civicrm_contact {$this->_aliases['civicrm_activity_target']} ON civicrm_activity_target.contact_id = {$this->_aliases['civicrm_activity_target']}.id diff --git a/CRM/Report/Form/Contribute/Detail.php b/CRM/Report/Form/Contribute/Detail.php index 38d96aa54a..68320cf2b1 100644 --- a/CRM/Report/Form/Contribute/Detail.php +++ b/CRM/Report/Form/Contribute/Detail.php @@ -904,7 +904,7 @@ WHERE civicrm_contribution_contribution_id={$row['civicrm_contribution_contribu foreach ($totals as $key => $total) { $totalandsum[$key] = ts("%1 %2: %3", array( 1 => $total, - 2 => $title, + 2 => $title, 3 => CRM_Utils_Money::format($sumcontribs[$key]) )); } diff --git a/CRM/Upgrade/Incremental/sql/4.3.4.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.3.4.mysql.tpl index 3c0d1680fb..1c5b9352b6 100644 --- a/CRM/Upgrade/Incremental/sql/4.3.4.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.3.4.mysql.tpl @@ -39,17 +39,17 @@ SELECT @domainContactId := contact_id from civicrm_domain where id = {$domainID} -- for Accounts Receivable Account is SELECT @option_value_rel_id_ar := value FROM civicrm_option_value WHERE option_group_id = @option_group_id_arel AND name = 'Accounts Receivable Account is'; SELECT @arAccount := id FROM civicrm_financial_account WHERE LOWER(name) = 'accounts receivable'; -SELECT @arAccountEntity := financial_account_id FROM civicrm_entity_financial_account +SELECT @arAccountEntity := financial_account_id FROM civicrm_entity_financial_account WHERE account_relationship = @option_value_rel_id_ar AND entity_table = 'civicrm_financial_type' LIMIT 1; INSERT INTO civicrm_entity_financial_account(entity_table, entity_id, account_relationship, financial_account_id) SELECT 'civicrm_financial_type', cft.id, @option_value_rel_id_ar, IFNULL(@arAccount, @arAccountEntity) FROM civicrm_financial_type cft LEFT JOIN civicrm_entity_financial_account ceft -ON ceft.entity_id = cft.id AND ceft.account_relationship = @option_value_rel_id_ar AND ceft.entity_table = 'civicrm_financial_type' +ON ceft.entity_id = cft.id AND ceft.account_relationship = @option_value_rel_id_ar AND ceft.entity_table = 'civicrm_financial_type' WHERE ceft.entity_id IS NULL; --- for income account is +-- for income account is SELECT @option_value_rel_id := value FROM civicrm_option_value WHERE option_group_id = @option_group_id_arel AND name = 'Income Account is'; SELECT @opval := value FROM civicrm_option_value WHERE name = 'Revenue' and option_group_id = @option_group_id_fat; @@ -58,16 +58,16 @@ INSERT INTO civicrm_financial_account (name, contact_id, financial_account_type_ SELECT cft.name, @domainContactId, @opval, cft.name as description, 'INC', 1 FROM civicrm_financial_type cft LEFT JOIN civicrm_entity_financial_account ceft -ON ceft.entity_id = cft.id AND ceft.account_relationship = @option_value_rel_id AND ceft.entity_table = 'civicrm_financial_type' -LEFT JOIN civicrm_financial_account ca ON LOWER(ca.name) = LOWER(cft.name) +ON ceft.entity_id = cft.id AND ceft.account_relationship = @option_value_rel_id AND ceft.entity_table = 'civicrm_financial_type' +LEFT JOIN civicrm_financial_account ca ON LOWER(ca.name) = LOWER(cft.name) WHERE ceft.entity_id IS NULL AND ca.id IS NULL; INSERT INTO civicrm_entity_financial_account(entity_table, entity_id, account_relationship, financial_account_id) SELECT 'civicrm_financial_type', cft.id, @option_value_rel_id, ca.id FROM civicrm_financial_type cft LEFT JOIN civicrm_entity_financial_account ceft -ON ceft.entity_id = cft.id AND ceft.account_relationship = @option_value_rel_id AND ceft.entity_table = 'civicrm_financial_type' -LEFT JOIN civicrm_financial_account ca ON LOWER(ca.name) = LOWER(cft.name) +ON ceft.entity_id = cft.id AND ceft.account_relationship = @option_value_rel_id AND ceft.entity_table = 'civicrm_financial_type' +LEFT JOIN civicrm_financial_account ca ON LOWER(ca.name) = LOWER(cft.name) WHERE ceft.entity_id IS NULL; -- for cost of sales @@ -79,7 +79,7 @@ INSERT INTO civicrm_entity_financial_account(entity_table, entity_id, account_re SELECT 'civicrm_financial_type', cft.id, @option_value_rel_id_cg, @financialAccountId FROM civicrm_financial_type cft LEFT JOIN civicrm_entity_financial_account ceft -ON ceft.entity_id = cft.id AND ceft.account_relationship = @option_value_rel_id_cg AND ceft.entity_table = 'civicrm_financial_type' +ON ceft.entity_id = cft.id AND ceft.account_relationship = @option_value_rel_id_cg AND ceft.entity_table = 'civicrm_financial_type' WHERE ceft.entity_id IS NULL; -- for Expense Account is @@ -91,5 +91,5 @@ INSERT INTO civicrm_entity_financial_account(entity_table, entity_id, account_re SELECT 'civicrm_financial_type', cft.id, @option_value_rel_id_exp, @financialAccountId FROM civicrm_financial_type cft LEFT JOIN civicrm_entity_financial_account ceft -ON ceft.entity_id = cft.id AND ceft.account_relationship = 5 AND ceft.entity_table = 'civicrm_financial_type' +ON ceft.entity_id = cft.id AND ceft.account_relationship = 5 AND ceft.entity_table = 'civicrm_financial_type' WHERE ceft.entity_id IS NULL; diff --git a/api/class.api.php b/api/class.api.php index 65c06459ef..554862844b 100644 --- a/api/class.api.php +++ b/api/class.api.php @@ -146,7 +146,7 @@ class civicrm_api3 { $res->is_error = 1; $res->error = array('cURL error' => curl_error($ch)); return $res; - } + } curl_close($ch); return json_decode($result); // not good, all in get when should be in post. diff --git a/api/v3/Contribution.php b/api/v3/Contribution.php index 68214b516c..057edc8fb2 100644 --- a/api/v3/Contribution.php +++ b/api/v3/Contribution.php @@ -67,7 +67,7 @@ function civicrm_api3_contribution_create(&$params) { $ids['contribution'] = $params['id']; // CRM-12498 if (CRM_Utils_Array::value('contribution_status_id', $params)) { - $error = array(); + $error = array(); //throw error for invalid status change CRM_Contribute_BAO_Contribution::checkStatusValidation(NULL, $params, $error); if (array_key_exists('contribution_status_id', $error)) { diff --git a/api/v3/MessageTemplates.php b/api/v3/MessageTemplates.php index 3e7ad9318d..2850c9e095 100644 --- a/api/v3/MessageTemplates.php +++ b/api/v3/MessageTemplates.php @@ -42,7 +42,7 @@ function civicrm_api3_message_templates_create($params) { /** * Adjust Metadata for Create action - * + * * The metadata is used for setting defaults, documentation & validation * @param array $params array or parameters determined by getfields */ diff --git a/templates/CRM/Activity/Form/Activity.tpl b/templates/CRM/Activity/Form/Activity.tpl index 2b62c4b131..d908a2456c 100644 --- a/templates/CRM/Activity/Form/Activity.tpl +++ b/templates/CRM/Activity/Form/Activity.tpl @@ -150,7 +150,7 @@ {/if} - + {if $action neq 4} diff --git a/tests/phpunit/api/v3/dataset/mailing_bounced.xml b/tests/phpunit/api/v3/dataset/mailing_bounced.xml index 86f67b6cde..5224911cbe 100644 --- a/tests/phpunit/api/v3/dataset/mailing_bounced.xml +++ b/tests/phpunit/api/v3/dataset/mailing_bounced.xml @@ -1,6 +1,6 @@ - + iddomain_id diff --git a/tests/phpunit/api/v3/dataset/mailing_delivered.xml b/tests/phpunit/api/v3/dataset/mailing_delivered.xml index 44ae5b1a2a..cc530236c8 100644 --- a/tests/phpunit/api/v3/dataset/mailing_delivered.xml +++ b/tests/phpunit/api/v3/dataset/mailing_delivered.xml @@ -1,6 +1,6 @@ - +
iddomain_id -- 2.25.1