Lines Matching +full:rev +full:- +full:parse
36 'core.getAPIVersion' => (new ApiCall([$this, 'getAPIVersion'], 'info'))->setPublic(),
39 'core.getWikiTitle' => (new ApiCall([$this, 'getWikiTitle'], 'info'))->setPublic(),
42 'core.login' => (new ApiCall([$this, 'login'], 'user'))->setPublic(),
107 * Returns a Unix timestamp (seconds since 1970-01-01 00:00:00 UTC).
146 if ($auth->canDo('external')) {
147 $ok = $auth->trustExternal($user, $pass, false);
214 $page = $this->checkPage($page, 0, false, AUTH_NONE);
220 $userinfo = $auth->getUserData($user);
256 return $this->getAllPages($hash);
294 $pages = idx_get_indexer()->getPages();
304 if ($hash) $page->calculateHash();
364 * @author Michael Hamann <michael@content-space.de>
391 … * A non-existing page (or revision) will return an empty string usually. For the current revision
397 * @param int $rev Revision timestamp to access an older revision
402 public function getPage($page, $rev = 0) argument
404 $page = $this->checkPage($page, $rev, false);
406 $text = rawWiki($page, $rev);
407 if (!$text && !$rev) {
426 * @param int $rev revision timestamp
431 public function getPageHTML($page, $rev = 0) argument
433 $page = $this->checkPage($page, $rev);
435 return (string)p_wiki_xhtml($page, $rev, false);
446 * @param int $rev revision timestamp
453 public function getPageInfo($page, $rev = 0, $author = false, $hash = false) argument
455 $page = $this->checkPage($page, $rev);
457 $result = new Page($page, $rev);
458 if ($author) $result->retrieveAuthor();
459 if ($hash) $result->calculateHash();
482 $page = $this->checkPage($page, 0, false);
485 $pagelog->setChunkSize(1024);
487 $revisions = $pagelog->getRevisions($first - 1, $conf['recent']);
490 foreach ($revisions as $rev) {
491 if (!page_exists($page, $rev)) continue; // skip non-existing revisions
492 $info = $pagelog->getRevisionInfo($rev);
496 $rev,
528 $page = $this->checkPage($page);
533 // instantiate new Renderer - needed for interwiki links
535 $Renderer->interwiki = getInterwiki();
537 // parse instructions
548 $url = $Renderer->_resolveInterWiki($in[1][2], $in[1][3]);
572 $page = $this->checkPage($page, 0, false);
666 $page = $this->checkPage($page, 0, false, AUTH_EDIT);
709 * If the page does not exist, it will be created. If a page template for the non-existant
726 $currentpage = $this->getPage($page);
730 return $this->savePage($page, $currentpage . $text, $summary, $isminor);
794 * @author Michael Hamann <michael@content-space.de>
824 * @param int $rev revision timestamp
831 public function getMedia($media, $rev = 0) argument
839 if ($this->isCurrentMediaRev($media, $rev)) {
840 $rev = 0;
843 $file = mediaFN($media, $rev);
860 * @param int $rev revision timestamp
868 public function getMediaInfo($media, $rev = 0, $author = false, $hash = false) argument
876 if ($this->isCurrentMediaRev($media, $rev)) {
877 $rev = 0;
880 if (!media_exists($media, $rev)) {
884 $info = new Media($media, $rev);
885 if ($hash) $info->calculateHash();
886 if ($author) $info->retrieveAuthor();
948 $medialog->setChunkSize(1024);
950 $revisions = $medialog->getRevisions($first - 1, $conf['recent']);
953 foreach ($revisions as $rev) {
955 $check = $this->isCurrentMediaRev($media, $rev) ? '' : $rev;
956 if (!media_exists($media, $check)) continue; // skip non-existing revisions
958 $info = $medialog->getRevisionInfo($rev);
962 $rev,
1000 '-' => '+', // RFC4648 base64url
1062 * @param int $rev
1065 protected function isCurrentMediaRev(string $id, int $rev) argument
1068 if ($current === $rev) return true;
1080 * - clean the given page id
1081 * - disallow an empty page id
1082 * - check if the page exists (unless disabled)
1083 * - check if the user has the required access level (pass AUTH_NONE to skip)
1086 * @param int $rev page revision
1093 private function checkPage($id, $rev = 0, $existCheck = true, $minAccess = AUTH_READ) argument
1100 if ($existCheck && !page_exists($id, $rev)) {