aboutsummaryrefslogtreecommitdiffstats
path: root/admin/include
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2007-09-21 09:12:45 +0000
committerpatdenice <patdenice@piwigo.org>2007-09-21 09:12:45 +0000
commit7a267ee7f06a7f2e3742e87ba087ec03a9ed7089 (patch)
tree35dab7a4548e67ce82a1af13bd130a2ba77f75f3 /admin/include
parent94cd8b4fbb2ef8fc2b0a9d892afc2c03feee1b0a (diff)
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
Diffstat (limited to 'admin/include')
-rw-r--r--admin/include/functions_upgrade.php19
1 files changed, 19 insertions, 0 deletions
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);
+ }
+ }
+}
?>