diff options
| author | Pim van den Berg | 2013-05-20 21:37:46 +0200 |
|---|---|---|
| committer | Pim van den Berg | 2013-05-20 21:37:46 +0200 |
| commit | 34bdd032c191b503520f9cce8e4d64803031c3fe (patch) | |
| tree | f3a75a02e9515e16c84c1da519e693e082d134d5 | |
| parent | update changelog to v0.4 (diff) | |
| download | apt-panopticon_cgp-34bdd032c191b503520f9cce8e4d64803031c3fe.zip apt-panopticon_cgp-34bdd032c191b503520f9cce8e4d64803031c3fe.tar.gz apt-panopticon_cgp-34bdd032c191b503520f9cce8e4d64803031c3fe.tar.bz2 apt-panopticon_cgp-34bdd032c191b503520f9cce8e4d64803031c3fe.tar.xz | |
remove dependency on mod_rewrite for rrd.php
Use $_SERVER['PATH_INFO'] instead.
| -rw-r--r-- | .htaccess | 2 | ||||
| -rw-r--r-- | rrd.php | 2 | ||||
| -rw-r--r-- | type/Default.class.php | 2 |
3 files changed, 2 insertions, 4 deletions
| @@ -8,5 +8,3 @@ Options -Indexes | |||
| 8 | 8 | ||
| 9 | RewriteEngine On | 9 | RewriteEngine On |
| 10 | RewriteRule ^.git(ignore|/) - [F,L] | 10 | RewriteRule ^.git(ignore|/) - [F,L] |
| 11 | |||
| 12 | RewriteRule ^rrd/(.*) rrd.php?path=$1 | ||
| @@ -4,7 +4,7 @@ require_once 'conf/common.inc.php'; | |||
| 4 | require_once 'inc/functions.inc.php'; | 4 | require_once 'inc/functions.inc.php'; |
| 5 | require_once 'inc/html.inc.php'; | 5 | require_once 'inc/html.inc.php'; |
| 6 | 6 | ||
| 7 | if ($file = validateRRDPath($CONFIG['datadir'], $_GET['path'])) { | 7 | if ($file = validateRRDPath($CONFIG['datadir'], $_SERVER['PATH_INFO'])) { |
| 8 | header('Content-Type: application/octet-stream'); | 8 | header('Content-Type: application/octet-stream'); |
| 9 | header('Content-Disposition: attachment; filename='.basename($file)); | 9 | header('Content-Disposition: attachment; filename='.basename($file)); |
| 10 | header("Expires: " .date(DATE_RFC822,strtotime($CONFIG['cache']." seconds"))); | 10 | header("Expires: " .date(DATE_RFC822,strtotime($CONFIG['cache']." seconds"))); |
diff --git a/type/Default.class.php b/type/Default.class.php index 42d5090..8632328 100644 --- a/type/Default.class.php +++ b/type/Default.class.php | |||
| @@ -116,7 +116,7 @@ class Type_Default { | |||
| 116 | 116 | ||
| 117 | function parse_filename($file) { | 117 | function parse_filename($file) { |
| 118 | if ($this->graph_type == 'canvas') { | 118 | if ($this->graph_type == 'canvas') { |
| 119 | $file = 'rrd' . str_replace($this->datadir, '', $file); | 119 | $file = 'rrd.php/' . str_replace($this->datadir . '/', '', $file); |
| 120 | } | 120 | } |
| 121 | return $this->rrd_escape($file); | 121 | return $this->rrd_escape($file); |
| 122 | } | 122 | } |
