/[drupal]/contributions/modules/filerequest/filerequest.module
ViewVC logotype

Diff of /contributions/modules/filerequest/filerequest.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.4.2.2, Mon Jul 10 17:05:33 2006 UTC revision 1.4.2.3, Wed Aug 2 10:25:40 2006 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: filerequest.module,v 1.4.2.1 2006/07/03 14:12:08 elmuerte Exp $  // $Id: filerequest.module,v 1.4.2.2 2006/07/10 17:05:33 elmuerte Exp $
3    
4  function filerequest_help($section) {  function filerequest_help($section) {
5    switch ($section) {    switch ($section) {
# Line 121  function _filerequest_download() { Line 121  function _filerequest_download() {
121          return drupal_access_denied();          return drupal_access_denied();
122        }        }
123        else if (count($headers)) {        else if (count($headers)) {
124            // set custom headers
125            $forceMime = '';
126            foreach ($headers as $header) {
127              header($header);
128              if (preg_match('#^Content-Type: (.*)$#i', $header, $match)) {
129                $forceMime = $match[1];
130              }
131            }
132          // make sure no caching headers are set          // make sure no caching headers are set
133          header("Cache-Control:");          header("Cache-Control:");
134          header("Pragma:");          header("Pragma:");
135          header("Expires:");          header("Expires:");
136          __fr_process_download($config["filename"], preg_match("#(\?|&)download(&|$)#", $_SERVER["REQUEST_URI"]), $config["watermark"]);          // unset other headers we (might) set
137            header("Content-Range:");
138            header("Content-Length:");
139            header("Content-Type:");
140            header("Last-Modified:");
141            header("Content-Disposition:");
142            __fr_process_download($config["filename"], preg_match("#(\?|&)download(&|$)#", $_SERVER["REQUEST_URI"]), $config["watermark"], $forceMime);
143          exit();          exit();
144        }        }
145      }      }

Legend:
Removed from v.1.4.2.2  
changed lines
  Added in v.1.4.2.3

  ViewVC Help
Powered by ViewVC 1.1.2