Lines Matching refs:page

162         foreach ($pages as $pid => $page) {
166 !page_exists($page) ||
167 isHiddenPage($page) ||
168 filesize(wikiFN($page)) < 150 || // skip very small pages
169 ($skipRE && preg_match($skipRE, (string)$page)) ||
170 ($matchRE && !preg_match($matchRE, ":$page"))
173 $this->storage->deletePageChunks($page, $chunkID);
178 if ($firstChunk && @filemtime(wikiFN($page)) < $firstChunk->getCreated()) {
180 $this->storage->reusePageChunks($page, $chunkID);
181 if ($this->logger instanceof CLI) $this->logger->info("Reusing chunks for $page");
184 $this->storage->deletePageChunks($page, $chunkID);
185 $chunks = $this->createPageChunks($page, $chunkID);
198 * @param string $page Name of the page to read
201 public function getPageContent($page) argument
204 $ID = $page;
206 $text = p_cached_output(wikiFN($page), 'aichat', $page);
210 ['page' => $page, 'msg' => $e->getMessage()]
212 $text = rawWiki($page);
223 * @param string $page Name of the page to split
229 public function createPageChunks($page, $firstChunkID) argument
233 $text = $this->getPageContent($page);
234 $crumbs = $this->breadcrumbTrail($page);
238 'page' => $page,
240 'metadata' => ['title' => $page, 'relation_references' => []],
262 ['page' => $page, 'msg' => $e->getMessage()]
267 $chunkList[] = new Chunk($page, $firstChunkID, $part, $embedding);
274 ['id' => $page, 'count' => count($chunkList)]
277 $this->logger->warning('{id} could not be split into chunks', ['id' => $page]);
357 $page = $chunk->getPage();
358 if (isset($pages[$page])) continue; // we already have this page
363 $pages[$page] = new Chunk(
364 $page,
381 * @param string $page
385 public function getPageChunks($page, $limits = true) argument
388 if ($auth && auth_quickaclcheck($page) < AUTH_READ) {
390 'User not allowed to read context page {page}', ['page' => $page]
397 $pos = array_search(cleanID($page), $pages);
401 'Context page {page} is not in index', ['page' => $page]
406 $chunks = $this->storage->getPageChunks($page, $pos * 100);
445 $page = $resolver->resolveId($check);
446 $title = p_get_first_heading($page);
452 $page = noNS($id);
453 $crumbs[] = $title ? "$title ($page)" : $page;