Lines Matching defs:media
136 * Check for media for preconditions and return correct status code
143 * @param string $media reference to the media id
150 function checkFileStatus(&$media, &$file, $rev = '', $width = 0, $height = 0)
154 //media to local file
155 if (media_isexternal($media)) {
157 if (media_get_token($media, $width, $height) !== $INPUT->str('tok')) {
161 if (str_starts_with($MIME, 'image/')) $file = media_get_from_URL($media, $EXT, $CACHE);
164 return [302, $media];
167 $media = cleanID($media);
168 if (empty($media)) {
172 if (($width || $height) && media_get_token($media, $width, $height) !== $INPUT->str('tok')) {
177 if (auth_quickaclcheck(getNS($media) . ':X') < AUTH_READ) {
180 $file = mediaFN($media, $rev);