예제 #1
0
 /**
  * Determines the file name based on error code.
  *
  * @param int $type
  *   Error code constant.
  *
  * @return string
  */
 public static function saveFileName($type)
 {
     $fileName = NULL;
     if (empty($type)) {
         return $fileName;
     }
     switch ($type) {
         case CRM_Contribute_Import_Parser::SOFT_CREDIT_ERROR:
             $fileName = 'Import_Soft_Credit_Errors.csv';
             break;
         case CRM_Contribute_Import_Parser::PLEDGE_PAYMENT_ERROR:
             $fileName = 'Import_Pledge_Payment_Errors.csv';
             break;
         default:
             $fileName = parent::saveFileName($type);
             break;
     }
     return $fileName;
 }
예제 #2
0
 function saveFileName($type)
 {
     require_once 'CRM/Import/Parser.php';
     $fileName = CRM_Import_Parser::saveFileName($type);
     return $fileName;
 }
예제 #3
0
 function saveFileName($type)
 {
     $fileName = null;
     if (empty($type)) {
         return $fileName;
     }
     switch ($type) {
         case CRM_Contribute_Import_Parser::ERROR:
         case CRM_Contribute_Import_Parser::NO_MATCH:
         case CRM_Contribute_Import_Parser::CONFLICT:
         case CRM_Contribute_Import_Parser::DUPLICATE:
             //here constants get collides.
             require_once 'CRM/Import/Parser.php';
             if ($type == CRM_Contribute_Import_Parser::ERROR) {
                 $type = CRM_Import_Parser::ERROR;
             } else {
                 if ($type == CRM_Contribute_Import_Parser::NO_MATCH) {
                     $type = CRM_Import_Parser::NO_MATCH;
                 } else {
                     if ($type == CRM_Contribute_Import_Parser::CONFLICT) {
                         $type = CRM_Import_Parser::CONFLICT;
                     } else {
                         $type = CRM_Import_Parser::DUPLICATE;
                     }
                 }
             }
             $fileName = CRM_Import_Parser::saveFileName($type);
             break;
         case CRM_Contribute_Import_Parser::SOFT_CREDIT_ERROR:
             $fileName = 'Import_Soft_Credit_Errors.csv';
             break;
         case CRM_Contribute_Import_Parser::PLEDGE_PAYMENT_ERROR:
             $fileName = 'Import_Pledge_Payment_Errors.csv';
             break;
     }
     return $fileName;
 }
예제 #4
0
 function saveFileName($type)
 {
     $fileName = CRM_Import_Parser::saveFileName($type);
     return $fileName;
 }