Mercurial > hg > lukkari
comparison index.php @ 69:e370345d0562
Cleanups.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 24 Oct 2012 03:48:27 +0300 |
parents | 0acf6e16af93 |
children | 0329105ddedc |
comparison
equal
deleted
inserted
replaced
68:0acf6e16af93 | 69:e370345d0562 |
---|---|
463 <div id=\"csssel\"> | 463 <div id=\"csssel\"> |
464 <div id=\"ctitle\">Lukkari v2.0 beta</div> | 464 <div id=\"ctitle\">Lukkari v2.0 beta</div> |
465 <div>".lukMsg("Style").": "; | 465 <div>".lukMsg("Style").": "; |
466 | 466 |
467 foreach ($pageCSSAlts as $name => $id) | 467 foreach ($pageCSSAlts as $name => $id) |
468 echo "<a href=\"?css=".$id."\">".$name."</a>"; | 468 echo "<a href=\"".$baseURI."?css=".$id."\">".$name."</a>"; |
469 | 469 |
470 echo "</div><div id=\"clang\">"; | 470 echo "</div><div id=\"clang\">"; |
471 foreach ($pageLanguages as $id) | 471 foreach ($pageLanguages as $id) |
472 echo "<a href=\"?lang=".$id."\">".$id."</a>"; | 472 echo "<a href=\"".$baseURI."?lang=".$id."\">".$id."</a>"; |
473 | 473 |
474 echo " | 474 echo " |
475 </div> | 475 </div> |
476 </div> | 476 </div> |
477 "; | 477 "; |
480 | 480 |
481 // Dump the course data cache, but only if it has changed | 481 // Dump the course data cache, but only if it has changed |
482 if ($cacheDirty) | 482 if ($cacheDirty) |
483 { | 483 { |
484 $str = "<?\n\$cache = ".var_export($cache, TRUE)."\n?>"; | 484 $str = "<?\n\$cache = ".var_export($cache, TRUE)."\n?>"; |
485 | |
486 // Use locking to prevent concurrent access and dump data | |
487 if (file_put_contents($cacheFile, $str, LOCK_EX) === FALSE) { | 485 if (file_put_contents($cacheFile, $str, LOCK_EX) === FALSE) { |
488 // Can't do much anything here .. | 486 // Can't do much anything here .. |
489 } | 487 } |
490 } | 488 } |
491 | 489 |