From 6fe237a0beaab01d86a17216316bff0a64bf8b61 Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Sun, 10 Apr 2011 19:44:54 +0200 Subject: use tinstance for legend label when data_sources is not set by plugin --- type/Default.class.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'type') diff --git a/type/Default.class.php b/type/Default.class.php index 0930fe3..45c4458 100644 --- a/type/Default.class.php +++ b/type/Default.class.php @@ -195,8 +195,13 @@ class Type_Default { } # or one file with multiple data_sources else { - # use data_sources as sources - $sources = $this->data_sources; + if(is_array($this->data_sources) && count($this->data_sources)==1 && in_array('value', $this->data_sources)) { + # use tinstances as sources + $sources = $this->tinstances; + } else { + # use data_sources as sources + $sources = $this->data_sources; + } } $this->parse_ds_names($sources); return $sources; -- cgit v1.1