Merge pull request #4962 from totten/master-angular-ts
[civicrm-core.git] / CRM / Core / BAO / File.php
index 14121a1807200e9623bb9554975356087777bed3..064fa7b263c8f4da40328adc5af04ad70663990e 100644 (file)
@@ -23,7 +23,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
@@ -85,7 +85,7 @@ class CRM_Core_BAO_File extends CRM_Core_DAO_File {
    *
    * @throws Exception
    */
-  static function filePostProcess(
+  public static function filePostProcess(
     $data,
     $fileTypeID,
     $entityTable,
@@ -472,7 +472,6 @@ AND       CEF.entity_id    = %2";
    *
    * @return array
    *   An array with 2 elements. The string and the number of attachments
-   * @static
    */
   public static function attachmentInfo($entityTable, $entityID, $separator = '<br />') {
     if (!$entityID) {
@@ -496,7 +495,7 @@ AND       CEF.entity_id    = %2";
    * @param $entityTable
    * @param int $entityID
    */
-  static function formatAttachment(
+  public static function formatAttachment(
     &$formValues,
     &$params,
     $entityTable,
@@ -586,11 +585,10 @@ AND       CEF.entity_id    = %2";
     return $names;
   }
 
-  /*
+  /**
    * copy/attach an existing file to a different entity
    * table and id.
-   */
-  /**
+   *
    * @param $oldEntityTable
    * @param int $oldEntityId
    * @param $newEntityTable
@@ -631,7 +629,6 @@ AND       CEF.entity_id    = %2";
   /**
    * Delete a file attachment from an entity table / entity ID
    *
-   * @static
    */
   public static function deleteAttachment() {
     $params = array();
@@ -659,9 +656,9 @@ AND       CEF.entity_id    = %2";
    * @param int $entityID
    *   The id of the object in the above entityTable.
    *
-   * @return array|NULL          list of HTML snippets; one HTML snippet for each attachment. If none found, then NULL
+   * @return array|NULL
+   *   list of HTML snippets; one HTML snippet for each attachment. If none found, then NULL
    *
-   * @static
    */
   public static function paperIconAttachment($entityTable, $entityID) {
     if (empty($entityTable) || !$entityID) {
@@ -672,7 +669,6 @@ AND       CEF.entity_id    = %2";
     foreach ($currentAttachmentInfo as $fileKey => $fileValue) {
       $fileID = $fileValue['fileID'];
       $fileType = $fileValue['mime_type'];
-      $eid = $entityID;
       if ($fileID) {
         if ($fileType == 'image/jpeg' ||
           $fileType == 'image/pjpeg' ||
@@ -720,4 +716,5 @@ AND       CEF.entity_id    = %2";
     }
     return NULL;
   }
+
 }