[geeklog-cvs] geeklog: Call clearstatcache() to force filesize() to return the...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sat May 28 13:52:56 EDT 2011


changeset 8288:f1d182932e97
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/f1d182932e97
user: Dirk Haun <dirk at haun-online.de>
date: Sat May 28 19:49:38 2011 +0200
description:
Call clearstatcache() to force filesize() to return the correct current file size of the config files, thus avoiding ending up with incomplete files (bug #0001353)

diffstat:

 public_html/admin/install/index.php       |  1 +
 public_html/admin/install/lib-install.php |  2 ++
 public_html/admin/install/lib-upgrade.php |  1 +
 3 files changed, 4 insertions(+), 0 deletions(-)

diffs (41 lines):

diff -r c57eab83416f -r f1d182932e97 public_html/admin/install/index.php
--- a/public_html/admin/install/index.php	Sat May 28 17:25:06 2011 +0200
+++ b/public_html/admin/install/index.php	Sat May 28 19:49:38 2011 +0200
@@ -1230,6 +1230,7 @@
         $dbconfig_path = str_replace('db-config.php', '', $_PATH['db-config.php']);
 
         // Edit siteconfig.php and enter the correct GL path and system directory path
+        clearstatcache();
         $siteconfig_path = $_PATH['public_html/'] . 'siteconfig.php';
         $siteconfig_file = fopen($siteconfig_path, 'rb');
         $siteconfig_data = fread($siteconfig_file, filesize($siteconfig_path));
diff -r c57eab83416f -r f1d182932e97 public_html/admin/install/lib-install.php
--- a/public_html/admin/install/lib-install.php	Sat May 28 17:25:06 2011 +0200
+++ b/public_html/admin/install/lib-install.php	Sat May 28 19:49:38 2011 +0200
@@ -394,6 +394,7 @@
     }
 
     // Read in db-config.php so we can insert the DB information
+    clearstatcache();
     $dbconfig_file = fopen($config_file, 'rb');
     $dbconfig_data = fread($dbconfig_file, filesize($config_file));
     fclose($dbconfig_file);
@@ -1160,6 +1161,7 @@
 {
     global $_TABLES, $LANG_INSTALL;
 
+    clearstatcache();
     $siteconfig_file = fopen($siteconfig_path, 'rb');
     $siteconfig_data = fread($siteconfig_file, filesize($siteconfig_path));
     fclose($siteconfig_file);
diff -r c57eab83416f -r f1d182932e97 public_html/admin/install/lib-upgrade.php
--- a/public_html/admin/install/lib-upgrade.php	Sat May 28 17:25:06 2011 +0200
+++ b/public_html/admin/install/lib-upgrade.php	Sat May 28 19:49:38 2011 +0200
@@ -660,6 +660,7 @@
 {
     $result = true;
 
+    clearstatcache();
     $siteconfig_file = fopen($siteconfig_path, 'rb');
     $siteconfig_data = fread($siteconfig_file, filesize($siteconfig_path));
     fclose($siteconfig_file);



More information about the geeklog-cvs mailing list