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
This commit is contained in:
Chris Morgan
2006-07-09 00:39:43 +00:00
committed by WineHQ
parent 0cf64d78e0
commit d06cba3977

View File

@@ -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");