/** * Retrieve a list of files for a message (a.k.a. attachments). * * @param integer $message_id * The message id for which to retrieve the file list. * * @return array * An array of message files, indexed by file_id. * The array elements are arrays containing the fields: * file_id, filename, filesize and add_datetime. */ function phorum_db_get_message_file_list($message_id) { return phorum_db_get_file_list(PHORUM_LINK_MESSAGE, NULL, $message_id); }
/** * Retrieve a list of files. * * @param string $link_type * The type of link to retrieve from the database. Normally this is one * of the Phorum built-in link types, but it can also be a custom * link type (e.g. if a module uses the file storage on its own). * This parameter can be NULL to retrieve any link type. * * @param integer $user_id * The user_id to retrieve files for or NULL to retrieve files for * any user_id. * * @param integer $message_id * The message_id to retrieve files for or NULL to retrieve files for * any message_id. * * @return array * An array of files, indexed by file_id. * The array elements are arrays containing the fields: * file_id, filename, filesize and add_datetime. */ function phorum_api_file_list($link_type = NULL, $user_id = NULL, $message_id = NULL) { return phorum_db_get_file_list($link_type, $user_id, $message_id); }