mirror of
https://github.com/getgrav/grav.git
synced 2026-07-07 14:41:58 +02:00
remove replicated code...
This commit is contained in:
@@ -492,11 +492,6 @@ class Pages
|
||||
if (!$this->instances) {
|
||||
$this->grav['debugger']->addMessage('Page cache missed, rebuilding pages..');
|
||||
|
||||
// Fire event for memory and time consuming plugins...
|
||||
if ($config->get('system.pages.events.page')) {
|
||||
$this->grav->fireEvent('onBuildPagesInitialized');
|
||||
}
|
||||
|
||||
$this->recurse($pagesDir);
|
||||
$this->buildRoutes();
|
||||
|
||||
@@ -511,11 +506,6 @@ class Pages
|
||||
$taxonomy->taxonomy($taxonomy_map);
|
||||
}
|
||||
} else {
|
||||
// Fire event for memory and time consuming plugins...
|
||||
if ($config->get('system.pages.events.page')) {
|
||||
$this->grav->fireEvent('onBuildPagesInitialized');
|
||||
}
|
||||
|
||||
$this->recurse($pagesDir);
|
||||
$this->buildRoutes();
|
||||
}
|
||||
@@ -539,6 +529,11 @@ class Pages
|
||||
/** @var Config $config */
|
||||
$config = $this->grav['config'];
|
||||
|
||||
// Fire event for memory and time consuming plugins...
|
||||
if ($parent === null && $config->get('system.pages.events.page')) {
|
||||
$this->grav->fireEvent('onBuildPagesInitialized');
|
||||
}
|
||||
|
||||
$page->path($directory);
|
||||
if ($parent) {
|
||||
$page->parent($parent);
|
||||
|
||||
Reference in New Issue
Block a user