From 7a267ee7f06a7f2e3742e87ba087ec03a9ed7089 Mon Sep 17 00:00:00 2001 From: patdenice Date: Fri, 21 Sep 2007 09:12:45 +0000 Subject: 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 --- admin/include/functions_upgrade.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'admin/include/functions_upgrade.php') diff --git a/admin/include/functions_upgrade.php b/admin/include/functions_upgrade.php index 843efa58e..7c587c706 100644 --- a/admin/include/functions_upgrade.php +++ b/admin/include/functions_upgrade.php @@ -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); + } + } +} ?> -- cgit v1.2.3