Merge pull request #157 from silverstripe-big-o/staticPublishingFix24

Static publishing fix24
This commit is contained in:
Ingo Schommer 2012-07-09 01:13:22 -07:00
commit 3fff44a5b4

View File

@ -186,11 +186,12 @@ class FilesystemPublisher extends StaticPublisher {
$response = Director::test(str_replace('+', ' ', $url));
Requirements::clear();
singleton('DataObject')->flushCache();
//skip any responses with a 404 status code. We don't want to turn those into statically cached pages
if (!$response || $response->getStatusCode() == '404') continue;
// Generate file content
// PHP file caching will generate a simple script from a template
if($this->fileExtension == 'php') {