From 8b264184ec9f6f5ee27bd4cd7caf894ad5d8bdee Mon Sep 17 00:00:00 2001 From: Tom Rix Date: Mon, 1 Mar 2010 02:53:40 +0000 Subject: [PATCH] ENHANCEMENT: Removed unnecessary subsite caching for better static publishing operation. (from r81673) --- code/Subsite.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/Subsite.php b/code/Subsite.php index 9be782d..44669a0 100644 --- a/code/Subsite.php +++ b/code/Subsite.php @@ -462,7 +462,6 @@ JS; * This is used primarily when using subsites in conjunction with StaticPublisher * * @return void - * @author Tom Rix */ static function writeHostMap($file = null) { if (!$file) $file = Director::baseFolder().'/cache/host-map.php'; @@ -478,7 +477,8 @@ JS; } $data = ''; - file_put_contents($file, $data); + + if (is_writable($file)) file_put_contents($file, $data); } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////