From 3587335ac516a7f472b1099cbae4205a0476c74f Mon Sep 17 00:00:00 2001 From: Jordan Dukart Date: Mon, 25 Apr 2016 14:38:48 -0300 Subject: [PATCH] Removing unused clip function. --- islandora.module | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/islandora.module b/islandora.module index 1d060c4d..b3c4263c 100644 --- a/islandora.module +++ b/islandora.module @@ -1614,31 +1614,6 @@ function islandora_entity_property_info() { return $info; } -/** - * Menu callback downloads the given clip. - */ -function islandora_download_clip(AbstractObject $object) { - if (isset($_GET['clip'])) { - $url = $_GET['clip']; - if (!preg_match('/^https?:\/\//', $url)) { - $is_https = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on'; - $http_protocol = $is_https ? 'https' : 'http'; - $url = $http_protocol . '://' . $_SERVER['HTTP_HOST'] . $url; - } - $filename = $object->label; - header("Content-Disposition: attachment; filename=\"{$filename}.jpg\""); - header("Content-type: image/jpeg"); - header("Content-Transfer-Encoding: binary"); - $ch = curl_init(); - curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1); - curl_setopt($ch, CURLOPT_HEADER, 0); - curl_setopt($ch, CURLOPT_URL, $url); - $response = curl_exec($ch); - curl_close($ch); - } - exit(); -} - /** * Implements hook_file_mimetype_mapping_alter(). *