Index: trunk/extensions/SemanticCompoundQueries/SCQ_Settings.php |
— | — | @@ -1,47 +0,0 @@ |
2 | | -<?php |
3 | | -/** |
4 | | - * Initialization file for SemanticCompoundQueries |
5 | | - * |
6 | | - * @file |
7 | | - * @ingroup SemanticCompoundQueries |
8 | | - * @author Yaron Koren |
9 | | - */ |
10 | | - |
11 | | -if ( !defined( 'MEDIAWIKI' ) ) die(); |
12 | | - |
13 | | -define( 'SCQ_VERSION', '0.2.2' ); |
14 | | - |
15 | | -$wgExtensionCredits['parserhook'][] = array( |
16 | | - 'path' => __FILE__, |
17 | | - 'name' => 'Semantic Compound Queries', |
18 | | - 'version' => SCQ_VERSION, |
19 | | - 'author' => 'Yaron Koren', |
20 | | - 'url' => 'http://www.mediawiki.org/wiki/Extension:Semantic_Compound_Queries', |
21 | | - 'description' => 'A parser function that displays multiple semantic queries at the same time', |
22 | | - 'descriptionmsg' => 'semanticcompoundqueries-desc', |
23 | | -); |
24 | | - |
25 | | -$wgExtensionMessagesFiles['SemanticCompoundQueries'] = dirname( __FILE__ ) . '/SemanticCompoundQueries.i18n.php'; |
26 | | - |
27 | | - |
28 | | -$wgHooks['ParserFirstCallInit'][] = 'scqgRegisterParser'; |
29 | | -// FIXME: Can be removed when new style magic words are used (introduced in r52503) |
30 | | -$wgHooks['LanguageGetMagic'][] = 'scqgLanguageGetMagic'; |
31 | | - |
32 | | -$scqIP = $IP . '/extensions/SemanticCompoundQueries'; |
33 | | -$wgAutoloadClasses['SCQQueryProcessor'] = $scqIP . '/SCQ_QueryProcessor.php'; |
34 | | -$wgAutoloadClasses['SCQQueryResult'] = $scqIP . '/SCQ_QueryResult.php'; |
35 | | - |
36 | | -function scqgRegisterParser( &$parser ) { |
37 | | - $parser->setFunctionHook( 'compound_query', array( 'SCQQueryProcessor', 'doCompoundQuery' ) ); |
38 | | - return true; // always return true, in order not to stop MW's hook processing! |
39 | | -} |
40 | | - |
41 | | -// FIXME: Can be removed when new style magic words are used (introduced in r52503) |
42 | | -function scqgLanguageGetMagic( &$magicWords, $langCode = "en" ) { |
43 | | - switch ( $langCode ) { |
44 | | - default: |
45 | | - $magicWords['compound_query'] = array ( 0, 'compound_query' ); |
46 | | - } |
47 | | - return true; |
48 | | -} |
Index: trunk/extensions/SemanticCompoundQueries/SemanticCompoundQueries.php |
— | — | @@ -0,0 +1,47 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Initialization file for SemanticCompoundQueries |
| 5 | + * |
| 6 | + * @file |
| 7 | + * @ingroup SemanticCompoundQueries |
| 8 | + * @author Yaron Koren |
| 9 | + */ |
| 10 | + |
| 11 | +if ( !defined( 'MEDIAWIKI' ) ) die(); |
| 12 | + |
| 13 | +define( 'SCQ_VERSION', '0.2.2' ); |
| 14 | + |
| 15 | +$wgExtensionCredits['parserhook'][] = array( |
| 16 | + 'path' => __FILE__, |
| 17 | + 'name' => 'Semantic Compound Queries', |
| 18 | + 'version' => SCQ_VERSION, |
| 19 | + 'author' => 'Yaron Koren', |
| 20 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:Semantic_Compound_Queries', |
| 21 | + 'description' => 'A parser function that displays multiple semantic queries at the same time', |
| 22 | + 'descriptionmsg' => 'semanticcompoundqueries-desc', |
| 23 | +); |
| 24 | + |
| 25 | +$wgExtensionMessagesFiles['SemanticCompoundQueries'] = dirname( __FILE__ ) . '/SemanticCompoundQueries.i18n.php'; |
| 26 | + |
| 27 | + |
| 28 | +$wgHooks['ParserFirstCallInit'][] = 'scqgRegisterParser'; |
| 29 | +// FIXME: Can be removed when new style magic words are used (introduced in r52503) |
| 30 | +$wgHooks['LanguageGetMagic'][] = 'scqgLanguageGetMagic'; |
| 31 | + |
| 32 | +$scqIP = $IP . '/extensions/SemanticCompoundQueries'; |
| 33 | +$wgAutoloadClasses['SCQQueryProcessor'] = $scqIP . '/SCQ_QueryProcessor.php'; |
| 34 | +$wgAutoloadClasses['SCQQueryResult'] = $scqIP . '/SCQ_QueryResult.php'; |
| 35 | + |
| 36 | +function scqgRegisterParser( &$parser ) { |
| 37 | + $parser->setFunctionHook( 'compound_query', array( 'SCQQueryProcessor', 'doCompoundQuery' ) ); |
| 38 | + return true; // always return true, in order not to stop MW's hook processing! |
| 39 | +} |
| 40 | + |
| 41 | +// FIXME: Can be removed when new style magic words are used (introduced in r52503) |
| 42 | +function scqgLanguageGetMagic( &$magicWords, $langCode = "en" ) { |
| 43 | + switch ( $langCode ) { |
| 44 | + default: |
| 45 | + $magicWords['compound_query'] = array ( 0, 'compound_query' ); |
| 46 | + } |
| 47 | + return true; |
| 48 | +} |
Property changes on: trunk/extensions/SemanticCompoundQueries/SemanticCompoundQueries.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 49 | + native |