Remove unused file parameters
authoreileen <emcnaughton@wikimedia.org>
Mon, 14 Jan 2019 01:25:29 +0000 (14:25 +1300)
committerSeamus Lee <seamuslee001@gmail.com>
Fri, 22 Feb 2019 00:09:37 +0000 (11:09 +1100)
CRM/Core/BAO/CustomField.php
CRM/Core/BAO/CustomGroup.php
CRM/Core/BAO/File.php
CRM/Core/Page/File.php

index 8e08547b326f7eda789fed26ce63adc2d9c1185d..c6933779a3803e01895129d032feb3cca001004d 100644 (file)
@@ -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
index 84c46f02c68faef0b33cddf0c576b26b900aa726..b2a5cccf7b39d4a1efe8b25f31a68e30fbcb9158 100644 (file)
@@ -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);
index ccbc7532729783f2c36f8d73e1bdd5b1c19b75f7..6b09fff8b2bad98d5bc1c3c335cbce1b58df9dd4 100644 (file)
@@ -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;
 
index e2266039e77f896fa77fe0214d70c0159d90c3c5..c197f01cbc022c18e39189163b43905a1f213ed5 100644 (file)
@@ -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) {