aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPim van den Berg2018-06-20 21:50:26 +0200
committerGitHub2018-06-20 21:50:26 +0200
commit1920ca24a067ac157a6bd8f3c017f4c6244ae245 (patch)
tree1bb726e360516f19644f0e1a1ba248b1264f2dd1
parentMerge pull request #157 from Arvur/master (diff)
parentProvide meaningful filenames for graphs (diff)
downloadapt-panopticon_cgp-1920ca24a067ac157a6bd8f3c017f4c6244ae245.zip
apt-panopticon_cgp-1920ca24a067ac157a6bd8f3c017f4c6244ae245.tar.gz
apt-panopticon_cgp-1920ca24a067ac157a6bd8f3c017f4c6244ae245.tar.bz2
apt-panopticon_cgp-1920ca24a067ac157a6bd8f3c017f4c6244ae245.tar.xz
Merge pull request #162 from Self-Perfection/patch-1
Provide meaningful filenames for graphs
-rw-r--r--type/Base.class.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/type/Base.class.php b/type/Base.class.php
index 70b95b5..adb8fb1 100644
--- a/type/Base.class.php
+++ b/type/Base.class.php
@@ -245,10 +245,13 @@ class Type_Base {
245 if (is_numeric($this->cache) && $this->cache > 0) 245 if (is_numeric($this->cache) && $this->cache > 0)
246 header("Expires: " . date(DATE_RFC822,strtotime($this->cache." seconds"))); 246 header("Expires: " . date(DATE_RFC822,strtotime($this->cache." seconds")));
247 247
248 if ($style === 'svg') 248 if ($style === 'svg') {
249 header("content-type: image/svg+xml"); 249 header("content-type: image/svg+xml");
250 else 250 header('Content-Disposition: filename="' . $this->rrd_title . '.svg"');
251 } else {
251 header("content-type: image/png"); 252 header("content-type: image/png");
253 header('Content-Disposition: filename="' . $this->rrd_title . '.png"');
254 }
252 255
253 $shellcmd = array_merge( 256 $shellcmd = array_merge(
254 $this->rrd_graph_command($style), 257 $this->rrd_graph_command($style),