From d06cba3977ee98bc9f5856034f2bc69a8ca196c1 Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Sun, 9 Jul 2006 00:39:43 +0000 Subject: [PATCH] appimage should use the image sUrl instead of the iId when trying to stat() the file. We can't always be sure that the iId will be the name of the file --- appimage.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/appimage.php b/appimage.php index 2426287..0e5b333 100644 --- a/appimage.php +++ b/appimage.php @@ -73,12 +73,13 @@ if ($aClean['sREQUEST_METHOD']='HEAD') header("Expires: "); header("Last-Modified: ".fHttpDate($iModTime)); } + $oScreenshot = new Screenshot($aClean['iId']); -/* at this point, we know that .../screenshots/$id and - * .../screenshots/thumbnails/$id both exist as normally +/* at this point, we know that .../screenshots/$oScreenshot->sUrl and + * .../screenshots/thumbnails/$oScreenshot->sUrl both exist as normally * they would both be created at the same time. */ -$fstat_val = stat(appdb_fullpath("data/screenshots/".$aClean['iId'])); +$fstat_val = stat(appdb_fullpath("data/screenshots/".$oScreenshot->sUrl)); $iModTime = $fstat_val['mtime']; header("Cache-Control: public");