Index: trunk/extensions/SemanticDrilldown/includes/SD_PageSchemas.php |
— | — | @@ -14,7 +14,7 @@ |
15 | 15 | * from the Page Schemas extension. |
16 | 16 | */ |
17 | 17 | public static function createPageSchemasObject( $objectName, $xmlForField, &$object ) { |
18 | | - $sdarray = array(); |
| 18 | + $sd_array = array(); |
19 | 19 | if ( $objectName != "semanticdrilldown_Filter" ) { |
20 | 20 | return true; |
21 | 21 | } |
— | — | @@ -27,12 +27,12 @@ |
28 | 28 | foreach ( $value->children() as $val ) { |
29 | 29 | $l_values[] = (string)$val; |
30 | 30 | } |
31 | | - $sdarray['Values'] = $l_values; |
| 31 | + $sd_array['Values'] = $l_values; |
32 | 32 | } else { |
33 | | - $sdarray[$prop] = (string)$value; |
| 33 | + $sd_array[$prop] = (string)$value; |
34 | 34 | } |
35 | 35 | } |
36 | | - $object['sd'] = $sdarray; |
| 36 | + $object['sd'] = $sd_array; |
37 | 37 | return true; |
38 | 38 | } |
39 | 39 | } |
— | — | @@ -57,7 +57,7 @@ |
58 | 58 | } |
59 | 59 | |
60 | 60 | if ( array_key_exists( 'Name', $filter_array ) ) { |
61 | | - $filterName = $filter_array['Name']; |
| 61 | + $filterName = $filter_array['Name']; |
62 | 62 | } else { |
63 | 63 | $filterName = ''; |
64 | 64 | } |
— | — | @@ -174,7 +174,9 @@ |
175 | 175 | if ( substr( $var, 0, 15 ) == 'sd_filter_name_' ) { |
176 | 176 | $xml = '<semanticdrilldown_Filter>'; |
177 | 177 | $fieldNum = substr( $var, 15 ); |
178 | | - $xml .= '<Name>'.$val.'</Name>'; |
| 178 | + if ( !empty( $val ) ) { |
| 179 | + $xml .= '<Name>' . $val . '</Name>'; |
| 180 | + } |
179 | 181 | } elseif ( substr( $var, 0, 17 ) == 'sd_values_source_') { |
180 | 182 | if ( $val == 'category' ) { |
181 | 183 | $xml .= '<ValuesFromCategory>' . $request->getText('sd_category_name_' . $fieldNum) . '</ValuesFromCategory>'; |