Mercurial > hg > lukkari
comparison index.php @ 182:a59bb75aa0ec
Cleanup.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 30 Sep 2015 08:38:52 +0300 |
parents | 6a7ff339b4bb |
children | dda30eff3266 |
comparison
equal
deleted
inserted
replaced
181:9c3100ab29cc | 182:a59bb75aa0ec |
---|---|
511 // Global cache for course data | 511 // Global cache for course data |
512 $cache = array(); | 512 $cache = array(); |
513 $cacheDirty = FALSE; | 513 $cacheDirty = FALSE; |
514 | 514 |
515 // Try to read cachefile, if we can get file lock on it | 515 // Try to read cachefile, if we can get file lock on it |
516 $fp = @fopen($courseCacheFile, "rb"); | 516 if (($fp = @fopen($courseCacheFile, "rb")) !== FALSE) |
517 if ($fp) | |
518 { | 517 { |
519 if (flock($fp, LOCK_SH)) | 518 if (flock($fp, LOCK_SH)) |
520 { | 519 { |
521 require($courseCacheFile); | 520 require($courseCacheFile); |
522 flock($fp, LOCK_UN); | 521 flock($fp, LOCK_UN); |