Lines Matching full:page
13 use dokuwiki\Remote\Response\Page; alias
201 * This call allows to check the permissions for a given page/media and user/group combination.
209 * @param string $page A page or media ID
216 public function aclCheck($page, $user = '', $groups = []) argument
221 $page = $this->checkPage($page, 0, false, AUTH_NONE);
224 return auth_quickaclcheck($page);
238 return auth_aclcheck($page, $user, $groups);
279 * @param bool $hash Whether to include a MD5 hash of the page content
280 * @return Page[] A list of matching pages
307 return array_map(static fn($item) => new Page(
321 * This is uses the page index and is quicker than iterating which is done in listPages()
323 * @return Page[] A list of all pages
338 $page = new Page($pages[$idx], 0, 0, '', null, $perm);
339 if ($hash) $page->calculateHash();
341 $list[] = $page;
354 * or the page id depending on the wiki's configuration.
388 * Get recent page changes
423 * Get a wiki page's syntax
425 …* Returns the syntax of the given page. When no revision is given, the current revision is returne…
427 … * A non-existing page (or revision) will return an empty string usually. For the current revision
428 * a page template will be returned if configured.
430 * Read access is required for the page.
432 * @param string $page wiki page id
434 * @return string the syntax of the page
438 public function getPage($page, $rev = 0) argument
440 $page = $this->checkPage($page, $rev, false);
442 $text = rawWiki($page, $rev);
444 return pageTemplate($page);
451 * Return a wiki page rendered to HTML
453 …* The page is rendered to HTML as it would be in the wiki. The HTML consist only of the data for t…
458 * If the page does not exist, an error is returned.
461 * @param string $page page id
463 * @return string Rendered HTML for the page
467 public function getPageHTML($page, $rev = 0) argument
469 $page = $this->checkPage($page, $rev);
471 return (string)p_wiki_xhtml($page, $rev, false);
475 * Return some basic data about a page
477 * The call will return an error if the requested page does not exist.
479 * Read access is required for the page.
481 * @param string $page page id
484 * @param bool $hash whether to include the MD5 hash of the page content
485 * @return Page
489 public function getPageInfo($page, $rev = 0, $author = false, $hash = false) argument
491 $page = $this->checkPage($page, $rev);
493 $result = new Page($page, $rev);
501 * Returns a list of available revisions of a given wiki page
507 * @param string $page page id
514 public function getPageHistory($page, $first = 0) argument
518 $page = $this->checkPage($page, 0, false);
520 $pagelog = new PageChangeLog($page);
527 if (!page_exists($page, $rev)) continue; // skip non-existing revisions
531 $page,
545 * Get a page's links
547 …* This returns a list of links found in the given page. This includes internal, external and inter…
549 * If a link occurs multiple times on the page, it will be returned multiple times.
551 * Read access for the given page is needed and page has to exist.
553 * @param string $page page id
554 * @return Link[] A list of links found on the given page
562 public function getPageLinks($page) argument
564 $page = $this->checkPage($page);
566 // resolve page instructions
567 $ins = p_cached_instructions(wikiFN($page), false, $page);
594 * Get a page's backlinks
596 * A backlink is a wiki link on another page that links to the given page.
598 * Only links from pages readable by the current user are returned. The page itself
601 * @param string $page page id
602 * @return string[] A list of pages linking to the given page
606 public function getPageBackLinks($page) argument
608 $page = $this->checkPage($page, 0, false);
609 return (new MetadataSearch())->backlinks($page);
616 * successfully locked. If a page could not be locked, eg. because a different user is
617 * currently holding a lock, that page will be missing from the returned list.
623 * a lock for a page that does not exist, yet.
625 * Note: it is not necessary to lock a page before saving it. The `savePage()` call will
626 * automatically lock and unlock the page for you. However if you plan to do related
652 * successfully unlocked. If a page could not be unlocked, eg. because a different user is
653 * currently holding a lock, that page will be missing from the returned list.
680 * Save a wiki page
682 * Saves the given wiki text to the given page. If the page does not exist, it will be created.
683 * Just like in the wiki, saving an empty text will delete the page.
685 * You need write permissions for the given page and the page may not be locked by another user.
687 * @param string $page page id
692 * @throws AccessDeniedException no write access for page
693 * @throws RemoteException no id, empty new page or locked
696 public function savePage($page, $text, $summary = '', $isminor = false) argument
701 $page = $this->checkPage($page, 0, false, AUTH_EDIT);
705 if (!page_exists($page) && trim($TEXT) == '') {
706 throw new RemoteException('Refusing to write an empty new wiki page', 132);
709 // Check, if page is locked
710 if (checklock($page)) {
711 throw new RemoteException('The page is currently locked', 133);
716 throw new RemoteException('The page content was blocked', 134);
720 if (!page_exists($page) && empty($summary)) {
725 if (page_exists($page) && empty($TEXT) && empty($summary)) {
731 lock($page);
732 saveWikiText($page, $TEXT, $summary, $isminor);
733 unlock($page);
735 // run the indexer if page wasn't indexed yet
737 (new Indexer())->addPage($page);
739 // indexing failure is non-fatal, the page was saved successfully
746 * Appends text to the end of a wiki page
748 * If the page does not exist, it will be created. If a page template for the non-existant
749 * page is configured, the given text will appended to that template.
751 * The call will create a new page revision.
753 * You need write permissions for the given page.
755 * @param string $page page id
763 public function appendPage($page, $text, $summary = '', $isminor = false) argument
765 $currentpage = $this->getPage($page);
769 return $this->savePage($page, $currentpage . $text, $summary, $isminor);
940 * @return string[] A list of pages linking to the given page
1115 * Convenience method for page checks
1119 * - clean the given page id
1120 * - disallow an empty page id
1121 * - check if the page exists (unless disabled)
1124 * @param string $id page id
1125 * @param int $rev page revision
1128 * @return string the cleaned page id
1136 throw new RemoteException('Empty or invalid page ID given', 131);
1140 throw new RemoteException('The requested page (revision) does not exist', 121);
1144 throw new AccessDeniedException('You are not allowed to read this page', 111);