This will trigger a rebuild of the 1.63.0 release notes, but that should
be tolerable. Without this change, different versions of php will encode
the DateTime differently in json, resulting in unnecessary rebuilds.
The problem is that when nette tester runs the tests using a CGI
executable it expects HTTP error statuses, but because it's not a real
HTTP request, SERVER_PROTOCOL isn't set. I tried to fix this before
using `http_repsonse_code` which does the right thing, but it's not
always available, so I had to revert that. So instead I've changed it so
that it assumes that it's an HTTP request unless it knows for sure that
it's a command line run.
It's not really any more efficient than GET, so it's mostly pointless.
I still want to go through the motions of the unzip for a HEAD request,
as I want it to fail when a GET request would fail. They're almost never
used to efficiency isn't much of a concern.
- Use `http_response_code` as it's a bit more robust than using `header`.
- Check errors against `error_reporting()`, so that error checks can be
ignored when appropriate.
I think I'll use this in a cron job, so that updates to more public
pages can be checked before being released. Also won't have to deal with
automatically adding new files.
It doesn't include all the data the is currently stored, there's some
code that attempts to work round that, but it generates incomplete pages
because some of the data is missing. So better just to clear the cache.
It's a bit awkward, but to generate a page needed to update
BoostPages_Page, which wasn't always appropriate. So now generate pages
just using the data from the quickbook source, combined with the state
data.
So that it doesn't update the state in ways that we don't wish it to. A
little awkward as it can update a page that isn't in the cache without
recording it as updated.
Moved the logic for handling beta pages into convert_quickbook_pages as
it didn't make much sense in load_quickbook_page. Also simplified a bit
as there should always be a cached entry for a beta page. Perhaps should
store the beta pages in a separate file?