Lines Matching defs:rev
280 * @param string|int $rev empty or revision timestamp
285 function page_exists($id, $rev = '', $clean = true, $date_at = false)
289 if ($rev !== '' && $date_at) {
291 $pagelog_rev = $pagelog->getLastRevisionAt($rev);
293 $rev = $pagelog_rev;
295 return file_exists(wikiFN($id, $rev, $clean));
302 * @param string|int $rev empty or revision timestamp
307 function media_exists($id, $rev = '', $clean = true, $date_at = false)
309 if ($rev !== '' && $date_at) {
311 $changelog_rev = $changeLog->getLastRevisionAt($rev);
313 $rev = $changelog_rev;
316 return file_exists(mediaFN($id, $rev, $clean));
325 * @param $rev int|string page revision, empty string for current
332 function wikiFN($raw_id, $rev = '', $clean = true)
344 if (isset($cache[$id]) && isset($cache[$id][$rev])) {
345 return $cache[$id][$rev];
348 if (empty($rev)) {
351 $fn = $conf['olddir'] . '/' . utf8_encodeFN($id) . '.' . $rev . '.txt';
368 $cache[$id][$rev] = $fn;
451 * @param string|int $rev empty string or revision timestamp
456 function mediaFN($id, $rev = '', $clean = true)
461 if (empty($rev)) {
466 $fn = $conf['mediaolddir'] . '/' . utf8_encodeFN($name . '.' . ( (int) $rev ) . '.' . $ext[0]);
558 * @param int|string $rev
562 function resolve_mediaid($ns, &$media, &$exists, $rev = '', $date_at = false)
566 $media = $resolver->resolveId($media, $rev, $date_at);
567 $exists = media_exists($media, $rev, false, $date_at);
577 * @param string $rev
580 function resolve_pageid($ns, &$page, &$exists, $rev = '', $date_at = false)
592 $page = $resolver->resolveId($page, $rev, $date_at);
593 $exists = page_exists($page, $rev, false, $date_at);