Closed zeleznypa closed 7 years ago
The contents of the "current page" aren't loaded twice, there's a check in Pico::readPages()
that ensures this. The goal of Pico::discoverCurrentPage()
is primarily to determine the next and previous pages (something we can't do until we've sorted the pages).
But there is also double implementation of the parsing meta headers etc. Why not to move the first part into the "readPages" part?
Sorry, I looked into the v1.0.0 version :)
btw: v1.0.0
behaves exactly the same, only versions prior to v1.0.0-beta.1
(e.g. v0.8
or v0.9
) behave different.
I'm trying to understand the flow of the PicoCMS and i found the strange thing.
In the
run
method, there is loading of the "current page" content here: https://github.com/picocms/Pico/blob/pico-1.1/lib/Pico.php#L319After a while in the same method "all known pages" are loaded https://github.com/picocms/Pico/blob/pico-1.1/lib/Pico.php#L354
After a while in the same method is called
discoverCurrentPage
method https://github.com/picocms/Pico/blob/pico-1.1/lib/Pico.php#L356My question is, why to load
rawContent
andcontent
of the "current page" twice?