From c51b483f24936c8d04a54a6999412937ec21c49a Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 19 Nov 2011 23:13:26 -0500 Subject: uploading photos through the basic interface works now --- pages/thumbnail.php | 78 ----------------------------------------------------- 1 file changed, 78 deletions(-) delete mode 100644 pages/thumbnail.php (limited to 'pages/thumbnail.php') diff --git a/pages/thumbnail.php b/pages/thumbnail.php deleted file mode 100644 index 9daa2f9c0..000000000 --- a/pages/thumbnail.php +++ /dev/null @@ -1,78 +0,0 @@ -getSubtype() != "image") { - forward('mod/tidypics/graphics/' . $error_image); -} - -// Get filename -if ($size == "thumb") { - $thumbfile = $file->thumbnail; -} else if ($size == "small") { - $thumbfile = $file->smallthumb; -} else { - $thumbfile = $file->largethumb; -} - -if (!$thumbfile) { - forward('mod/tidypics/graphics/' . $error_image); -} - -// create Elgg File object -$readfile = new ElggFile(); -$readfile->owner_guid = $file->owner_guid; -$readfile->setFilename($thumbfile); -$contents = $readfile->grabFile(); - -// send error image if file could not be read -if (!$contents) { - forward('mod/tidypics/graphics/' . $error_image); -} - -// expires every 14 days -$expires = 14 * 60*60*24; - -// overwrite header caused by php session code so images can be cached -$mime = $file->getMimeType(); -header("Content-Type: $mime"); -header("Content-Length: " . strlen($contents)); -header("Cache-Control: public", true); -header("Pragma: public", true); -header('Expires: ' . gmdate('D, d M Y H:i:s', time() + $expires) . ' GMT', true); - -// Return the thumbnail and exit -echo $contents; -exit; -- cgit v1.2.3