Prev |  | Next

## 2.5. File storage

### 2.5.1. file_purge_stale

This hook can be used to feed the file storage API function phorum_api_file_purge_stale() extra stale files. This can be useful for modules that handle their own files, using a custom link type.

Call time:

Right after Phorum created its own list of stale files.

Hook input:

An array containing stale files, indexed by file_id. Each item in this array is an array on its own, containing the following fields:

- file_id: the file id of the stale file
- filename: the name of the stale file
- filesize: the size of the file in bytes
- add_datetime: the time (epoch) at which the file was added
- reason: the reason why it's a stale file

Hook output:

The same array as the one that was used for the hook call argument, possibly extended with extra files that are considered to be stale.

Prev | Up | Next
| Home |