X-Git-Url: https://git.cweiske.de/surrogator.git/blobdiff_plain/34080378b403776aebc206a2e23a1ba2e7d0aa97..5e267e734b04a44116351dfb5442541b1d699a87:/surrogator.php diff --git a/surrogator.php b/surrogator.php index 6519f5b..c7c9d54 100755 --- a/surrogator.php +++ b/surrogator.php @@ -122,6 +122,11 @@ foreach (array('mm.png', 'default.png') as $resFile) { } } +if (!file_exists($wwwDir . '/index.html') && is_writable($wwwDir)) { + log('no index.html found, copying default over', 1); + copy($wwwDir . '/index.surrogator.html', $wwwDir . '/index.html'); +} + if (count($files)) { $fileInfos = array(); foreach ($files as $file) {