Index: trunk/extensions/SemanticDrilldown/includes/SD_AppliedFilter.php |
— | — | @@ -21,11 +21,11 @@ |
22 | 22 | $af->search_term = str_replace('_', ' ', $search_term); |
23 | 23 | if ($lower_date != null) { |
24 | 24 | $af->lower_date = $lower_date; |
25 | | - $af->lower_date_string = sdfMonthToString($lower_date['month']) . " " . $lower_date['day'] . ", " . $lower_date['year']; |
| 25 | + $af->lower_date_string = SDUtils::monthToString($lower_date['month']) . " " . $lower_date['day'] . ", " . $lower_date['year']; |
26 | 26 | } |
27 | 27 | if ($upper_date != null) { |
28 | 28 | $af->upper_date = $upper_date; |
29 | | - $af->upper_date_string = sdfMonthToString($upper_date['month']) . " " . $upper_date['day'] . ", " . $upper_date['year']; |
| 29 | + $af->upper_date_string = SDUtils::monthToString($upper_date['month']) . " " . $upper_date['day'] . ", " . $upper_date['year']; |
30 | 30 | } |
31 | 31 | if (! is_array($values)) { |
32 | 32 | $values = array($values); |
— | — | @@ -148,7 +148,7 @@ |
149 | 149 | $res = $dbr->query($sql); |
150 | 150 | while ($row = $dbr->fetchRow($res)) { |
151 | 151 | if ($this->filter->time_period == wfMsg('sd_filter_month')) |
152 | | - $value_string = sdfMonthToString($row[1]) . " " . $row[0]; |
| 152 | + $value_string = SDUtils::monthToString($row[1]) . " " . $row[0]; |
153 | 153 | else |
154 | 154 | // why is trim() necessary here??? |
155 | 155 | $value_string = str_replace('_', ' ', trim($row[0])); |
— | — | @@ -194,7 +194,7 @@ |
195 | 195 | $res = $dbr->query($sql); |
196 | 196 | while ($row = $dbr->fetchRow($res)) { |
197 | 197 | if ($this->filter->time_period == wfMsg('sd_filter_month')) |
198 | | - $value_string = sdfMonthToString($row[1]) . " " . $row[0]; |
| 198 | + $value_string = SDUtils::monthToString($row[1]) . " " . $row[0]; |
199 | 199 | else |
200 | 200 | // why is trim() necessary here??? |
201 | 201 | $value_string = str_replace('_', ' ', trim($row[0])); |
Index: trunk/extensions/SemanticDrilldown/includes/SD_Filter.php |
— | — | @@ -20,7 +20,7 @@ |
21 | 21 | function load($filter_name) { |
22 | 22 | $f = new SDFilter(); |
23 | 23 | $f->name = $filter_name; |
24 | | - $properties_used = sdfGetValuesForProperty($filter_name, SD_NS_FILTER, '_SD_CP', SD_SP_COVERS_PROPERTY, SMW_NS_PROPERTY); |
| 24 | + $properties_used = SDUtils::getValuesForProperty($filter_name, SD_NS_FILTER, '_SD_CP', SD_SP_COVERS_PROPERTY, SMW_NS_PROPERTY); |
25 | 25 | if (count($properties_used) > 0) { |
26 | 26 | $f->property = $properties_used[0]; |
27 | 27 | } |
— | — | @@ -43,21 +43,21 @@ |
44 | 44 | } |
45 | 45 | } |
46 | 46 | } |
47 | | - $categories = sdfGetValuesForProperty($filter_name, SD_NS_FILTER, '_SD_VC', SD_SP_GETS_VALUES_FROM_CATEGORY, NS_CATEGORY); |
48 | | - $time_periods = sdfGetValuesForProperty($filter_name, SD_NS_FILTER, '_SD_TP', SD_SP_USES_TIME_PERIOD, null); |
| 47 | + $categories = SDUtils::getValuesForProperty($filter_name, SD_NS_FILTER, '_SD_VC', SD_SP_GETS_VALUES_FROM_CATEGORY, NS_CATEGORY); |
| 48 | + $time_periods = SDUtils::getValuesForProperty($filter_name, SD_NS_FILTER, '_SD_TP', SD_SP_USES_TIME_PERIOD, null); |
49 | 49 | if (count($categories) > 0) { |
50 | 50 | $f->category = $categories[0]; |
51 | | - $f->allowed_values = sdfGetCategoryChildren($f->category, false, 5); |
| 51 | + $f->allowed_values = SDUtils::getCategoryChildren($f->category, false, 5); |
52 | 52 | } elseif (count($time_periods) > 0) { |
53 | 53 | $f->time_period = $time_periods[0]; |
54 | 54 | $f->allowed_values = array(); |
55 | 55 | } elseif ($f->is_boolean) { |
56 | 56 | $f->allowed_values = array('0', '1'); |
57 | 57 | } else { |
58 | | - $values = sdfGetValuesForProperty($filter_name, SD_NS_FILTER, '_SD_V', SD_SP_HAS_VALUE, null); |
| 58 | + $values = SDUtils::getValuesForProperty($filter_name, SD_NS_FILTER, '_SD_V', SD_SP_HAS_VALUE, null); |
59 | 59 | $f->allowed_values = $values; |
60 | 60 | } |
61 | | - $input_types = sdfGetValuesForProperty($filter_name, SD_NS_FILTER, '_SD_IT', SD_SP_HAS_INPUT_TYPE, null); |
| 61 | + $input_types = SDUtils::getValuesForProperty($filter_name, SD_NS_FILTER, '_SD_IT', SD_SP_HAS_INPUT_TYPE, null); |
62 | 62 | if (count($input_types) > 0) { |
63 | 63 | $f->input_type = $input_types[0]; |
64 | 64 | } |
— | — | @@ -115,7 +115,7 @@ |
116 | 116 | while ($row = $dbr->fetchRow($res)) { |
117 | 117 | if ($this->time_period == wfMsg('sd_filter_month')) { |
118 | 118 | global $sdgMonthValues; |
119 | | - $date_string = sdfMonthToString($row[1]) . " " . $row[0]; |
| 119 | + $date_string = SDUtils::monthToString($row[1]) . " " . $row[0]; |
120 | 120 | $possible_dates[$date_string] = $row[2]; |
121 | 121 | } else { |
122 | 122 | $date_string = $row[0]; |
Index: trunk/extensions/SemanticDrilldown/includes/SD_FilterValue.php |
— | — | @@ -28,7 +28,7 @@ |
29 | 29 | if ($filter_time_period != null) { |
30 | 30 | if ($filter_time_period == wfMsg('sd_filter_month')) { |
31 | 31 | list($month_str, $year) = explode(' ', $fv->text); |
32 | | - $fv->month = sdfStringToMonth($month_str); |
| 32 | + $fv->month = SDUtils::stringToMonth($month_str); |
33 | 33 | $fv->year = $year; |
34 | 34 | } else { |
35 | 35 | $fv->year = $fv->text; |