Index: trunk/extensions/SemanticResultFormats/Calendar/SRF_Calendar.php |
— | — | @@ -47,7 +47,8 @@ |
48 | 48 | $locations = array(); |
49 | 49 | // print all result rows |
50 | 50 | while ( $row = $res->getNext() ) { |
51 | | - $date = $title = $text = $color = ""; |
| 51 | + $dates = array(); |
| 52 | + $title = $text = $color = ""; |
52 | 53 | |
53 | 54 | if ($this->mTemplate != '') { // build template code |
54 | 55 | $this->hasTemplates = true; |
— | — | @@ -65,7 +66,7 @@ |
66 | 67 | $text .= $object->getShortText($outputmode, NULL); |
67 | 68 | } |
68 | 69 | if ($pr->getMode() == SMWPrintRequest::PRINT_PROP && $pr->getTypeID() == '_dat') { |
69 | | - $date = SRFCalendar::formatDateStr($object); |
| 70 | + $dates[] = SRFCalendar::formatDateStr($object); |
70 | 71 | } |
71 | 72 | } |
72 | 73 | } |
— | — | @@ -89,14 +90,14 @@ |
90 | 91 | $text .= $pr->getHTMLText($skin) . " " . $object->getShortText($outputmode, $skin); |
91 | 92 | } |
92 | 93 | if ($pr->getMode() == SMWPrintRequest::PRINT_PROP && $pr->getTypeID() == '_dat') { |
93 | | - $date = SRFCalendar::formatDateStr($object); |
| 94 | + $dates[] = SRFCalendar::formatDateStr($object); |
94 | 95 | } |
95 | 96 | } |
96 | 97 | } |
97 | 98 | if ($i > 1) |
98 | 99 | $text .= ")"; |
99 | 100 | } |
100 | | - if ($date != '') { |
| 101 | + if (count($dates) > 0) { |
101 | 102 | // handle the 'color=' value, whether it came |
102 | 103 | // from a compound query or a regular one |
103 | 104 | if (property_exists($row[0], 'display_options')) { |
— | — | @@ -104,7 +105,8 @@ |
105 | 106 | $color = $row[0]->display_options['color']; |
106 | 107 | } elseif (array_key_exists('color', $this->m_params)) |
107 | 108 | $color = $this->m_params['color']; |
108 | | - $events[] = array($title, $text, $date, $color); |
| 109 | + foreach ($dates as $date) |
| 110 | + $events[] = array($title, $text, $date, $color); |
109 | 111 | } |
110 | 112 | } |
111 | 113 | |