From: eileen Date: Mon, 14 Jan 2019 01:25:29 +0000 (+1300) Subject: Remove unused file parameters X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9bbc34f1d71bc15b602437d83bc63aff0c9022f8;p=civicrm-core.git Remove unused file parameters --- diff --git a/CRM/Core/BAO/CustomField.php b/CRM/Core/BAO/CustomField.php index 8e08547b32..c6933779a3 100644 --- a/CRM/Core/BAO/CustomField.php +++ b/CRM/Core/BAO/CustomField.php @@ -1494,7 +1494,7 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField { 'entity_id', 'file_id' ); - list($path) = CRM_Core_BAO_File::path($fileID, $entityId, NULL, NULL); + list($path) = CRM_Core_BAO_File::path($fileID, $entityId); $url = CRM_Utils_System::url('civicrm/file', "reset=1&id=$fileID&eid=$contactID", $absolute, NULL, TRUE, TRUE diff --git a/CRM/Core/BAO/CustomGroup.php b/CRM/Core/BAO/CustomGroup.php index 84c46f02c6..b2a5cccf7b 100644 --- a/CRM/Core/BAO/CustomGroup.php +++ b/CRM/Core/BAO/CustomGroup.php @@ -919,7 +919,7 @@ ORDER BY civicrm_custom_group.weight, ); $customValue['imageURL'] = str_replace('persist/contribute', 'custom', $config->imageUploadURL) . $fileDAO->uri; - list($path) = CRM_Core_BAO_File::path($fileDAO->id, $entityId, NULL, NULL); + list($path) = CRM_Core_BAO_File::path($fileDAO->id, $entityId); if ($path && file_exists($path)) { list($imageWidth, $imageHeight) = getimagesize($path); list($imageThumbWidth, $imageThumbHeight) = CRM_Contact_BAO_Contact::getThumbSize($imageWidth, $imageHeight); diff --git a/CRM/Core/BAO/File.php b/CRM/Core/BAO/File.php index ccbc753272..6b09fff8b2 100644 --- a/CRM/Core/BAO/File.php +++ b/CRM/Core/BAO/File.php @@ -71,15 +71,11 @@ class CRM_Core_BAO_File extends CRM_Core_DAO_File { /** * @param int $fileID * @param int $entityID - * @param null $entityTable * * @return array */ - public static function path($fileID, $entityID, $entityTable = NULL) { + public static function path($fileID, $entityID) { $entityFileDAO = new CRM_Core_DAO_EntityFile(); - if ($entityTable) { - $entityFileDAO->entity_table = $entityTable; - } $entityFileDAO->entity_id = $entityID; $entityFileDAO->file_id = $fileID; diff --git a/CRM/Core/Page/File.php b/CRM/Core/Page/File.php index e2266039e7..c197f01cbc 100644 --- a/CRM/Core/Page/File.php +++ b/CRM/Core/Page/File.php @@ -50,9 +50,8 @@ class CRM_Core_Page_File extends CRM_Core_Page { $eid = CRM_Utils_Request::retrieve('eid', 'Positive', $this, TRUE); $fid = CRM_Utils_Request::retrieve('fid', 'Positive', $this, FALSE); $id = CRM_Utils_Request::retrieve('id', 'Positive', $this, TRUE); - $quest = CRM_Utils_Request::retrieve('quest', 'String', $this); - list($path, $mimeType) = CRM_Core_BAO_File::path($id, $eid, NULL, $quest); + list($path, $mimeType) = CRM_Core_BAO_File::path($id, $eid); } if (!$path) {