Index: trunk/extensions/SemanticDrilldown/includes/SD_Filter.php |
— | — | @@ -11,6 +11,7 @@ |
12 | 12 | var $property; |
13 | 13 | var $is_relation; |
14 | 14 | var $category; |
| 15 | + var $time_period = NULL; |
15 | 16 | var $allowed_values; |
16 | 17 | var $possible_applied_filters = array(); |
17 | 18 | |
— | — | @@ -52,9 +53,13 @@ |
53 | 54 | } |
54 | 55 | } |
55 | 56 | $categories = sdfGetValuesForProperty($filter_name, SD_NS_FILTER, $sd_props[SD_SP_GETS_VALUES_FROM_CATEGORY], true, NS_CATEGORY); |
| 57 | + $time_periods = sdfGetValuesForProperty($filter_name, SD_NS_FILTER, $sd_props[SD_SP_USES_TIME_PERIOD], false, NS_MAIN); |
56 | 58 | if (count($categories) > 0) { |
57 | 59 | $f->category = $categories[0]; |
58 | 60 | $f->allowed_values = sdfGetCategoryChildren($f->category, false, 5); |
| 61 | + } elseif (count($time_periods) > 0) { |
| 62 | + $f->time_period = $time_periods[0]; |
| 63 | + $f->allowed_values = array(); |
59 | 64 | } else { |
60 | 65 | $values = sdfGetValuesForProperty($filter_name, SD_NS_FILTER, $sd_props[SD_SP_HAS_VALUE], false, NS_MAIN); |
61 | 66 | if (count($values) > 0) { |