Changeset 660
- Timestamp:
- 12/1/2008 3:39:27 AM (4 years ago)
- Location:
- branches/website
- Files:
-
- 3 edited
-
download.php (modified) (1 diff)
-
downloads (modified) (1 prop)
-
updates/index.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/website/download.php
r648 r660 16 16 if (eregi('http(s{0,1})://)(.*)', $row['Link'])) 17 17 header('location: ' . $row['Link']); 18 else 19 echo file_get_contents('./' . $row['Link']); 18 else if (substr($row['Link'], 0, 1) == '?') 19 { 20 $fileName = substr($row['Link'], 1); 21 header("content-type: application/octet-stream"); 22 if (strpos($_SERVER['HTTP_USER_AGENT'], "MSIE") !== false) 23 { 24 //IE browser 25 header('Content-Disposition: inline; filename="'.$fileName.'"'); 26 header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); 27 header('Pragma: public'); 28 } 29 else 30 { 31 header('Content-Disposition: attachment; filename="'.$fileName.'"'); 32 header('Pragma: no-cache'); 33 } 34 35 echo file_get_contents('./downloads/' . $fileName); 36 } 20 37 ?> -
branches/website/downloads
-
Property
svn:ignore
set to
*
-
Property
svn:ignore
set to
-
branches/website/updates/index.php
r646 r660 45 45 } 46 46 47 //Get the link to the download. We got three forms, relative, absolute and query. 48 //Relative links are mirrored by SF. 49 //Absolute links... are absolute links. 50 //Query links are prefixed with ?, they are handled by download.php on the Eraser website. 51 if (substr($row['Link'], 0, 1) == '?') 52 $link = $_SERVER['SERVER_NAME'] . '/download.php?id=' . $row['DownloadID']; 53 else 54 $link = $row['Link']; 47 55 printf(' <item name="%s" version="%s" publisher="%s" architecture="%s" filesize="%d">%s</item> 48 56 ', htmlentities($row['Name']), $row['Version'], htmlentities($row['PublisherName']), $row['Architecture'], 49 $row['Filesize'], htmlentities($ row['Link']));57 $row['Filesize'], htmlentities($link)); 50 58 } 51 59
Note: See TracChangeset
for help on using the changeset viewer.
