Lines Matching full:if
37 if ($base == '' || $base == '/') {
43 if (!$dh) return;
45 if (preg_match('/^[\._]/', $file)) continue; //skip hidden files and upper dirs
46 if (is_dir($base . '/' . $dir . '/' . $file)) {
54 if (!empty($sort)) {
55 if ($sort == 'date') {
65 if (call_user_func_array($func, [&$data, $base, $dir, 'd', $lvl, $opts])) {
79 * decide if this directory should be traversed (true) or not (false)
177 * $opts['showmsg'] shows message if invalid media id is used
196 if ($type == 'd') {
197 if (empty($opts['depth'])) return true; // recurse forever
199 if ($depth >= $opts['depth']) return false; // depth reached
205 if ($info['id'] !== cleanID($info['id'])) {
206 if (!empty($opts['showmsg']))
213 if (empty($opts['skipacl']) && $info['perm'] < AUTH_READ) {
218 if (!empty($opts['pattern']) && !@preg_match($opts['pattern'], $info['id'])) {
226 if (preg_match("/\.(jpe?g|gif|png)$/", $file)) {
232 if (!empty($opts['hash'])) {
244 * $opts['showmsg'] shows message if invalid media id is used
264 if ($type == 'd') {
265 if (empty($opts['depth'])) return true; // recurse forever
267 if ($depth >= $opts['depth']) return false; // depth reached
272 if ($id != cleanID($id)) {
273 if ($opts['showmsg'])
280 if (empty($opts['skipacl']) && $info['perm'] < AUTH_READ) {
285 if (!empty($opts['pattern']) && !@preg_match($opts['pattern'], $id)) {
311 if ($type == 'd') return false;
313 if (str_ends_with($file, '.txt')) {
316 if (auth_quickaclcheck($id) < AUTH_READ) {
343 if ($type == 'd') return true;
345 if (!str_ends_with($file, '.txt')) return true;
348 if (!empty($opts['query'])) {
349 if (str_contains($file, (string) $opts['query'])) {
352 if (auth_quickaclcheck($id) < AUTH_READ) {
381 if (($opts['depth'] ?? 0) > 0) {
383 if (
392 if ($type == 'd') {
397 if (!str_ends_with($file, '.txt')) return true;
401 if (empty($opts['skipacl']) && auth_quickaclcheck($item['id']) < AUTH_READ) {
408 if (!empty($opts['hash'])) {
433 if ($a['count'] > $b['count']) {
457 if (!$keeptxt) $id = preg_replace('#\.txt$#', '', $id);
495 * @return bool if this directory should be traversed (true) or not (false)
505 // get ID and check if it is a valid one
507 if ($item['id'] !== cleanID($item['id'])) {
508 if (!empty($opts['showmsg'])) {
515 if ($type == 'd') {
516 // decide if to recursion into this directory is wanted
517 if (empty($opts['depth'])) {
521 if ($depth >= $opts['depth']) {
528 if ($return) {
530 if (!$match) {
537 if (empty($opts['skipacl'])) {
538 if ($type == 'd') {
548 if ($type == 'd') {
549 if (empty($opts['listdirs'])) return $return;
551 …if (empty($opts['skipacl']) && !empty($opts['sneakyacl']) && $item['perm'] < AUTH_READ) return fal…
552 …if (!empty($opts['dirmatch']) && !preg_match('/' . $opts['dirmatch'] . '/', $file)) return $return;
553 …if (!empty($opts['nsmatch']) && !preg_match('/' . $opts['nsmatch'] . '/', $item['ns'])) return $re…
555 if (empty($opts['listfiles'])) return $return;
556 if (empty($opts['skipacl']) && $item['perm'] < AUTH_READ) return $return;
557 if (!empty($opts['pagesonly']) && !str_ends_with($file, '.txt')) return $return;
558 if (empty($opts['showhidden']) && isHiddenPage($item['id'])) return $return;
559 …if (!empty($opts['filematch']) && !preg_match('/' . $opts['filematch'] . '/', $file)) return $retu…
560 …if (!empty($opts['idmatch']) && !preg_match('/' . $opts['idmatch'] . '/', $item['id'])) return $re…
568 if (!empty($opts['meta'])) {
577 if ($type == 'f') {
578 if (!empty($opts['hash'])) $item['hash'] = md5(io_readFile($base . '/' . $file, false));
579 if (!empty($opts['firsthead'])) {