X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FBAO%2FNote.php;h=2e27bdacc2598f13115041ecc3f43a4961572e7a;hb=9cf114763cb57be5c55741cc6741c6d6281eb162;hp=091afa1c0c1fa0bf58d6b49b64a9dd80668afc27;hpb=8d8705843bd85a0e25279f50325ae5fab5ec1d16;p=civicrm-core.git diff --git a/CRM/Core/BAO/Note.php b/CRM/Core/BAO/Note.php index 091afa1c0c..2e27bdacc2 100644 --- a/CRM/Core/BAO/Note.php +++ b/CRM/Core/BAO/Note.php @@ -237,11 +237,11 @@ class CRM_Core_BAO_Note extends CRM_Core_DAO_Note { * Given the list of params in the params array, fetch the object * and store the values in the values array * - * @param array $params input parameters to find object - * @param array $values output values of the object - * @param array $ids the array that holds all the db ids - * @param int $numNotes the maximum number of notes to return (0 if all) + * @param array $params input parameters to find object + * @param array $values output values of the object + * @param int $numNotes the maximum number of notes to return (0 if all) * + * @internal param array $ids the array that holds all the db ids * @return object $notes Object of CRM_Core_BAO_Note * @access public * @static @@ -282,12 +282,10 @@ class CRM_Core_BAO_Note extends CRM_Core_DAO_Note { /** * Function to delete the notes * - * @param int $id note id + * @param int $id note id * @param boolean $showStatus do we need to set status or not * - * @return $return no of deleted notes on success, false otherwise - * - * @access public + * @return mixed|null $return no of deleted notes on success, false otherwise@access public * @static */ static function del($id, $showStatus = TRUE) { @@ -356,7 +354,9 @@ class CRM_Core_BAO_Note extends CRM_Core_DAO_Note { /** * retrieve all records for this entity-id * - * @param int $id ID of the relationship for which records needs to be retrieved. + * @param int $id ID of the relationship for which records needs to be retrieved. + * + * @param string $entityTable * * @return array $viewNote array of note properties * @@ -388,7 +388,9 @@ ORDER BY modified_date desc"; /** * Function to get log record count for a Contact * - * @param int $contactId Contact ID + * @param $contactID + * + * @internal param int $contactId Contact ID * * @return int $count count of log records * @@ -461,8 +463,7 @@ ORDER BY modified_date desc"; * @return array Nested associative array beginning with direct children of given note. * @static */ - private static function buildNoteTree($parentId, $maxDepth = 0, $snippet = FALSE, &$tree = array( - ), $depth = 0) { + private static function buildNoteTree($parentId, $maxDepth = 0, $snippet = FALSE, &$tree = array(), $depth = 0) { if ($maxDepth && $depth > $maxDepth) { return false; } @@ -490,7 +491,7 @@ ORDER BY modified_date desc"; // paper icon view for attachments part $paperIconAttachmentInfo = CRM_Core_BAO_File::paperIconAttachment('civicrm_note', $note->id); - $tree[$note->id]['attachment'] = implode('', $paperIconAttachmentInfo); + $tree[$note->id]['attachment'] = $paperIconAttachmentInfo ? implode('', $paperIconAttachmentInfo) : ''; if ($snippet) { $tree[$note->id]['note'] = nl2br($tree[$note->id]['note']); @@ -542,7 +543,8 @@ ORDER BY modified_date desc"; * function to delete all note related to contact when contact is deleted * * @param int $contactID contact id whose notes to be deleted - * @param array $deleteNoteID to store all deleted note ids + * + * @internal param array $deleteNoteID to store all deleted note ids * * @return void * @static