| 1 |
<?php
|
| 2 |
// $Id: downld.module,v 1.1 2008/06/26 10:28:41 tbarregren Exp $
|
| 3 |
|
| 4 |
/**
|
| 5 |
* @file
|
| 6 |
* Download – allows both public and private download of files.
|
| 7 |
*
|
| 8 |
* Authors:
|
| 9 |
* Thomas Barregren <http://drupal.org/user/16678>
|
| 10 |
*
|
| 11 |
* Sponsors:
|
| 12 |
* SSPA <http://www.sspa.se/>
|
| 13 |
* Webbredaktören <http://www.webbredaktoren.se/>
|
| 14 |
*/
|
| 15 |
|
| 16 |
|
| 17 |
/******************************************************************************
|
| 18 |
* HOOKS
|
| 19 |
*****************************************************************************/
|
| 20 |
|
| 21 |
/**
|
| 22 |
* Implementation of hook_init().
|
| 23 |
*/
|
| 24 |
function downld_init() {
|
| 25 |
if ($_SERVER['REDIRECT_STATUS'] == 403 && ($file = $_SERVER['REDIRECT_URL'])) {
|
| 26 |
drupal_goto('system/files'. $file, NULL, NULL, 307);
|
| 27 |
}
|
| 28 |
}
|