# HG changeset patch # User Matti Hamalainen # Date 1418153545 -7200 # Node ID 9c6290ad087da6803e104f77953e4743966bb879 # Parent 4085ea7aa7a68fb320a54ce7e0c689329f4353d7 Improve class code handling. diff -r 4085ea7aa7a6 -r 9c6290ad087d index.php --- a/index.php Thu Oct 02 09:11:34 2014 +0300 +++ b/index.php Tue Dec 09 21:32:25 2014 +0200 @@ -17,7 +17,7 @@ $pageCSSData = array("cookie" => "lukcss", "prefix" => "luk"); $classDefaultID = "DEFAULT"; -$classIDFile = "classes.txt"; +$classIDFile = array(FALSE => "classes.txt", TRUE => "classes_next.txt"); $courseCacheFile = "coursecache.txt"; if (file_exists("config.inc.php")) @@ -75,11 +75,13 @@ "classDataNotFound" => array( "fi" => "Luokan %1 tietoja ei löytynyt! Jos luokkakoodi on uusi, ". "ilmestyy se järjestelmään seuraavan päivityksen aikana. Luokkatiedot ". - "päivitetään noin kerran viikossa.", + "päivitetään noin kerran viikossa. On myös mahdollista, että luokkakoodi ". + "on olemassa vain seuraavan periodin tiedoissa.", "en" => "Data for class %1 was not found. If the class code is new, it ". "should appear in this system during the next update. The data is updated ". - "approximately once per week.", + "approximately once per week. It is also possible that the code only ". + "exists for next period's data.", ), "classListNotFound" => array( @@ -487,7 +489,7 @@ // Read classfile -if (($classIDs = lukReadClassFile($classIDFile, &$timestamp)) === false) +if (($classIDs = lukReadClassFile($classIDFile[$nextPeriod], &$timestamp)) === false) stError(cmQM("classListNotFound"));