Index: trunk/extensions/SemanticForms/includes/SF_AutocompleteAPI.php |
— | — | @@ -117,7 +117,6 @@ |
118 | 118 | public static function getAllValuesForProperty($is_relation, $property_name, $substring = null) { |
119 | 119 | global $sfgMaxAutocompleteValues; |
120 | 120 | |
121 | | - $fname = "SFAutocompleteAPI::getAllValuesForProperty"; |
122 | 121 | $values = array(); |
123 | 122 | $db = wfGetDB( DB_SLAVE ); |
124 | 123 | $sql_options = array(); |
— | — | @@ -138,9 +137,8 @@ |
139 | 138 | $conditions .= " AND (REPLACE(LOWER(CONVERT($value_field USING utf8)),'_',' ') LIKE '" . $substring . "%' OR REPLACE(LOWER(CONVERT($value_field USING utf8)),'_',' ') LIKE '% " . $substring . "%')"; |
140 | 139 | } |
141 | 140 | $sql_options['ORDER BY'] = $value_field; |
142 | | - $res = $db->select( $from_clause, |
143 | | - "DISTINCT $value_field", |
144 | | - $conditions, $fname, $sql_options); |
| 141 | + $res = $db->select($from_clause, "DISTINCT $value_field", |
| 142 | + $conditions, __METHOD__, $sql_options); |
145 | 143 | while ($row = $db->fetchRow($res)) { |
146 | 144 | if ($substring != null) { |
147 | 145 | $values[] = array('title' => str_replace('_', ' ', $row[0])); |