Commit 481a74f4 authored by totten's avatar totten

INFRA-132 - Remove white space after an opening "(" or before a closing ")"

parent 4c9b6178
......@@ -46,7 +46,7 @@ class CRM_ACL_Form_WordPress_Permissions extends CRM_Core_Form {
*/
public function buildQuickForm() {
CRM_Utils_System::setTitle( 'Wordpress Access Control' );
CRM_Utils_System::setTitle('Wordpress Access Control');
// Get the core permissions array
$permissionsArray = self::getPermissionArray();
......@@ -57,7 +57,7 @@ class CRM_ACL_Form_WordPress_Permissions extends CRM_Core_Form {
if (!isset($wp_roles)) {
$wp_roles = new WP_Roles();
}
foreach ( $wp_roles->role_names as $role => $name ) {
foreach ($wp_roles->role_names as $role => $name) {
// Dont show the permissions options for administrator, as they have all permissions
if ($role !== 'administrator') {
$roleObj = $wp_roles->get_role($role);
......@@ -72,7 +72,7 @@ class CRM_ACL_Form_WordPress_Permissions extends CRM_Core_Form {
// Compose the checkbox array for each role, to assign to form
$rolePerms[$role] = $permissionsArray;
foreach ( $rolePerms[$role] as $key => $value) {
foreach ($rolePerms[$role] as $key => $value) {
$elementName = $role.'['.$key.']';
$this->add('checkbox', $elementName, $value);
}
......@@ -91,7 +91,7 @@ class CRM_ACL_Form_WordPress_Permissions extends CRM_Core_Form {
'type' => 'next',
'name' => ts('Save'),
'spacing' => '',
'isDefault' => FALSE ),
'isDefault' => FALSE ),
)
);
......@@ -112,7 +112,7 @@ class CRM_ACL_Form_WordPress_Permissions extends CRM_Core_Form {
if (!isset($wp_roles)) {
$wp_roles = new WP_Roles();
}
foreach ( $wp_roles->role_names as $role => $name ) {
foreach ($wp_roles->role_names as $role => $name) {
$roleObj = $wp_roles->get_role($role);
//Remove all civicrm capabilities for the role, as there may be some capabilities checkbox unticked
......@@ -123,7 +123,7 @@ class CRM_ACL_Form_WordPress_Permissions extends CRM_Core_Form {
//Add the selected wordpress capabilities for the role
$rolePermissions = $params[$role];
if (!empty($rolePermissions)) {
foreach ( $rolePermissions as $key => $capability ) {
foreach ($rolePermissions as $key => $capability) {
$roleObj->add_cap($key);
}
}
......@@ -141,7 +141,7 @@ class CRM_ACL_Form_WordPress_Permissions extends CRM_Core_Form {
}
if (!empty($warningPermissionNames)) {
CRM_Core_Session::setStatus(
ts('The %1 role was assigned one or more permissions that may prove dangerous for users of that role to have. Please reconsider assigning %2 to them.', array( 1 => $wp_roles->role_names[$role], 2 => implode(', ', $warningPermissionNames))),
ts('The %1 role was assigned one or more permissions that may prove dangerous for users of that role to have. Please reconsider assigning %2 to them.', array(1 => $wp_roles->role_names[$role], 2 => implode(', ', $warningPermissionNames))),
ts('Unsafe Permission Settings')
);
}
......@@ -159,7 +159,7 @@ class CRM_ACL_Form_WordPress_Permissions extends CRM_Core_Form {
CRM_Core_Session::setStatus("", ts('Wordpress Access Control Updated'), "success");
// rebuild the menus to comply with the new permisssions/capabilites
CRM_Core_Invoke::rebuildMenuAndCaches( );
CRM_Core_Invoke::rebuildMenuAndCaches();
CRM_Utils_System::redirect('admin.php?page=CiviCRM&q=civicrm/admin/access&reset=1');
CRM_Utils_System::civiExit();
......
......@@ -53,7 +53,7 @@ class CRM_Activity_BAO_ICalendar {
* @return \CRM_Activity_BAO_ICalendar
@access public
*/
public function __construct( &$act ) {
public function __construct(&$act) {
$this->activity = $act;
}
......@@ -67,15 +67,15 @@ class CRM_Activity_BAO_ICalendar {
*
* @return string Array index of the added attachment in the $attachments array, or else null.
*/
public function addAttachment( &$attachments, $contacts ) {
public function addAttachment(&$attachments, $contacts) {
// Check preferences setting
if ( CRM_Core_BAO_Setting::getItem( CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'activity_assignee_notification_ics' ) ) {
if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'activity_assignee_notification_ics')) {
$config = &CRM_Core_Config::singleton();
$this->icsfile = tempnam( $config->customFileUploadDir, 'ics' );
if ( $this->icsfile !== FALSE ) {
rename( $this->icsfile, $this->icsfile . '.ics' );
$this->icsfile = tempnam($config->customFileUploadDir, 'ics');
if ($this->icsfile !== FALSE) {
rename($this->icsfile, $this->icsfile . '.ics');
$this->icsfile .= '.ics';
$icsFileName = basename( $this->icsfile );
$icsFileName = basename($this->icsfile);
// get logged in user's primary email
// TODO: Is there a better way to do this?
......@@ -87,8 +87,8 @@ class CRM_Activity_BAO_ICalendar {
$template->assign('contacts', $contacts);
$template->assign('timezone', date_default_timezone_get());
$calendar = $template->fetch('CRM/Activity/Calendar/ICal.tpl');
if ( file_put_contents( $this->icsfile, $calendar ) !== FALSE ) {
if ( empty( $attachments ) ) {
if (file_put_contents($this->icsfile, $calendar) !== FALSE) {
if (empty($attachments)) {
$attachments = array();
}
$attachments['activity_ics'] = array(
......@@ -105,8 +105,8 @@ class CRM_Activity_BAO_ICalendar {
}
public function cleanup() {
if ( !empty ( $this->icsfile ) ) {
@unlink( $this->icsfile );
if (!empty ($this->icsfile)) {
@unlink($this->icsfile);
}
}
......@@ -118,16 +118,16 @@ class CRM_Activity_BAO_ICalendar {
$session = &CRM_Core_Session::singleton();
$uid = $session->get('userID');
$primary = '';
$emails = CRM_Core_BAO_Email::allEmails( $uid );
foreach ( $emails as $eid => $e ) {
if ( $e['is_primary'] ) {
if ( $e['email'] ) {
$emails = CRM_Core_BAO_Email::allEmails($uid);
foreach ($emails as $eid => $e) {
if ($e['is_primary']) {
if ($e['email']) {
$primary = $e['email'];
break;
}
}
if ( count($emails) == 1 ) {
if (count($emails) == 1) {
$primary = $e['email'];
break;
}
......
......@@ -544,10 +544,10 @@ class CRM_Activity_BAO_Query {
$form->addSelect('activity_engagement_level', array('entity' => 'activity', 'context' => 'search'));
// Add survey result field.
$optionGroups = CRM_Campaign_BAO_Survey::getResultSets( 'name' );
$optionGroups = CRM_Campaign_BAO_Survey::getResultSets('name');
$resultOptions = array();
foreach ( $optionGroups as $gid => $name ) {
if ( $name ) {
foreach ($optionGroups as $gid => $name) {
if ($name) {
$value = array();
$value = CRM_Core_OptionGroup::values($name);
if (!empty($value)) {
......
......@@ -310,7 +310,7 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
// Set title
if (isset($activityTName)) {
$activityName = CRM_Utils_Array::value($this->_activityTypeId, $activityTName);
$this->assign('pageTitle', ts('%1 Activity', array( 1 => $activityName)));
$this->assign('pageTitle', ts('%1 Activity', array(1 => $activityName)));
if ($this->_currentlyViewedContactId) {
$displayName = CRM_Contact_BAO_Contact::displayName($this->_currentlyViewedContactId);
......@@ -321,7 +321,7 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
CRM_Utils_System::setTitle($displayName . ' - ' . $activityName);
}
else {
CRM_Utils_System::setTitle(ts('%1 Activity', array( 1 => $activityName)));
CRM_Utils_System::setTitle(ts('%1 Activity', array(1 => $activityName)));
}
}
......@@ -429,7 +429,7 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
$urlParams .= "&qfKey=$qfKey";
}
$path = CRM_Utils_System::currentPath();
if ($this->_compContext == 'advanced' ) {
if ($this->_compContext == 'advanced') {
$urlString = 'civicrm/contact/search/advanced';
}
elseif ($path == 'civicrm/group/search'
......
......@@ -87,7 +87,7 @@ class CRM_Activity_Form_ActivityView extends CRM_Core_Form {
$this->_mailing_id, NULL, FALSE, NULL, NULL, NULL, $cid);
$this->assign('openreport', $full_open_report);
$click_thru_report = CRM_Mailing_Event_BAO_TrackableURLOpen::getRows( $this->_mailing_id, NULL, FALSE, NULL, NULL, NULL, NULL, $cid);
$click_thru_report = CRM_Mailing_Event_BAO_TrackableURLOpen::getRows($this->_mailing_id, NULL, FALSE, NULL, NULL, NULL, NULL, $cid);
$this->assign('clickreport', $click_thru_report);
}
......
......@@ -125,7 +125,7 @@ class CRM_Activity_Form_Task_PickOption extends CRM_Activity_Form_Task {
* @static
*/
public static function formRule($fields) {
if ( !isset($fields['with_contact']) &&
if (!isset($fields['with_contact']) &&
!isset($fields['assigned_to']) &&
!isset($fields['created_by'])
) {
......@@ -173,7 +173,7 @@ class CRM_Activity_Form_Task_PickOption extends CRM_Activity_Form_Task {
$this->_contacts = array_unique($this->_contacts);
//bounce to pick option if no contacts to send to
if ( empty($this->_contacts) ) {
if (empty($this->_contacts)) {
$urlParams = "_qf_PickOption_display=true&qfKey={$params['qfKey']}";
$urlRedirect = CRM_Utils_System::url('civicrm/activity/search', $urlParams);
CRM_Core_Error::statusBounce(
......
......@@ -500,7 +500,7 @@ class CRM_Activity_Page_AJAX {
$domainID,
TRUE
);
if ( $cacheKey ) {
if ($cacheKey) {
CRM_Core_BAO_Setting::flushCache($cacheKey);
}
......
......@@ -233,7 +233,7 @@ class CRM_Activity_Selector_Activity extends CRM_Core_Selector_Base implements C
elseif ($activityTypeName == 'Print PDF Letter') {
$updateUrl = 'civicrm/activity/pdf/add';
}
if ( CRM_Activity_BAO_Activity::checkPermission($activityId, CRM_Core_Action::UPDATE) ) {
if (CRM_Activity_BAO_Activity::checkPermission($activityId, CRM_Core_Action::UPDATE)) {
$actionLinks += array(CRM_Core_Action::
UPDATE => array(
'name' => ts('Edit'),
......
......@@ -125,8 +125,8 @@ class CRM_Activity_Task {
$config = CRM_Core_Config::singleton();
if (in_array('CiviCase', $config->enableComponents)) {
if ( CRM_Core_Permission::check('access all cases and activities') ||
CRM_Core_Permission::check('access my cases and activities') ) {
if (CRM_Core_Permission::check('access all cases and activities') ||
CRM_Core_Permission::check('access my cases and activities')) {
self::$_tasks[6] = array(
'title' => ts('File on Case'),
'class' => 'CRM_Activity_Form_Task_FileOnCase',
......
......@@ -70,7 +70,7 @@ class CRM_Admin_Form extends CRM_Core_Form {
$params = array('id' => $this->_id);
// this is needed if the form is outside the CRM name space
$baoName = $this->_BAOName;
$baoName::retrieve($params, $this->_values );
$baoName::retrieve($params, $this->_values);
}
}
......@@ -86,7 +86,7 @@ class CRM_Admin_Form extends CRM_Core_Form {
$this->_values = array();
$params = array('id' => $this->_id);
$baoName = $this->_BAOName;
$baoName::retrieve($params, $this->_values );
$baoName::retrieve($params, $this->_values);
}
$defaults = $this->_values;
......
......@@ -59,7 +59,7 @@ class CRM_Admin_Form_PaymentProcessor extends CRM_Admin_Form {
if ($this->_id) {
$this->_ppType = CRM_Utils_Request::retrieve('pp', 'String', $this, FALSE, NULL);
if (!$this->_ppType) {
$this->_ppType = CRM_Core_DAO::getFieldValue( 'CRM_Financial_DAO_PaymentProcessor',
$this->_ppType = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_PaymentProcessor',
$this->_id,
'payment_processor_type_id'
);
......@@ -71,13 +71,13 @@ class CRM_Admin_Form_PaymentProcessor extends CRM_Admin_Form {
}
$this->assign('ppType', $this->_ppType);
$ppTypeName = CRM_Core_DAO::getFieldValue( 'CRM_Financial_DAO_PaymentProcessorType',
$ppTypeName = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_PaymentProcessorType',
$this->_ppType,
'name'
);
$this->assign('ppTypeName', $ppTypeName );
$this->assign('ppTypeName', $ppTypeName);
$this->_ppDAO = new CRM_Financial_DAO_PaymentProcessorType( );
$this->_ppDAO = new CRM_Financial_DAO_PaymentProcessorType();
$this->_ppDAO->id = $this->_ppType;
if (!$this->_ppDAO->find(TRUE)) {
......@@ -188,7 +188,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,
$this->add('select', 'payment_processor_type_id', ts('Payment Processor Type'), $types, TRUE,
array('onchange' => "reload(true)")
);
......@@ -305,7 +305,7 @@ class CRM_Admin_Form_PaymentProcessor extends CRM_Admin_Form {
}
$domainID = CRM_Core_Config::domainID();
$dao = new CRM_Financial_DAO_PaymentProcessor( );
$dao = new CRM_Financial_DAO_PaymentProcessor();
$dao->id = $this->_id;
$dao->domain_id = $domainID;
if (!$dao->find(TRUE)) {
......@@ -339,7 +339,7 @@ class CRM_Admin_Form_PaymentProcessor extends CRM_Admin_Form {
* @return Void
*/
public function postProcess() {
CRM_Utils_System::flushCache( 'CRM_Financial_DAO_PaymentProcessor' );
CRM_Utils_System::flushCache('CRM_Financial_DAO_PaymentProcessor');
if ($this->_action & CRM_Core_Action::DELETE) {
CRM_Financial_BAO_PaymentProcessor::del($this->_id);
......@@ -370,7 +370,7 @@ class CRM_Admin_Form_PaymentProcessor extends CRM_Admin_Form {
* @return Void
*/
public function updatePaymentProcessor(&$values, $domainID, $test) {
$dao = new CRM_Financial_DAO_PaymentProcessor( );
$dao = new CRM_Financial_DAO_PaymentProcessor();
$dao->id = $test ? $this->_testID : $this->_id;
$dao->domain_id = $domainID;
......
......@@ -159,7 +159,7 @@ class CRM_Admin_Form_PaymentProcessorType extends CRM_Admin_Form {
return;
}
$attributes = CRM_Core_DAO::getAttribute( 'CRM_Financial_DAO_PaymentProcessorType' );
$attributes = CRM_Core_DAO::getAttribute('CRM_Financial_DAO_PaymentProcessorType');
foreach ($this->_fields as $field) {
$required = CRM_Utils_Array::value('required', $field, FALSE);
......@@ -192,7 +192,7 @@ class CRM_Admin_Form_PaymentProcessorType extends CRM_Admin_Form {
return $defaults;
}
$dao = new CRM_Financial_DAO_PaymentProcessorType( );
$dao = new CRM_Financial_DAO_PaymentProcessorType();
$dao->id = $this->_id;
if (!$dao->find(TRUE)) {
......@@ -211,7 +211,7 @@ class CRM_Admin_Form_PaymentProcessorType extends CRM_Admin_Form {
* @return void
*/
public function postProcess() {
CRM_Utils_System::flushCache( 'CRM_Financial_DAO_PaymentProcessorType' );
CRM_Utils_System::flushCache('CRM_Financial_DAO_PaymentProcessorType');
if ($this->_action & CRM_Core_Action::DELETE) {
CRM_Financial_BAO_PaymentProcessorType::del($this->_id);
......@@ -226,7 +226,7 @@ UPDATE civicrm_payment_processor SET is_default = 0";
CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
}
$dao = new CRM_Financial_DAO_PaymentProcessorType( );
$dao = new CRM_Financial_DAO_PaymentProcessorType();
$dao->id = $this->_id;
$dao->is_default = CRM_Utils_Array::value('is_default', $values, 0);
......
......@@ -92,7 +92,7 @@ class CRM_Admin_Form_Setting_Smtp extends CRM_Admin_Form_Setting {
if ($formValues['outBound_option'] == CRM_Mailing_Config::OUTBOUND_OPTION_DISABLED) {
CRM_Core_Session::setStatus(ts('You have selected "Disable Outbound Email". A test email can not be sent.'), ts("Email Disabled"), "error");
}
elseif ( $formValues['outBound_option'] == CRM_Mailing_Config::OUTBOUND_OPTION_REDIRECT_TO_DB ) {
elseif ($formValues['outBound_option'] == CRM_Mailing_Config::OUTBOUND_OPTION_REDIRECT_TO_DB) {
CRM_Core_Session::setStatus(ts('You have selected "Redirect to Database". A test email can not be sent.'), ts("Email Disabled"), "error");
}
else {
......
......@@ -97,7 +97,7 @@ class CRM_Admin_Form_Setting_Url extends CRM_Admin_Form_Setting {
// a potentially spurious message which might already have been set. This
// is a bit hackish
// CRM-10629
$session = CRM_Core_Session::singleton( );
$session = CRM_Core_Session::singleton();
$session->getStatus(TRUE);
parent::postProcess();
......
......@@ -122,8 +122,8 @@ class CRM_Admin_Form_WordReplacements extends CRM_Core_Form {
//CRM-14179
$instances = 0;
foreach ( $values as $valMatchType ) {
foreach ( $valMatchType as $valPairs ) {
foreach ($values as $valMatchType) {
foreach ($valMatchType as $valPairs) {
$instances += count($valPairs);
}
}
......
......@@ -55,7 +55,7 @@ class CRM_Admin_Page_Access extends CRM_Core_Page {
case 'Joomla':
//condition based on Joomla version; <= 2.5 uses modal window; >= 3.0 uses full page with return value
if (version_compare(JVERSION, '3.0', 'lt') ) {
if (version_compare(JVERSION, '3.0', 'lt')) {
JHTML::_('behavior.modal');
$url = $config->userFrameworkBaseURL . 'index.php?option=com_config&view=component&component=com_civicrm&tmpl=component';
$jparams = 'rel="{handler: \'iframe\', size: {x: 875, y: 550}, onClose: function() {}}" class="modal"';
......
......@@ -55,11 +55,11 @@ class CRM_Admin_Page_Extensions extends CRM_Core_Page_Basic {
*/
public function preProcess() {
CRM_Utils_System::setTitle(ts('CiviCRM Extensions'));
$destination = CRM_Utils_System::url( 'civicrm/admin/extensions',
'reset=1' );
$destination = CRM_Utils_System::url('civicrm/admin/extensions',
'reset=1');
$destination = urlencode( $destination );
$this->assign( 'destination', $destination );
$destination = urlencode($destination);
$this->assign('destination', $destination);
}
/**
......
......@@ -92,7 +92,7 @@ class CRM_Badge_Form_Layout extends CRM_Admin_Form {
unset($imageAlignment['C']);
$rowCount = self::FIELD_ROWCOUNT;
for ( $i = 1; $i <= $rowCount; $i++ ) {
for ($i = 1; $i <= $rowCount; $i++) {
$this->add('select', "token[$i]", ts('Token'), array('' => ts('- skip -')) + $tokens);
$this->add('select', "font_name[$i]", ts('Font Name'), $fontNames);
$this->add('select', "font_size[$i]", ts('Font Size'), $fontSizes);
......
......@@ -513,7 +513,7 @@ class CRM_Batch_BAO_Batch extends CRM_Batch_DAO_Batch {
$batches = array();
$dao = CRM_Core_DAO::executeQuery($query);
while ( $dao->fetch( ) ) {
while ($dao->fetch()) {
$batches[$dao->id] = $dao->title;
}
return $batches;
......@@ -592,7 +592,7 @@ class CRM_Batch_BAO_Batch extends CRM_Batch_DAO_Batch {
// Instantiate appropriate exporter based on user-selected format.
$exporterClass = "CRM_Financial_BAO_ExportFormat_" . self::$_exportFormat;
if ( class_exists( $exporterClass ) ) {
if (class_exists($exporterClass)) {
$exporter = new $exporterClass();
}
else {
......@@ -621,10 +621,10 @@ class CRM_Batch_BAO_Batch extends CRM_Batch_DAO_Batch {
*/
public static function closeReOpen($batchIds = array(), $status) {
$batchStatus = CRM_Core_PseudoConstant::get('CRM_Batch_DAO_Batch', 'status_id');
$params['status_id'] = CRM_Utils_Array::key( $status, $batchStatus );
$session = CRM_Core_Session::singleton( );
$params['status_id'] = CRM_Utils_Array::key($status, $batchStatus);
$session = CRM_Core_Session::singleton();
$params['modified_date'] = date('YmdHis');
$params['modified_id'] = $session->get( 'userID' );
$params['modified_id'] = $session->get('userID');
foreach ($batchIds as $key => $value) {
$params['id'] = $ids['batchID'] = $value;
self::create($params, $ids);
......@@ -654,7 +654,7 @@ class CRM_Batch_BAO_Batch extends CRM_Batch_DAO_Batch {
}
// action is taken depending upon the mode
$select = 'civicrm_financial_trxn.id ';
if (!empty( $returnValues)) {
if (!empty($returnValues)) {
$select .= " , ".implode(' , ', $returnValues);
}
......@@ -784,7 +784,7 @@ WHERE {$where}
$batches = array();
$dao = CRM_Core_DAO::executeQuery($query);
while ( $dao->fetch( ) ) {
while ($dao->fetch()) {
$batches[$dao->id] = $dao->title;
}
return $batches;
......@@ -804,7 +804,7 @@ WHERE {$where}
$batches = array();
$dao = CRM_Core_DAO::executeQuery($query);
while ( $dao->fetch( ) ) {
while ($dao->fetch()) {
$batches[$dao->id] = $dao->status_id;
}
return $batches;
......
......@@ -114,7 +114,7 @@ class CRM_Batch_Form_Batch extends CRM_Admin_Form {
else {
$session = CRM_Core_Session::singleton();
$params['created_id'] = $session->get('userID');
$params['created_date'] = CRM_Utils_Date::processDate( date( "Y-m-d" ), date( "H:i:s" ) );
$params['created_date'] = CRM_Utils_Date::processDate(date("Y-m-d"), date("H:i:s"));
}
// always create with data entry status
......@@ -123,7 +123,7 @@ class CRM_Batch_Form_Batch extends CRM_Admin_Form {
// redirect to batch entry page.
$session = CRM_Core_Session::singleton();
if ( $this->_action & CRM_Core_Action::ADD ) {
if ($this->_action & CRM_Core_Action::ADD) {
$session->replaceUserContext(CRM_Utils_System::url('civicrm/batch/entry', "id={$batch->id}&reset=1&action=add"));
}
else {
......
......@@ -342,12 +342,12 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form {
}
// for add mode set smart defaults
if ( $this->_action & CRM_Core_Action::ADD ) {
list( $currentDate, $currentTime ) = CRM_Utils_Date::setDateDefaults( NULL, 'activityDateTime' );
if ($this->_action & CRM_Core_Action::ADD) {
list($currentDate, $currentTime) = CRM_Utils_Date::setDateDefaults(NULL, 'activityDateTime');
//get all status
$allStatus = CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'name');
$completeStatus = array_search( 'Completed', $allStatus );
$completeStatus = array_search('Completed', $allStatus);
$specialFields = array(
'join_date' => $currentDate,
'receive_date' => $currentDate,
......@@ -356,7 +356,7 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form {
);
for ($rowNumber = 1; $rowNumber <= $this->_batchInfo['item_count']; $rowNumber++) {
foreach ($specialFields as $key => $value ) {
foreach ($specialFields as $key => $value) {
$defaults['field'][$rowNumber][$key] = $value;
}
}
......@@ -464,7 +464,7 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form {
foreach ($dates as $val) {
if (!empty($value[$val])) {
$value[$val] = CRM_Utils_Date::processDate( $value[$val], $value[$val . '_time'], TRUE );
$value[$val] = CRM_Utils_Date::processDate($value[$val], $value[$val . '_time'], TRUE);
}
}
......@@ -523,7 +523,7 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form {
if (is_numeric($pledgeId)) {
$result = CRM_Pledge_BAO_PledgePayment::getPledgePayments($pledgeId);
$pledgePaymentId = 0;
foreach ($result as $key => $values ) {
foreach ($result as $key => $values) {
if ($values['status'] != 'Completed') {
$pledgePaymentId = $values['id'];
break;
......@@ -569,7 +569,7 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form {
$domainEmail = "$domainEmail[0] <$domainEmail[1]>";
$value['from_email_address'] = $domainEmail;
$value['contribution_id'] = $contribution->id;
CRM_Contribute_Form_AdditionalInfo::emailReceipt( $this, $value );
CRM_Contribute_Form_AdditionalInfo::emailReceipt($this, $value);
}
}
}
......@@ -698,7 +698,7 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form {
}
if (!empty($value['receive_date'])) {
$value['receive_date'] = CRM_Utils_Date::processDate( $value['receive_date'], $value['receive_date_time'], TRUE );
$value['receive_date'] = CRM_Utils_Date::processDate($value['receive_date'], $value['receive_date_time'], TRUE);
}
$params['actualBatchTotal'] += $value['total_amount'];
......@@ -763,7 +763,7 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form {
unset($value['membership_end_date']);
$value['is_renew'] = FALSE;
if (!empty($params['member_option']) && CRM_Utils_Array::value( $key, $params['member_option'] ) == 2 ) {
if (!empty($params['member_option']) && CRM_Utils_Array::value($key, $params['member_option']) == 2) {
$this->_params = $params;
$value['is_renew'] = TRUE;
$membership = CRM_Member_BAO_Membership::renewMembershipFormWrapper(
......@@ -774,7 +774,7 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form {
);
// make contribution entry
CRM_Member_BAO_Membership::recordMembershipContribution( array_merge($value, array('membership_id' => $membership->id)));
CRM_Member_BAO_Membership::recordMembershipContribution(array_merge($value, array('membership_id' => $membership->id)));
}
else {
$membership = CRM_Member_BAO_Membership::create($value, CRM_Core_DAO::$_nullArray);
......@@ -803,7 +803,7 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form {
// end of premium