From: Alan Jack Pippin Date: Tue, 12 Jun 2007 15:15:44 +0000 (-0600) Subject: Fixed bug where detecting if a remote file exists or not, X-Git-Tag: 1_0_4~10 X-Git-Url: http://git.pippins.net/embedvideo/.git/%22%22.%24thumbnail.%22/images/static/.%24link.?a=commitdiff_plain;h=74a1d0cec8dd6b7257d3d70bef106af9dcd7f786;p=embedvideo%2F.git Fixed bug where detecting if a remote file exists or not, actually ended up downloading the entire remote file. --- diff --git a/ItemAddEmbedVideo.inc b/ItemAddEmbedVideo.inc index ba84786..a6cb38c 100644 --- a/ItemAddEmbedVideo.inc +++ b/ItemAddEmbedVideo.inc @@ -229,12 +229,11 @@ class ItemAddEmbedVideo extends ItemAddPlugin { * Check to make sure the URL to the remote flv file is valid * (That the file exists at the URL given) */ - list ($successfullyCopied, $response, $headers) = - GalleryCoreApi::fetchWebPage($url, $extraHeaders); - if (!$successfullyCopied) { - return array(GalleryCoreApi::error(ERROR_BAD_PATH,__FILE__,__LINE__, - "Unable to locate a video at url: $url"),null,null); - } + /* + * TODO: How can we check if the remote file exists without actually + * downloading the entire file? For now, if the file doesn't exist, + * a gallery item is still added, and the embedded player won't play it. + */ /* * Format the description to hold a reference to the embedded video