Lines Matching full:page
13 use dokuwiki\Remote\Response\Page; alias
197 * This call allows to check the permissions for a given page/media and user/group combination.
203 * @param string $page A page or media ID
209 public function aclCheck($page, $user = '', $groups = []) argument
214 $page = $this->checkPage($page, 0, false, AUTH_NONE);
217 return auth_quickaclcheck($page);
227 return auth_aclcheck($page, $user, $groups);
244 * @param bool $hash Whether to include a MD5 hash of the page content
245 * @return Page[] A list of matching pages
272 return array_map(static fn($item) => new Page(
286 * This is uses the page index and is quicker than iterating which is done in listPages()
288 * @return Page[] A list of all pages
303 $page = new Page($pages[$idx], 0, 0, '', null, $perm);
304 if ($hash) $page->calculateHash();
306 $list[] = $page;
319 * or the page id depending on the wiki's configuration.
352 * Get recent page changes
387 * Get a wiki page's syntax
389 …* Returns the syntax of the given page. When no revision is given, the current revision is returne…
391 … * A non-existing page (or revision) will return an empty string usually. For the current revision
392 * a page template will be returned if configured.
394 * Read access is required for the page.
396 * @param string $page wiki page id
398 * @return string the syntax of the page
402 public function getPage($page, $rev = 0) argument
404 $page = $this->checkPage($page, $rev, false);
406 $text = rawWiki($page, $rev);
408 return pageTemplate($page);
415 * Return a wiki page rendered to HTML
417 …* The page is rendered to HTML as it would be in the wiki. The HTML consist only of the data for t…
422 * If the page does not exist, an error is returned.
425 * @param string $page page id
427 * @return string Rendered HTML for the page
431 public function getPageHTML($page, $rev = 0) argument
433 $page = $this->checkPage($page, $rev);
435 return (string)p_wiki_xhtml($page, $rev, false);
439 * Return some basic data about a page
441 * The call will return an error if the requested page does not exist.
443 * Read access is required for the page.
445 * @param string $page page id
448 * @param bool $hash whether to include the MD5 hash of the page content
449 * @return Page
453 public function getPageInfo($page, $rev = 0, $author = false, $hash = false) argument
455 $page = $this->checkPage($page, $rev);
457 $result = new Page($page, $rev);
465 * Returns a list of available revisions of a given wiki page
471 * @param string $page page id
478 public function getPageHistory($page, $first = 0) argument
482 $page = $this->checkPage($page, 0, false);
484 $pagelog = new PageChangeLog($page);
491 if (!page_exists($page, $rev)) continue; // skip non-existing revisions
495 $page,
509 * Get a page's links
511 …* This returns a list of links found in the given page. This includes internal, external and inter…
513 * If a link occurs multiple times on the page, it will be returned multiple times.
515 * Read access for the given page is needed and page has to exist.
517 * @param string $page page id
518 * @return Link[] A list of links found on the given page
526 public function getPageLinks($page) argument
528 $page = $this->checkPage($page);
530 // resolve page instructions
531 $ins = p_cached_instructions(wikiFN($page), false, $page);
558 * Get a page's backlinks
560 * A backlink is a wiki link on another page that links to the given page.
562 * Only links from pages readable by the current user are returned. The page itself
565 * @param string $page page id
566 * @return string[] A list of pages linking to the given page
570 public function getPageBackLinks($page) argument
572 $page = $this->checkPage($page, 0, false);
574 return ft_backlinks($page);
581 * successfully locked. If a page could not be locked, eg. because a different user is
582 * currently holding a lock, that page will be missing from the returned list.
588 * a lock for a page that does not exist, yet.
590 * Note: it is not necessary to lock a page before saving it. The `savePage()` call will
591 * automatically lock and unlock the page for you. However if you plan to do related
617 * successfully unlocked. If a page could not be unlocked, eg. because a different user is
618 * currently holding a lock, that page will be missing from the returned list.
645 * Save a wiki page
647 * Saves the given wiki text to the given page. If the page does not exist, it will be created.
648 * Just like in the wiki, saving an empty text will delete the page.
650 * You need write permissions for the given page and the page may not be locked by another user.
652 * @param string $page page id
657 * @throws AccessDeniedException no write access for page
658 * @throws RemoteException no id, empty new page or locked
661 public function savePage($page, $text, $summary = '', $isminor = false) argument
666 $page = $this->checkPage($page, 0, false, AUTH_EDIT);
670 if (!page_exists($page) && trim($TEXT) == '') {
671 throw new RemoteException('Refusing to write an empty new wiki page', 132);
674 // Check, if page is locked
675 if (checklock($page)) {
676 throw new RemoteException('The page is currently locked', 133);
681 throw new RemoteException('The page content was blocked', 134);
685 if (!page_exists($page) && empty($summary)) {
690 if (page_exists($page) && empty($TEXT) && empty($summary)) {
696 lock($page);
697 saveWikiText($page, $TEXT, $summary, $isminor);
698 unlock($page);
700 // run the indexer if page wasn't indexed yet
701 idx_addPage($page);
707 * Appends text to the end of a wiki page
709 * If the page does not exist, it will be created. If a page template for the non-existant
710 * page is configured, the given text will appended to that template.
712 * The call will create a new page revision.
714 * You need write permissions for the given page.
716 * @param string $page page id
724 public function appendPage($page, $text, $summary = '', $isminor = false) argument
726 $currentpage = $this->getPage($page);
730 return $this->savePage($page, $currentpage . $text, $summary, $isminor);
901 * @return string[] A list of pages linking to the given page
1076 * Convenience method for page checks
1080 * - clean the given page id
1081 * - disallow an empty page id
1082 * - check if the page exists (unless disabled)
1085 * @param string $id page id
1086 * @param int $rev page revision
1089 * @return string the cleaned page id
1097 throw new RemoteException('Empty or invalid page ID given', 131);
1101 throw new RemoteException('The requested page (revision) does not exist', 121);
1105 throw new AccessDeniedException('You are not allowed to read this page', 111);