1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-08 07:47:00 +02:00

Minor tweaks

This commit is contained in:
Ryan Cramer
2016-12-14 12:26:26 -05:00
parent 7e262fa60d
commit 83846d1fe2
2 changed files with 5 additions and 1 deletions

View File

@@ -291,8 +291,9 @@ class Pages extends Wire {
$debug = $this->debug;
if($debug) $this->debug(false);
$options['lazy'] = true;
$options['caller'] = 'pages.findMany';
if(!isset($options['cache'])) $options['cache'] = false;
$matches = $this->loader->find($selector, $options);
$matches = $this->find($selector, $options);
if($debug) $this->debug($debug);
return $matches;
}

View File

@@ -244,11 +244,13 @@ class PagesLoader extends Wire {
$pages->finderOptions($options);
$pages->setDuplicateChecking(false);
$loadPages = false;
$cachePages = false;
$template = null;
foreach($pagesIDs as $id) {
$page = $this->pages->newPage();
$page->_lazy($id);
$page->loaderCache = false;
$pages->add($page);
}
@@ -661,6 +663,7 @@ class PagesLoader extends Wire {
}
unset($row['templates_id']);
foreach($row as $key => $value) $page->set($key, $value);
if($options['cache'] === false) $page->loaderCache = false;
$page->instanceID = ++$instanceID;
$page->setIsLoaded(true);
$page->setIsNew(false);