File: 06_one_datasource.patch

package info (click to toggle)
drraw 2.2b2-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,572 kB
  • sloc: perl: 4,183; sh: 31; makefile: 8
file content (16 lines) | stat: -rw-r--r-- 626 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Author: Christopher Odenbach <odenbach@uni-paderborn.de>
Last-Update: 2013-02-05
Bug-Debian: https://bugs.debian.org/699822
Description: Enable working with only one datasource

--- a/drraw.cgi
+++ b/drraw.cgi
@@ -4518,7 +4518,7 @@ sub DSNew
         $xml = new XML::Simple;
         $xml_file = $rrdfile;
         if ( $xml_file =~ s/rrd$/xml/g ) {
-            $data_xml = $xml->XMLin($xml_file);
+            $data_xml = $xml->XMLin($xml_file, ForceArray => 1);
             foreach $ds_xml ( @{$data_xml->{DATASOURCE}} ) {
                 if ( $DSname == $ds_xml->{DS} ) {
                     $DSname = $ds_xml->{NAME};