Lines Matching +full:rev +full:- +full:parse

39             'core.getAPIVersion' => (new ApiCall($this->getAPIVersion(...), 'info'))->setPublic(),
42 'core.getWikiTitle' => (new ApiCall($this->getWikiTitle(...), 'info'))->setPublic(),
43 'core.getWikiTime' => (new ApiCall($this->getWikiTime(...), 'info')),
45 'core.login' => (new ApiCall($this->login(...), 'user'))->setPublic(),
46 'core.logoff' => new ApiCall($this->logoff(...), 'user'),
47 'core.whoAmI' => (new ApiCall($this->whoAmI(...), 'user')),
48 'core.aclCheck' => new ApiCall($this->aclCheck(...), 'user'),
50 'core.listPages' => new ApiCall($this->listPages(...), 'pages'),
51 'core.searchPages' => new ApiCall($this->searchPages(...), 'pages'),
52 'core.getRecentPageChanges' => new ApiCall($this->getRecentPageChanges(...), 'pages'),
54 'core.getPage' => (new ApiCall($this->getPage(...), 'pages')),
55 'core.getPageHTML' => (new ApiCall($this->getPageHTML(...), 'pages')),
56 'core.getPageInfo' => (new ApiCall($this->getPageInfo(...), 'pages')),
57 'core.getPageHistory' => new ApiCall($this->getPageHistory(...), 'pages'),
58 'core.getPageLinks' => new ApiCall($this->getPageLinks(...), 'pages'),
59 'core.getPageBackLinks' => new ApiCall($this->getPageBackLinks(...), 'pages'),
61 'core.lockPages' => new ApiCall($this->lockPages(...), 'pages'),
62 'core.unlockPages' => new ApiCall($this->unlockPages(...), 'pages'),
63 'core.savePage' => new ApiCall($this->savePage(...), 'pages'),
64 'core.appendPage' => new ApiCall($this->appendPage(...), 'pages'),
66 'core.listMedia' => new ApiCall($this->listMedia(...), 'media'),
67 'core.getRecentMediaChanges' => new ApiCall($this->getRecentMediaChanges(...), 'media'),
69 'core.getMedia' => new ApiCall($this->getMedia(...), 'media'),
70 'core.getMediaInfo' => new ApiCall($this->getMediaInfo(...), 'media'),
71 'core.getMediaUsage' => new ApiCall($this->getMediaUsage(...), 'media'),
72 'core.getMediaHistory' => new ApiCall($this->getMediaHistory(...), 'media'),
74 'core.saveMedia' => new ApiCall($this->saveMedia(...), 'media'),
75 'core.deleteMedia' => new ApiCall($this->deleteMedia(...), 'media'),
110 * Returns a Unix timestamp (seconds since 1970-01-01 00:00:00 UTC).
149 if ($auth->canDo('external')) {
150 $ok = $auth->trustExternal($user, $pass, false);
217 $page = $this->checkPage($page, 0, false, AUTH_NONE);
223 $userinfo = $auth->getUserData($user);
259 return $this->getAllPages($hash);
297 $pages = (new Indexer())->getAllPages();
307 if ($hash) $page->calculateHash();
332 $data = $FulltextSearch->pageSearch($query, $regex);
338 if ($idx < $FulltextSearch->getMaxSnippets()) {
339 $snippet = $FulltextSearch->snippet($id, $regex);
368 * @author Michael Hamann <michael@content-space.de>
395 … * A non-existing page (or revision) will return an empty string usually. For the current revision
401 * @param int $rev Revision timestamp to access an older revision
406 public function getPage($page, $rev = 0) argument
408 $page = $this->checkPage($page, $rev, false);
410 $text = rawWiki($page, $rev);
411 if (!$text && !$rev) {
430 * @param int $rev revision timestamp
435 public function getPageHTML($page, $rev = 0) argument
437 $page = $this->checkPage($page, $rev);
439 return (string)p_wiki_xhtml($page, $rev, false);
450 * @param int $rev revision timestamp
457 public function getPageInfo($page, $rev = 0, $author = false, $hash = false) argument
459 $page = $this->checkPage($page, $rev);
461 $result = new Page($page, $rev);
462 if ($author) $result->retrieveAuthor();
463 if ($hash) $result->calculateHash();
486 $page = $this->checkPage($page, 0, false);
489 $pagelog->setChunkSize(1024);
491 $revisions = $pagelog->getRevisions($first - 1, $conf['recent']);
494 foreach ($revisions as $rev) {
495 if (!page_exists($page, $rev)) continue; // skip non-existing revisions
496 $info = $pagelog->getRevisionInfo($rev);
500 $rev,
532 $page = $this->checkPage($page);
537 // instantiate new Renderer - needed for interwiki links
539 $Renderer->interwiki = getInterwiki();
541 // parse instructions
552 $url = $Renderer->_resolveInterWiki($in[1][2], $in[1][3]);
576 $page = $this->checkPage($page, 0, false);
577 return (new MetadataSearch())->backlinks($page);
669 $page = $this->checkPage($page, 0, false, AUTH_EDIT);
705 (new Indexer())->addPage($page);
707 // indexing failure is non-fatal, the page was saved successfully
716 * If the page does not exist, it will be created. If a page template for the non-existant
733 $currentpage = $this->getPage($page);
737 return $this->savePage($page, $currentpage . $text, $summary, $isminor);
801 * @author Michael Hamann <michael@content-space.de>
831 * @param int $rev revision timestamp
838 public function getMedia($media, $rev = 0) argument
846 if ($this->isCurrentMediaRev($media, $rev)) {
847 $rev = 0;
850 $file = mediaFN($media, $rev);
867 * @param int $rev revision timestamp
875 public function getMediaInfo($media, $rev = 0, $author = false, $hash = false) argument
883 if ($this->isCurrentMediaRev($media, $rev)) {
884 $rev = 0;
887 if (!media_exists($media, $rev)) {
891 $info = new Media($media, $rev);
892 if ($hash) $info->calculateHash();
893 if ($author) $info->retrieveAuthor();
922 return (new MetadataSearch())->mediause($media);
955 $medialog->setChunkSize(1024);
957 $revisions = $medialog->getRevisions($first - 1, $conf['recent']);
960 foreach ($revisions as $rev) {
962 $check = $this->isCurrentMediaRev($media, $rev) ? '' : $rev;
963 if (!media_exists($media, $check)) continue; // skip non-existing revisions
965 $info = $medialog->getRevisionInfo($rev);
969 $rev,
1007 '-' => '+', // RFC4648 base64url
1069 * @param int $rev
1072 protected function isCurrentMediaRev(string $id, int $rev) argument
1075 if ($current === $rev) return true;
1087 * - clean the given page id
1088 * - disallow an empty page id
1089 * - check if the page exists (unless disabled)
1090 * - check if the user has the required access level (pass AUTH_NONE to skip)
1093 * @param int $rev page revision
1100 private function checkPage($id, $rev = 0, $existCheck = true, $minAccess = AUTH_READ) argument
1107 if ($existCheck && !page_exists($id, $rev)) {