http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97803
Revision: 97803
Author: yaron
Date: 2011-09-22 08:15:04 +0000 (Thu, 22 Sep 2011)
Log Message:
-----------
Fix for r97791 - class_exists() check added for Page Schemas
Modified Paths:
--------------
trunk/extensions/SemanticForms/includes/SF_FormLinker.php
Modified: trunk/extensions/SemanticForms/includes/SF_FormLinker.php
===================================================================
--- trunk/extensions/SemanticForms/includes/SF_FormLinker.php 2011-09-22
07:30:22 UTC (rev 97802)
+++ trunk/extensions/SemanticForms/includes/SF_FormLinker.php 2011-09-22
08:15:04 UTC (rev 97803)
@@ -311,12 +311,14 @@
$default_forms = array();
$categories = SFUtils::getCategoriesForPage( $title );
foreach ( $categories as $category ) {
- // Check the Page Schema, if one exists.
- $psSchema = new PSSchema( $category );
- if ( $psSchema->isPSDefined() ) {
- $formName = SFPageSchemas::getFormName(
$psSchema );
- if ( !is_null( $formName ) ) {
- $default_forms[] = $formName;
+ if ( class_exists( 'PSSchema' ) ) {
+ // Check the Page Schema, if one exists.
+ $psSchema = new PSSchema( $category );
+ if ( $psSchema->isPSDefined() ) {
+ $formName =
SFPageSchemas::getFormName( $psSchema );
+ if ( !is_null( $formName ) ) {
+ $default_forms[] =
$formName;
+ }
}
}
$default_forms = array_merge( $default_forms,
self::getFormsThatPagePointsTo( $category, NS_CATEGORY, self::DEFAULT_FORM ) );
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs