From 3441f115eb08b84d14f436594bb0e87dad45f712 Mon Sep 17 00:00:00 2001 From: Arslan Hassan Date: Mon, 27 Jun 2011 16:40:06 +0000 Subject: [PATCH] Fixed : Photo download for multiserver --- upload/includes/classes/photos.class.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/upload/includes/classes/photos.class.php b/upload/includes/classes/photos.class.php index 3c7726f6..349aa265 100644 --- a/upload/includes/classes/photos.class.php +++ b/upload/includes/classes/photos.class.php @@ -2392,8 +2392,20 @@ class CBPhotos { $file = $this->ready_photo_file($key); + if($file) { + + if($file['details']['server_url']) + { + $url = dirname(dirname($file['details']['server_url'])); + header('location:'.$url.'/download_photo.php?file='.$file['details']['filename'] + .'.'.$file['details']['ext'].'&folder='.$file['details']['file_directory'] + .'&title='.urlencode($file['details']['photo_title'])); + + $this->incrementDownload($p); + return true; + } $p = $file['details']; $mime_types=array(); $mime_types['gif'] = 'image/gif';