/[drupal]/contributions/modules/filerequest/throttle.php
ViewVC logotype

Diff of /contributions/modules/filerequest/throttle.php

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

revision 1.3, Mon Jul 3 14:03:54 2006 UTC revision 1.3.2.1, Thu Aug 31 19:10:06 2006 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: throttle.php,v 1.2.2.2 2006/03/29 19:31:10 elmuerte Exp $  // $Id: throttle.php,v 1.3 2006/07/03 14:03:54 elmuerte Exp $
3    
4  define("__DRUPAL_BASE_DIR", dirname(dirname(dirname(__FILE__))).DIRECTORY_SEPARATOR);  define("__DRUPAL_BASE_DIR", dirname(dirname(dirname(__FILE__))).DIRECTORY_SEPARATOR);
5    
# Line 31  if (file_exists("./throttle.config.php") Line 31  if (file_exists("./throttle.config.php")
31      __fr_process_download($config["filename"], preg_match("#(\?|&)download(&|$)#", $_SERVER["REQUEST_URI"]), $config["watermark"]);      __fr_process_download($config["filename"], preg_match("#(\?|&)download(&|$)#", $_SERVER["REQUEST_URI"]), $config["watermark"]);
32      if ($__fr_reporting_leech) {      if ($__fr_reporting_leech) {
33        chdir(__DRUPAL_BASE_DIR);        chdir(__DRUPAL_BASE_DIR);
34        @require('includes/bootstrap.inc');        require('includes/bootstrap.inc');
35          drupal_bootstrap(DRUPAL_BOOTSTRAP_DATABASE);
36          __fr_delayed_report();
37      }      }
38      exit();      exit();
39    }    }
# Line 43  unset($config); Line 45  unset($config);
45  unset($filepath);  unset($filepath);
46  $_SERVER['SCRIPT_NAME'] = dirname(dirname(dirname($_SERVER['SCRIPT_NAME'])))."/index.php";  $_SERVER['SCRIPT_NAME'] = dirname(dirname(dirname($_SERVER['SCRIPT_NAME'])))."/index.php";
47  chdir(__DRUPAL_BASE_DIR);  chdir(__DRUPAL_BASE_DIR);
48  $_GET["q"] = "system/files";  $_GET["q"] = "system/files/".$_GET["file"];
49  require("index.php");  require("index.php");
   
 ?>  

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.3.2.1

  ViewVC Help
Powered by ViewVC 1.1.2