Changeset 848
- Timestamp:
- 1/3/2009 12:42:49 AM (4 years ago)
- Location:
- branches/website
- Files:
-
- 2 edited
-
download.php (modified) (3 diffs)
-
updates/index.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/website/download.php
r660 r848 5 5 6 6 //Get the download link associated with the download 7 $query = mysql_query(sprintf('SELECT Link FROM downloads WHERE DownloadID=%d ', intval($_GET['id'])));7 $query = mysql_query(sprintf('SELECT Link FROM downloads WHERE DownloadID=%d AND Superseded=0', intval($_GET['id']))); 8 8 if (!$query) 9 9 exit; … … 19 19 { 20 20 $fileName = substr($row['Link'], 1); 21 header("content-type: application/octet-stream"); 21 header("Content-Type: application/octet-stream"); 22 header('Content-Length: ' . filesize('./downloads/' . $fileName)); 22 23 if (strpos($_SERVER['HTTP_USER_AGENT'], "MSIE") !== false) 23 24 { 24 25 //IE browser 25 header('Content-Disposition: inline; filename="' .$fileName.'"');26 header('Content-Disposition: inline; filename="' . $fileName . '"'); 26 27 header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); 27 28 header('Pragma: public'); … … 29 30 else 30 31 { 31 header('Content-Disposition: attachment; filename="' .$fileName.'"');32 header('Content-Disposition: attachment; filename="' . $fileName . '"'); 32 33 header('Pragma: no-cache'); 33 34 } -
branches/website/updates/index.php
r662 r848 28 28 downloads.PublisherID=publishers.PublisherID 29 29 WHERE 30 (MinVersion IS NULL AND MaxVersion IS NULL) OR 31 (MinVersion IS NULL AND MaxVersion > \'%1$s\') OR 32 (MinVersion <= \'%1$s\' AND MaxVersion IS NULL) OR 33 (MinVersion <= \'%1$s\' AND MaxVersion > \'%1$s\') 30 (Superseded = 0) AND 31 ( 32 (MinVersion IS NULL AND MaxVersion IS NULL) OR 33 (MinVersion IS NULL AND MaxVersion > \'%1$s\') OR 34 (MinVersion <= \'%1$s\' AND MaxVersion IS NULL) OR 35 (MinVersion <= \'%1$s\' AND MaxVersion > \'%1$s\') 36 ) 34 37 ORDER BY `Type` ASC', $version)); 35 38
Note: See TracChangeset
for help on using the changeset viewer.
