# HG changeset patch # User Matti Hamalainen # Date 1443591564 -10800 # Node ID dda30eff3266c37fbdff341404226b548d9f80c0 # Parent a59bb75aa0ecbb10042f84e834da3aec367db3ee Fix handling of data modification timestamps. diff -r a59bb75aa0ec -r dda30eff3266 index.php --- a/index.php Wed Sep 30 08:38:52 2015 +0300 +++ b/index.php Wed Sep 30 08:39:24 2015 +0300 @@ -322,13 +322,12 @@ } -function lukReadClassFile($filename, &$mtimestamp) +function lukReadClassFile($filename) { // Attempt to open file for reading if (($fp = @fopen($filename, "rb")) === false) return false; - $mtimestamp = filemtime($filename); $mclasses = FALSE; // Lock file so that we do not get clashes @@ -525,7 +524,7 @@ // Read classfile -if (($classIDs = lukReadClassFile($classIDFile[$nextPeriod], $timestamp)) === false) +if (($classIDs = lukReadClassFile($classIDFile[$nextPeriod])) === false) stError(cmQM("classListNotFound")); @@ -535,11 +534,13 @@ { stError(cmQM("classDataNotFound", chentities($classID))); $haveData = FALSE; + $timestamp = time(); } else { require($dataFile); $haveData = isset($classInfo); + $timestamp = filemtime($dataFile); }