Index: trunk/extensions/SemanticForms/SemanticForms.php |
— | — | @@ -36,6 +36,10 @@ |
37 | 37 | |
38 | 38 | if ( !defined( 'MEDIAWIKI' ) ) die(); |
39 | 39 | |
| 40 | +if ( !defined( 'SMW_VERSION' ) ) { |
| 41 | + die( "ERROR: <a href=\"http://semantic-mediawiki.org\">Semantic MediaWiki</a> must be installed for Semantic Forms to run!" ); |
| 42 | +} |
| 43 | + |
40 | 44 | define( 'SF_VERSION', '2.2.1' ); |
41 | 45 | |
42 | 46 | $wgExtensionCredits[defined( 'SEMANTIC_EXTENSION_TYPE' ) ? 'semantic' : 'specialpage'][] = array( |
Index: trunk/extensions/SemanticForms/includes/SF_FormLinker.php |
— | — | @@ -28,10 +28,6 @@ |
29 | 29 | * in the wiki. |
30 | 30 | */ |
31 | 31 | static function getIncomingProperties( $title ) { |
32 | | - // produce a useful error message if SMW isn't installed |
33 | | - if ( ! function_exists( 'smwfGetStore' ) ) { |
34 | | - die( "ERROR: <a href=\"http://semantic-mediawiki.org\">Semantic MediaWiki</a> must be installed for Semantic Forms to run!" ); |
35 | | - } |
36 | 32 | $store = smwfGetStore(); |
37 | 33 | // SMW 1.6+ |
38 | 34 | if ( class_exists( 'SMWDataItem' ) ) { |
— | — | @@ -138,11 +134,6 @@ |
139 | 135 | |
140 | 136 | global $sfgContLang; |
141 | 137 | |
142 | | - // Produce a useful error message if SMW isn't installed. |
143 | | - if ( ! function_exists( 'smwfGetStore' ) ) { |
144 | | - die( "ERROR: <a href=\"http://semantic-mediawiki.org\">Semantic MediaWiki</a> must be installed for Semantic Forms to run!" ); |
145 | | - } |
146 | | - |
147 | 138 | $store = smwfGetStore(); |
148 | 139 | $subject = Title::makeTitleSafe( $page_namespace, $page_name ); |
149 | 140 | $form_names = SFUtils::getSMWPropertyValues( $store, $subject, $prop_smw_id ); |