forked from CiviWare/org.agbu.batchexportperm
		
	fix bug on new contributions submitted from non-logged in user
This commit is contained in:
		@@ -286,10 +286,12 @@ function _batchexportperm_civicrm_allow_contribution_to_edit($contributionId) {
 | 
			
		||||
    'custom_group_id' => "batchexportperm_batch_details",
 | 
			
		||||
    'name' => "export_date",
 | 
			
		||||
  ]);
 | 
			
		||||
  $exportDate = civicrm_api3('Contribution', 'getvalue', [
 | 
			
		||||
  $exportDate = civicrm_api3('Contribution', 'get', [
 | 
			
		||||
    'return' => "custom_{$customFieldId}",
 | 
			
		||||
    'id' => $contributionId,
 | 
			
		||||
  ]);
 | 
			
		||||
    'sequential' => 1,
 | 
			
		||||
  ])['values'][0]["custom_{$customFieldId}"];
 | 
			
		||||
  CRM_Core_Error::debug('exportdate', $exportDate);
 | 
			
		||||
  if (empty($exportDate) || CRM_Core_Permission::check('edit exported contributions')) {
 | 
			
		||||
    return TRUE;
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user