X-Git-Url: https://git.cweiske.de/surrogator.git/blobdiff_plain/4d4fcf96ca2bf5b3826ca0395b031293adef9b0b..fc412baac7378a01d9c5ab90405365b56d3abe4b:/surrogator.php diff --git a/surrogator.php b/surrogator.php index 8d387d5..fdbd384 100755 --- a/surrogator.php +++ b/surrogator.php @@ -11,7 +11,7 @@ * @package Surrogator * @author Christian Weiske * @license http://www.gnu.org/licenses/agpl.html AGPLv3 or later - * @link http://git.cweiske.de/?p=surrogator.git + * @link https://sourceforge.net/p/surrogator/ */ namespace surrogator; $cfgFile = __DIR__ . '/data/surrogator.config.php'; @@ -118,7 +118,13 @@ foreach ($sizes as $size) { foreach (array('mm.png', 'default.png') as $resFile) { if (!file_exists($rawDir . '/' . $resFile)) { log($resFile . ' missing, copying it from res/', 2); - copy(__DIR__ . '/res/' . $resFile, $rawDir . '/' . $resFile); + copy($resDir . '/' . $resFile, $rawDir . '/' . $resFile); + } +} +foreach (array('index.html', 'robots.txt', 'favicon.ico') as $resFile) { + if (!file_exists($wwwDir . '/' . $resFile) && is_writable($wwwDir)) { + log('no www/' . $resFile . ' found, copying default over', 1); + copy($resDir . '/www/' . $resFile, $wwwDir . '/' . $resFile); } }