0000421 : call a function to create empty local files during install and upgrade

Avoid log errors

git-svn-id: http://piwigo.org/svn/branches/branch-1_7@2103 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
patdenice
2007-09-21 09:12:45 +00:00
parent 94cd8b4fbb
commit 7a267ee7f0
3 changed files with 26 additions and 0 deletions
+19
View File
@@ -40,5 +40,24 @@ if you want to upgrade';
}
}
// Create empty local files to avoid log errors
function create_empty_local_files()
{
$files =
array (
PHPWG_ROOT_PATH . 'template-common/local-layout.css',
PHPWG_ROOT_PATH . 'template/yoga/local-layout.css'
);
foreach ($files as $path)
{
if (!file_exists ($path))
{
$file = @fopen($path, "w");
@fwrite($file , '/* You can modify this file */');
@fclose($file);
}
}
}
?>