Lines Matching defs:auth
64 * @param int $auth permission level
68 function media_metasave($id, $auth, $data)
70 if ($auth < AUTH_UPLOAD) return false;
149 * @param int $auth permission level
152 function media_metaform($id, $auth)
156 if ($auth < AUTH_UPLOAD) {
251 * @param int $auth no longer used
258 function media_delete($id, $auth)
261 $auth = auth_quickaclcheck(ltrim(getNS($id) . ':*', ':'));
262 if ($auth < AUTH_DELETE) return DOKU_MEDIA_NOT_AUTH;
306 * @param int $auth current auth check result
309 function media_upload_xhr($ns, $auth)
332 $auth,
351 * @param int $auth current auth check result
355 function media_upload($ns, $auth, $file = false)
389 $auth,
436 * @param int $auth permission level
440 function media_save($file, $id, $ow, $auth, $move)
442 if ($auth < AUTH_UPLOAD) {
478 if ($overwrite && (!$ow || $auth < $auth_ow)) {
704 * @param null|int $auth permission level
709 function media_filelist($ns, $auth = null, $jump = '', $fullscreenview = false, $sort = false)
715 // check auth our self if not given (needed for ajax calls)
716 if (is_null($auth)) $auth = auth_quickaclcheck("$ns:*");
720 if ($auth < AUTH_READ) {
725 media_uploadform($ns, $auth);
749 //FIXME old call: media_printfile($item,$auth,$jump);
754 //FIXME old call: media_printfile_thumbs($item,$auth,$jump);
939 * @param null|int $auth permission level
942 function media_tab_files($ns, $auth = null, $jump = '')
945 if (is_null($auth)) $auth = auth_quickaclcheck("$ns:*");
947 if ($auth < AUTH_READ) {
950 media_filelist($ns, $auth, $jump, true, _media_get_sort_type());
960 * @param null|int $auth permission level
963 function media_tab_upload($ns, $auth = null, $jump = '')
966 if (is_null($auth)) $auth = auth_quickaclcheck("$ns:*");
969 if ($auth >= AUTH_UPLOAD) {
972 media_uploadform($ns, $auth, true);
982 * @param null|int $auth permission level
984 function media_tab_search($ns, $auth = null)
994 media_searchlist($query, $ns, $auth, true, _media_get_sort_type());
1006 * @param null|int $auth permission level
1009 function media_tab_view($image, $ns, $auth = null, $rev = '')
1012 if (is_null($auth)) $auth = auth_quickaclcheck("$ns:*");
1014 if ($image && $auth >= AUTH_READ) {
1016 media_preview($image, $auth, $rev, $meta);
1017 media_preview_buttons($image, $auth, $rev);
1018 media_details($image, $auth, $rev, $meta);
1031 * @param null|int $auth permission level
1033 function media_tab_edit($image, $ns, $auth = null)
1035 if (is_null($auth)) $auth = auth_quickaclcheck("$ns:*");
1039 if ($mime == 'image/jpeg') media_metaform($image, $auth);
1050 * @param null|int $auth permission level
1052 function media_tab_history($image, $ns, $auth = null)
1057 if (is_null($auth)) $auth = auth_quickaclcheck("$ns:*");
1060 if ($auth >= AUTH_READ && $image) {
1062 (new MediaDiff($image))->show(); //media_diff($image, $ns, $auth);
1076 * @param int $auth permission level
1082 function media_preview($image, $auth, $rev = '', $meta = false)
1117 * @param int $auth permission level
1120 function media_preview_buttons($image, $auth, $rev = '')
1126 if ($auth >= AUTH_DELETE && !$rev && file_exists(mediaFN($image))) {
1141 if ($auth >= $auth_ow && !$rev) {
1155 if ($auth >= AUTH_UPLOAD && $rev && $conf['mediarevisions'] && file_exists(mediaFN($image, $rev))) {
1259 * @param int $auth permission level
1263 function media_details($image, $auth, $rev = '', $meta = false)
1301 * @param int $auth permission level
1306 function media_diff($image, $ns, $auth, $fromajax = false)
1332 * @param int $auth permission level
1336 function media_file_diff($image, $l_rev, $r_rev, $ns, $auth, $fromajax)
1365 * @param int $auth
1370 function media_restore($image, $rev, $auth)
1373 if ($auth < AUTH_UPLOAD || !$conf['mediarevisions']) return false;
1403 * @param null|int $auth
1407 function media_searchlist($query, $ns, $auth = null, $fullscreen = false, $sort = 'natural')
1537 * @param int $auth permission level
1540 function media_uploadform($ns, $auth, $fullscreen = false)
1546 if ($auth < AUTH_UPLOAD) {
1554 if ($auth >= $auth_ow && $fullscreen && $INPUT->str('mediado') == 'update') {
1578 if ($auth >= $auth_ow) {