From a326d68c337eca4660589365872a64b8a404debf Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 1 Nov 2004 23:42:29 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=4471 --- checkin_notes | 16 ++++++++++++++++ html/inc/cache.inc | 5 ++++- html/inc/util.inc | 4 ++-- html/user/download.php | 20 ++++++-------------- 4 files changed, 28 insertions(+), 17 deletions(-) diff --git a/checkin_notes b/checkin_notes index 300e2678d9..7d7fa95ae0 100755 --- a/checkin_notes +++ b/checkin_notes @@ -19003,3 +19003,19 @@ David 1 Nov 2004 top_users.php lib/ util.C + +David 1 Nov 2004 + - PHP caching: call clearstatcache() prior to filemtime(), + just in case the file doesn't exist anymore. + NOTE: this doesn't seem to work. + Sometimes it thinks a cached copy is there, but it's not. + - row4(): don't left/right align + - core client download page: + don't check for user login (this page is cached!!) + + html/ + inc/ + cache.inc + util.C + user/ + download.inc diff --git a/html/inc/cache.inc b/html/inc/cache.inc index 2cd28a4709..ccb4e711e2 100644 --- a/html/inc/cache.inc +++ b/html/inc/cache.inc @@ -91,6 +91,7 @@ function start_cache($max_age, $params=""){ if ($max_age) { $request = getallheaders(); + clearstatcache(); $lastmodified = @filemtime($path); if ($lastmodified) { @@ -141,7 +142,9 @@ function start_cache($max_age, $params=""){ Header("Last-Modified: " . gmdate("D, d M Y H:i:s",$lastmodified) . " GMT"); Header("Expires: " . gmdate("D, d M Y H:i:s",$lastmodified+$max_age) . " GMT"); Header("Cache-Control: public, max-age=" . $max_age ); - readfile($path); + if (!@readfile($path)) { + echo "can't read $path; lastmod $lastmodified\n"; + } exit; } } diff --git a/html/inc/util.inc b/html/inc/util.inc index 81c3665a1d..56048bb182 100644 --- a/html/inc/util.inc +++ b/html/inc/util.inc @@ -228,8 +228,8 @@ function row3($x, $y, $z) { } function row4($xx, $xy, $yx, $yy) { - echo "$xx$xy" - . "$yx$yy\n"; + echo "$xx$xy" + . "$yx$yy\n"; } function rowify($string) { diff --git a/html/user/download.php b/html/user/download.php index 4411d7bd85..83131e877e 100644 --- a/html/user/download.php +++ b/html/user/download.php @@ -9,24 +9,16 @@ require_once("../inc/db.inc"); require_once("../inc/download.inc"); - init_session(); db_init(); page_head("Download BOINC software"); - if (!get_logged_in_user(false)) { - echo " - - First-time ".PROJECT." participants: -
Don't download BOINC software now. - Create an account - before you download. -
-

- If you're a returning ".PROJECT." user: - "; - } echo " - Select your computer type:

\n + + First-time ".PROJECT." participants: +
Don't download BOINC software now. + Create an account first. +
+

"; print_download_links(); echo "