Lines Matching full:page

13 use dokuwiki\Remote\Response\Page;  alias
200 * This call allows to check the permissions for a given page/media and user/group combination.
206 * @param string $page A page or media ID
212 public function aclCheck($page, $user = '', $groups = []) argument
217 $page = $this->checkPage($page, 0, false, AUTH_NONE);
220 return auth_quickaclcheck($page);
230 return auth_aclcheck($page, $user, $groups);
247 * @param bool $hash Whether to include a MD5 hash of the page content
248 * @return Page[] A list of matching pages
275 return array_map(static fn($item) => new Page(
289 * This is uses the page index and is quicker than iterating which is done in listPages()
291 * @return Page[] A list of all pages
306 $page = new Page($pages[$idx], 0, 0, '', null, $perm);
307 if ($hash) $page->calculateHash();
309 $list[] = $page;
322 * or the page id depending on the wiki's configuration.
356 * Get recent page changes
391 * Get a wiki page's syntax
393 …* Returns the syntax of the given page. When no revision is given, the current revision is returne…
395 … * A non-existing page (or revision) will return an empty string usually. For the current revision
396 * a page template will be returned if configured.
398 * Read access is required for the page.
400 * @param string $page wiki page id
402 * @return string the syntax of the page
406 public function getPage($page, $rev = 0) argument
408 $page = $this->checkPage($page, $rev, false);
410 $text = rawWiki($page, $rev);
412 return pageTemplate($page);
419 * Return a wiki page rendered to HTML
421 …* The page is rendered to HTML as it would be in the wiki. The HTML consist only of the data for t…
426 * If the page does not exist, an error is returned.
429 * @param string $page page id
431 * @return string Rendered HTML for the page
435 public function getPageHTML($page, $rev = 0) argument
437 $page = $this->checkPage($page, $rev);
439 return (string)p_wiki_xhtml($page, $rev, false);
443 * Return some basic data about a page
445 * The call will return an error if the requested page does not exist.
447 * Read access is required for the page.
449 * @param string $page page id
452 * @param bool $hash whether to include the MD5 hash of the page content
453 * @return Page
457 public function getPageInfo($page, $rev = 0, $author = false, $hash = false) argument
459 $page = $this->checkPage($page, $rev);
461 $result = new Page($page, $rev);
469 * Returns a list of available revisions of a given wiki page
475 * @param string $page page id
482 public function getPageHistory($page, $first = 0) argument
486 $page = $this->checkPage($page, 0, false);
488 $pagelog = new PageChangeLog($page);
495 if (!page_exists($page, $rev)) continue; // skip non-existing revisions
499 $page,
513 * Get a page's links
515 …* This returns a list of links found in the given page. This includes internal, external and inter…
517 * If a link occurs multiple times on the page, it will be returned multiple times.
519 * Read access for the given page is needed and page has to exist.
521 * @param string $page page id
522 * @return Link[] A list of links found on the given page
530 public function getPageLinks($page) argument
532 $page = $this->checkPage($page);
534 // resolve page instructions
535 $ins = p_cached_instructions(wikiFN($page), false, $page);
562 * Get a page's backlinks
564 * A backlink is a wiki link on another page that links to the given page.
566 * Only links from pages readable by the current user are returned. The page itself
569 * @param string $page page id
570 * @return string[] A list of pages linking to the given page
574 public function getPageBackLinks($page) argument
576 $page = $this->checkPage($page, 0, false);
577 return (new MetadataSearch())->backlinks($page);
584 * successfully locked. If a page could not be locked, eg. because a different user is
585 * currently holding a lock, that page will be missing from the returned list.
591 * a lock for a page that does not exist, yet.
593 * Note: it is not necessary to lock a page before saving it. The `savePage()` call will
594 * automatically lock and unlock the page for you. However if you plan to do related
620 * successfully unlocked. If a page could not be unlocked, eg. because a different user is
621 * currently holding a lock, that page will be missing from the returned list.
648 * Save a wiki page
650 * Saves the given wiki text to the given page. If the page does not exist, it will be created.
651 * Just like in the wiki, saving an empty text will delete the page.
653 * You need write permissions for the given page and the page may not be locked by another user.
655 * @param string $page page id
660 * @throws AccessDeniedException no write access for page
661 * @throws RemoteException no id, empty new page or locked
664 public function savePage($page, $text, $summary = '', $isminor = false) argument
669 $page = $this->checkPage($page, 0, false, AUTH_EDIT);
673 if (!page_exists($page) && trim($TEXT) == '') {
674 throw new RemoteException('Refusing to write an empty new wiki page', 132);
677 // Check, if page is locked
678 if (checklock($page)) {
679 throw new RemoteException('The page is currently locked', 133);
684 throw new RemoteException('The page content was blocked', 134);
688 if (!page_exists($page) && empty($summary)) {
693 if (page_exists($page) && empty($TEXT) && empty($summary)) {
699 lock($page);
700 saveWikiText($page, $TEXT, $summary, $isminor);
701 unlock($page);
703 // run the indexer if page wasn't indexed yet
705 (new Indexer())->addPage($page);
707 // indexing failure is non-fatal, the page was saved successfully
714 * Appends text to the end of a wiki page
716 * If the page does not exist, it will be created. If a page template for the non-existant
717 * page is configured, the given text will appended to that template.
719 * The call will create a new page revision.
721 * You need write permissions for the given page.
723 * @param string $page page id
731 public function appendPage($page, $text, $summary = '', $isminor = false) argument
733 $currentpage = $this->getPage($page);
737 return $this->savePage($page, $currentpage . $text, $summary, $isminor);
908 * @return string[] A list of pages linking to the given page
1083 * Convenience method for page checks
1087 * - clean the given page id
1088 * - disallow an empty page id
1089 * - check if the page exists (unless disabled)
1092 * @param string $id page id
1093 * @param int $rev page revision
1096 * @return string the cleaned page id
1104 throw new RemoteException('Empty or invalid page ID given', 131);
1108 throw new RemoteException('The requested page (revision) does not exist', 121);
1112 throw new AccessDeniedException('You are not allowed to read this page', 111);