+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
*
* @throws Exception
*/
- static function filePostProcess(
+ public static function filePostProcess(
$data,
$fileTypeID,
$entityTable,
/**
* Delete all the files and associated object associated with this
* combination
+ * @return bool
+ * Was file deleted?
*/
public static function deleteEntityFile($entityTable, $entityID, $fileTypeID = NULL, $fileID = NULL) {
+ $isDeleted = FALSE;
if (empty($entityTable) || empty($entityID)) {
- return;
+ return $isDeleted;
}
$config = CRM_Core_Config::singleton();
$cefIDs = implode(',', $cefIDs);
$sql = "DELETE FROM civicrm_entity_file where id IN ( $cefIDs )";
CRM_Core_DAO::executeQuery($sql);
+ $isDeleted = TRUE;
}
if (!empty($cfIDs)) {
$sql = "DELETE FROM civicrm_file where id IN ( $deleteFiles )";
CRM_Core_DAO::executeQuery($sql);
}
+ $isDeleted = TRUE;
}
+ return $isDeleted;
}
/**
* @param $entityTable
* @param int $entityID
*/
- static function formatAttachment(
+ public static function formatAttachment(
&$formValues,
&$params,
$entityTable,
}
return NULL;
}
+
}