diff options
author | patdenice <patdenice@piwigo.org> | 2007-09-21 09:06:00 +0000 |
---|---|---|
committer | patdenice <patdenice@piwigo.org> | 2007-09-21 09:06:00 +0000 |
commit | b4a1fa031235a30b018213113f9b76d9e52f0004 (patch) | |
tree | 3b493e566e86bf26da4de80fd71917321c611466 /admin/include/functions_upgrade.php | |
parent | 179106efaff17b4fa25667381244ebc46789885e (diff) |
0000421 : call a function to create empty local files during install and upgrade
Avoid log errors
git-svn-id: http://piwigo.org/svn/trunk@2102 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/include/functions_upgrade.php')
-rw-r--r-- | admin/include/functions_upgrade.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/admin/include/functions_upgrade.php b/admin/include/functions_upgrade.php index 7fe9db93b..fd9863339 100644 --- a/admin/include/functions_upgrade.php +++ b/admin/include/functions_upgrade.php @@ -78,4 +78,24 @@ function prepare_conf_upgrade() $conf['tables']['old_permalinks_table'] = $prefixeTable.'old_permalinks'; } +// 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); + } + } +} + ?> |