summaryrefslogtreecommitdiffstats
path: root/modules-available/roomplanner/api.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/roomplanner/api.inc.php')
-rw-r--r--modules-available/roomplanner/api.inc.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/modules-available/roomplanner/api.inc.php b/modules-available/roomplanner/api.inc.php
index f964bea1..8ddb945c 100644
--- a/modules-available/roomplanner/api.inc.php
+++ b/modules-available/roomplanner/api.inc.php
@@ -1,16 +1,29 @@
<?php
+// SVG
if (Request::any('show') === 'svg') {
$ret = PvsGenerator::generateSvg(Request::any('locationid', false, 'int'),
Request::any('machineuuid', false, 'string'),
Request::any('rotate', 0, 'int'),
Request::any('scale', 1, 'float'));
if ($ret === false) {
- Header('HTTP/1.1 404 Not Found');
- exit;
+ if (Request::any('fallback', 0, 'int') === 0) {
+ Header('HTTP/1.1 404 Not Found');
+ exit;
+ }
+ $ret = <<<EOF
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 64 64" height="64" width="64">
+ <g>
+ <path d="M 0,0 64,64 Z" style="stroke:#ff0000;stroke-width:5" />
+ <path d="M 0,64 64,0 Z" style="stroke:#ff0000;stroke-width:5" />
+ </g>
+</svg>
+EOF;
}
Header('Content-Type: image/svg+xml');
die($ret);
}
+// PVS.ini
die(PvsGenerator::generate());