catch case where even color field of legend is empty: still detect it's a legend...
authorrobert <robert>
Thu, 9 Jun 2005 17:52:23 +0000 (17:52 +0000)
committerrobert <robert>
Thu, 9 Jun 2005 17:52:23 +0000 (17:52 +0000)
include/classes/rrdstat.php-class

index 4c5b4596bcc54c4bb3f3e35cac2dadf9b534745d..d384f9f3e0f387c4218da4e9947907656914f742 100644 (file)
@@ -744,7 +744,7 @@ class rrdstat {
       if (preg_match('/^file:(.+)$/', $gline, $regs)) {
         $gmeta['filename'] = $regs[1];
       }
-      elseif (preg_match('/^legend:([^\|]+)\|([^|]+)\|([^\|]*)\|(.*)$/', $gline, $regs)) {
+      elseif (preg_match('/^legend:([^\|]+)\|([^|]*)\|([^\|]*)\|(.*)$/', $gline, $regs)) {
         $gmeta['legend'][$regs[1]] = array('color'=>$regs[2], 'color_bg'=>$regs[3], 'desc_long'=>$regs[4]);
         if (strlen($regs[4])) { $gmeta['legends_long'] = true; }
         if (strlen($regs[3]) || strlen($regs[4])) { $gmeta['default_colorize'] = true; }