Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

477
 
1720
 
1720
 
download.php
_> 55   osCommerce, Open Source E-Commerce Solutions
  66   http://www.oscommerce.com
  77 
<> 8 -  Copyright (c) 2003 osCommerce
   8+  Copyright (c) 2007 osCommerce
99 
  1010   Released under the GNU General Public License
  1111 */
     
 !
9090     umask(0000);
  9191     mkdir(DIR_FS_DOWNLOAD_PUBLIC . $tempdir, 0777);
  9292     symlink(DIR_FS_DOWNLOAD . $downloads['orders_products_filename'], DIR_FS_DOWNLOAD_PUBLIC . $tempdir . '/' . $downloads['orders_products_filename']);
<> 93 -    tep_redirect(DIR_WS_DOWNLOAD_PUBLIC . $tempdir . '/' . $downloads['orders_products_filename']);
  94 -  } else {
  95 -// This will work on all systems, but will need considerable resources
  96 -// We could also loop with fread($fp, 4096) to save memory
  97 -    readfile(DIR_FS_DOWNLOAD . $downloads['orders_products_filename']);
   93+    if (file_exists(DIR_FS_DOWNLOAD_PUBLIC . $tempdir . '/' . $downloads['orders_products_filename'])) {
   94+      tep_redirect(tep_href_link(DIR_WS_DOWNLOAD_PUBLIC . $tempdir . '/' . $downloads['orders_products_filename']));
   95+    }
9896   }
<>  97+
   98+// Fallback to readfile() delivery method. This will work on all systems, but will need considerable resources
   99+  readfile(DIR_FS_DOWNLOAD . $downloads['orders_products_filename']);
<_ 99100 ?>