Index: trunk/extensions/SemanticDrilldown/includes/SD_Utils.php |
— | — | @@ -225,13 +225,14 @@ |
226 | 226 | foreach ( $filter_names as $filter_name ) { |
227 | 227 | $filters[] = SDFilter::load( $filter_name ); |
228 | 228 | } |
229 | | - //Code to read from the pageSchema and return filters |
230 | | - $pageSchemaObj = new PSSchema( $category ); |
231 | | - if($pageSchemaObj->isPSDefined()){ |
232 | | - //Assuming one Category has a single filter. |
233 | | - $filters_ps = SDFilter::loadAllFromPageSchema( $pageSchemaObj ); |
234 | | - $result_filters = array_merge($filters, $filters_ps); |
235 | | - return $result_filters; |
| 229 | + //Code to read from the pageSchema and return filters |
| 230 | + if ( class_exists( 'PSSchema' ) ) { |
| 231 | + $pageSchemaObj = new PSSchema( $category ); |
| 232 | + if($pageSchemaObj->isPSDefined()){ |
| 233 | + $filters_ps = SDFilter::loadAllFromPageSchema( $pageSchemaObj ); |
| 234 | + $result_filters = array_merge($filters, $filters_ps); |
| 235 | + return $result_filters; |
| 236 | + } |
236 | 237 | } |
237 | 238 | return $filters; |
238 | 239 | } |