Index: trunk/extensions/SemanticMediaWiki/includes/parserhooks/SMW_Info.php |
— | — | @@ -50,15 +50,6 @@ |
51 | 51 | /** |
52 | 52 | * No LSB in pre-5.3 PHP *sigh*. |
53 | 53 | * This is to be refactored as soon as php >=5.3 becomes acceptable. |
54 | | - */ |
55 | | - public static function staticMagic( array &$magicWords, $langCode ) { |
56 | | - $instance = new self; |
57 | | - return $instance->magic( $magicWords, $langCode ); |
58 | | - } |
59 | | - |
60 | | - /** |
61 | | - * No LSB in pre-5.3 PHP *sigh*. |
62 | | - * This is to be refactored as soon as php >=5.3 becomes acceptable. |
63 | 54 | */ |
64 | 55 | public static function staticInit( Parser &$parser ) { |
65 | 56 | $instance = new self; |
Index: trunk/extensions/SemanticMediaWiki/includes/parserhooks/SMW_SMWDoc.php |
— | — | @@ -27,15 +27,6 @@ |
28 | 28 | * No LSB in pre-5.3 PHP *sigh*. |
29 | 29 | * This is to be refactored as soon as php >=5.3 becomes acceptable. |
30 | 30 | */ |
31 | | - public static function staticMagic( array &$magicWords, $langCode ) { |
32 | | - $instance = new self; |
33 | | - return $instance->magic( $magicWords, $langCode ); |
34 | | - } |
35 | | - |
36 | | - /** |
37 | | - * No LSB in pre-5.3 PHP *sigh*. |
38 | | - * This is to be refactored as soon as php >=5.3 becomes acceptable. |
39 | | - */ |
40 | 31 | public static function staticInit( Parser &$parser ) { |
41 | 32 | $instance = new self; |
42 | 33 | return $instance->init( $parser ); |
— | — | @@ -231,5 +222,4 @@ |
232 | 223 | $key = array_shift( $args ); |
233 | 224 | return wfMsgReal( $key, $args, true, $this->language ); |
234 | 225 | } |
235 | | - |
236 | | -} |
\ No newline at end of file |
| 226 | +} |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php |
— | — | @@ -81,9 +81,7 @@ |
82 | 82 | $wgHooks['PageSchemasRegisterHandlers'][] = 'SMWHooks::onPageSchemasRegistration'; |
83 | 83 | |
84 | 84 | $wgHooks['ParserFirstCallInit'][] = 'SMWSMWDoc::staticInit'; |
85 | | - $wgHooks['LanguageGetMagic'][] = 'SMWSMWDoc::staticMagic'; |
86 | 85 | $wgHooks['ParserFirstCallInit'][] = 'SMWInfo::staticInit'; |
87 | | - $wgHooks['LanguageGetMagic'][] = 'SMWInfo::staticMagic'; |
88 | 86 | |
89 | 87 | $wgHooks['InternalParseBeforeLinks'][] = 'SMWParserExtensions::onInternalParseBeforeLinks'; // parse annotations in [[link syntax]] |
90 | 88 | $wgHooks['ArticleDelete'][] = 'SMWParseData::onArticleDelete'; // delete annotations |
Index: trunk/extensions/PipeEscape/PipeEscape.i18n.magic.php |
— | — | @@ -0,0 +1,10 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Internationalization file for magic words. |
| 5 | + */ |
| 6 | + |
| 7 | +$magicWords = array(); |
| 8 | + |
| 9 | +$magicWords['en'] = array( |
| 10 | + '!' => array( 0, '!' ), |
| 11 | +); |
Property changes on: trunk/extensions/PipeEscape/PipeEscape.i18n.magic.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 12 | + native |
Added: svn:keywords |
2 | 13 | + Id |
Index: trunk/extensions/PipeEscape/PipeEscape.php |
— | — | @@ -1,5 +1,4 @@ |
2 | 2 | <?php |
3 | | - |
4 | 3 | /** |
5 | 4 | * @file |
6 | 5 | * @ingroup Extensions |
— | — | @@ -35,8 +34,8 @@ |
36 | 35 | ); |
37 | 36 | |
38 | 37 | $dir = dirname(__FILE__) . DIRECTORY_SEPARATOR; |
39 | | -$wgExtensionMessagesFiles['Pipe Escape'] = $dir . 'PipeEscape.i18n.php'; |
40 | | -$wgHooks[ 'LanguageGetMagic' ][] = 'ExtPipeEsc::languageGetMagic'; |
| 38 | +$wgExtensionMessagesFiles['PipeEscape'] = $dir . 'PipeEscape.i18n.php'; |
| 39 | +$wgExtensionMessagesFiles['PipeEscapeMagic'] = $dir . 'PipeEscape.i18n.magic.php'; |
41 | 40 | |
42 | 41 | class ExtPipeEsc |
43 | 42 | { |
— | — | @@ -52,12 +51,6 @@ |
53 | 52 | return true; |
54 | 53 | } |
55 | 54 | |
56 | | - public static function languageGetMagic( &$magicWords, $langCode ) |
57 | | - { |
58 | | - $magicWords[ '!' ] = array( 0, '!' ); |
59 | | - return true; |
60 | | - } |
61 | | - |
62 | 55 | public static function pipeChar( &$parser, $frame, $args ) |
63 | 56 | { |
64 | 57 | $output = array_shift( $args ); |
— | — | @@ -78,4 +71,3 @@ |
79 | 72 | return trim( $output ); |
80 | 73 | } |
81 | 74 | } |
82 | | - |
Index: trunk/extensions/Translate/Translate.magic.php |
— | — | @@ -1,8 +1,11 @@ |
2 | 2 | <?php |
| 3 | +/** |
| 4 | + * Internationalization file for magic words. |
| 5 | + */ |
3 | 6 | |
4 | 7 | $magicWords = array(); |
5 | 8 | |
6 | 9 | /** English (English) */ |
7 | 10 | $magicWords['en'] = array( |
8 | 11 | 'translationdialog' => array( 0, 'translationdialog' ), |
9 | | -); |
\ No newline at end of file |
| 12 | +); |
Index: trunk/extensions/SemanticDrilldown/includes/SD_Utils.php |
— | — | @@ -6,7 +6,6 @@ |
7 | 7 | */ |
8 | 8 | |
9 | 9 | class SDUtils { |
10 | | - |
11 | 10 | /** |
12 | 11 | * Helper function to handle getPropertyValues() in both SMW 1.6 |
13 | 12 | * and earlier versions. |
— | — | @@ -417,18 +416,6 @@ |
418 | 417 | } |
419 | 418 | |
420 | 419 | /** |
421 | | - * Set the actual value of the magic words |
422 | | - */ |
423 | | - static function addMagicWordLanguage( &$magicWords, $langCode ) { |
424 | | - switch( $langCode ) { |
425 | | - default: |
426 | | - $magicWords['MAG_HIDEFROMDRILLDOWN'] = array( 0, '__HIDEFROMDRILLDOWN__' ); |
427 | | - $magicWords['MAG_SHOWINDRILLDOWN'] = array( 0, '__SHOWINDRILLDOWN__' ); |
428 | | - } |
429 | | - return true; |
430 | | - } |
431 | | - |
432 | | - /** |
433 | 420 | * Set values in the page_props table based on the presence of the |
434 | 421 | * 'HIDEFROMDRILLDOWN' and 'SHOWINDRILLDOWN' magic words in a page |
435 | 422 | */ |
Index: trunk/extensions/SemanticDrilldown/languages/SemanticDrilldown.i18n.magic.php |
— | — | @@ -0,0 +1,11 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Internationalization file for magic words. |
| 5 | + */ |
| 6 | + |
| 7 | +$magicWords = array(); |
| 8 | + |
| 9 | +$magicWords['en'] = array( |
| 10 | + 'MAG_HIDEFROMDRILLDOWN' => array( 0, '__HIDEFROMDRILLDOWN__' ), |
| 11 | + 'MAG_SHOWINDRILLDOWN' => array( 0, '__SHOWINDRILLDOWN__' ), |
| 12 | +); |
Property changes on: trunk/extensions/SemanticDrilldown/languages/SemanticDrilldown.i18n.magic.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 13 | + native |
Added: svn:keywords |
2 | 14 | + Id |
Index: trunk/extensions/SemanticDrilldown/SemanticDrilldown.php |
— | — | @@ -63,7 +63,6 @@ |
64 | 64 | $wgHooks['smwInitProperties'][] = 'sdfInitProperties'; |
65 | 65 | $wgHooks['AdminLinks'][] = 'SDUtils::addToAdminLinks'; |
66 | 66 | $wgHooks['MagicWordwgVariableIDs'][] = 'SDUtils::addMagicWordVariableIDs'; |
67 | | -$wgHooks['LanguageGetMagic'][] = 'SDUtils::addMagicWordLanguage'; |
68 | 67 | $wgHooks['ParserBeforeTidy'][] = 'SDUtils::handleShowAndHide'; |
69 | 68 | $wgHooks['PageSchemasRegisterHandlers'][] = 'SDPageSchemas::registerClass'; |
70 | 69 | |
— | — | @@ -262,4 +261,3 @@ |
263 | 262 | ), |
264 | 263 | ); |
265 | 264 | } |
266 | | - |
Index: trunk/extensions/PrivatePageProtection/PrivatePageProtection.i18n.magic.php |
— | — | @@ -0,0 +1,10 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Internationalization file for magic words. |
| 5 | + */ |
| 6 | + |
| 7 | +$magicWords = array(); |
| 8 | + |
| 9 | +$magicWords['en'] = array( |
| 10 | + 'allow-groups' => array( 0, 'allow-groups', 'allowed-groups', 'ppp' ), |
| 11 | +); |
Property changes on: trunk/extensions/PrivatePageProtection/PrivatePageProtection.i18n.magic.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 12 | + native |
Added: svn:keywords |
2 | 13 | + Id |
Index: trunk/extensions/PrivatePageProtection/PrivatePageProtection.php |
— | — | @@ -1,5 +1,4 @@ |
2 | 2 | <?php |
3 | | - |
4 | 3 | /** |
5 | 4 | * PrivatePageProtection extension - implements per page acccess restrictions based on user group. |
6 | 5 | * Which groups are authorized for viewing is defined on-page, using a parser function. |
— | — | @@ -40,9 +39,9 @@ |
41 | 40 | ); |
42 | 41 | |
43 | 42 | $wgExtensionMessagesFiles['PrivatePageProtection'] = dirname(__FILE__) . '/PrivatePageProtection.i18n.php'; |
| 43 | +$wgExtensionMessagesFiles['PrivatePageProtectionMagic'] = dirname(__FILE__) . '/PrivatePageProtection.i18n.magic.php'; |
44 | 44 | |
45 | 45 | $wgHooks['ParserFirstCallInit'][] = 'privateppParserFirstCallInit'; |
46 | | -$wgHooks['LanguageGetMagic'][] = 'privateppLanguageGetMagic'; |
47 | 46 | $wgHooks['getUserPermissionsErrorsExpensive'][] = 'privateppUserPermissionsErrors'; |
48 | 47 | $wgHooks['ArticleSave'][] = 'privateppArticleSave'; |
49 | 48 | |
— | — | @@ -54,15 +53,6 @@ |
55 | 54 | return true; |
56 | 55 | } |
57 | 56 | |
58 | | -// Tell MediaWiki which magic words can invoke the parser function. |
59 | | -function privateppLanguageGetMagic( &$magicWords, $langCode ) { |
60 | | - |
61 | | - // Add the magic words. |
62 | | - // If the first element of the array is 0, the magic word is case insensitive. |
63 | | - $magicWords['allow-groups'] = array( 0, 'allow-groups', 'allowed-groups', 'ppp' ); #TODO: i18n?! |
64 | | - return true; |
65 | | -} |
66 | | - |
67 | 57 | // Render the output of the parser function. |
68 | 58 | function privateppRenderTag( $parser, $param1 = '', $param2 = '' ) { |
69 | 59 | $args = func_get_args(); |
Index: trunk/extensions/SNMPquery/SNMPquery.i18n.magic.php |
— | — | @@ -0,0 +1,11 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Internationalization file for magic words. |
| 5 | + */ |
| 6 | + |
| 7 | +$magicWords = array(); |
| 8 | + |
| 9 | +$magicWords['en'] = array( |
| 10 | + 'snmpget' => array( 0, 'snmpget' ), |
| 11 | + 'snmpwalk' => array( 0, 'snmpwalk' ), |
| 12 | +); |
Property changes on: trunk/extensions/SNMPquery/SNMPquery.i18n.magic.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 13 | + native |
Added: svn:keywords |
2 | 14 | + Id |
Index: trunk/extensions/SNMPquery/SNMPquery.php |
— | — | @@ -31,19 +31,11 @@ |
32 | 32 | |
33 | 33 | $dir = dirname( __FILE__ ); |
34 | 34 | $wgExtensionMessagesFiles['SNMPquery'] = $dir . '/SNMPquery.i18n.php'; |
| 35 | +$wgExtensionMessagesFiles['SNMPqueryMagic'] = $dir . '/SNMPquery.i18n.magic.php'; |
35 | 36 | |
36 | 37 | # Define a setup function |
37 | 38 | $wgHooks['ParserFirstCallInit'][] = 'SNMP_Setup'; |
38 | 39 | |
39 | | -# Add a hook to initialise the magic word |
40 | | -$wgHooks['LanguageGetMagic'][] = 'SNMP_Magic'; |
41 | | - |
42 | | -function SNMP_Magic( &$magicWords, $langCode ) { |
43 | | - $magicWords['snmpget'] = array( 0, 'snmpget' ); |
44 | | - $magicWords['snmpwalk'] = array( 0, 'snmpwalk' ); |
45 | | - return true; |
46 | | -} |
47 | | - |
48 | 40 | function SNMP_Setup() { |
49 | 41 | global $wgParser; |
50 | 42 | # Set a function hook associating the "example" magic word with our function |
Index: trunk/extensions/Ratings/Ratings.i18n.magic.php |
— | — | @@ -0,0 +1,12 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Internationalization file for magic words. |
| 5 | + */ |
| 6 | + |
| 7 | +$magicWords = array(); |
| 8 | + |
| 9 | +$magicWords['en'] = array( |
| 10 | + 'allrating' => array( 0, 'allrating' ), |
| 11 | + 'starrating' => array( 0, 'starrating' ), |
| 12 | + 'votesummary' => array( 0, 'votesummary' ), |
| 13 | +); |
Property changes on: trunk/extensions/Ratings/Ratings.i18n.magic.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 14 | + native |
Added: svn:keywords |
2 | 15 | + Id |
Index: trunk/extensions/Ratings/votesummary/RatingsVoteSummary.php |
— | — | @@ -12,20 +12,10 @@ |
13 | 13 | * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
14 | 14 | */ |
15 | 15 | final class RatingsVoteSummary extends ParserHook { |
16 | | - |
17 | 16 | /** |
18 | 17 | * No LSB in pre-5.3 PHP *sigh*. |
19 | 18 | * This is to be refactored as soon as php >=5.3 becomes acceptable. |
20 | 19 | */ |
21 | | - public static function staticMagic( array &$magicWords, $langCode ) { |
22 | | - $instance = new self; |
23 | | - return $instance->magic( $magicWords, $langCode ); |
24 | | - } |
25 | | - |
26 | | - /** |
27 | | - * No LSB in pre-5.3 PHP *sigh*. |
28 | | - * This is to be refactored as soon as php >=5.3 becomes acceptable. |
29 | | - */ |
30 | 20 | public static function staticInit( Parser &$parser ) { |
31 | 21 | $instance = new self; |
32 | 22 | return $instance->init( $parser ); |
Index: trunk/extensions/Ratings/Ratings.php |
— | — | @@ -54,6 +54,7 @@ |
55 | 55 | $egRatingsScriptPath = $wgExtensionAssetsPath === false ? $wgScriptPath . '/extensions/Ratings' : $wgExtensionAssetsPath . '/Ratings'; |
56 | 56 | |
57 | 57 | $wgExtensionMessagesFiles['Ratings'] = dirname( __FILE__ ) . '/Ratings.i18n.php'; |
| 58 | +$wgExtensionMessagesFiles['RatingsMagic'] = dirname( __FILE__ ) . '/Ratings.i18n.magic.php'; |
58 | 59 | |
59 | 60 | $wgAutoloadClasses['ApiDoRating'] = dirname( __FILE__ ) . '/api/ApiDoRating.php'; |
60 | 61 | $wgAutoloadClasses['ApiQueryRatings'] = dirname( __FILE__ ) . '/api/ApiQueryRatings.php'; |
— | — | @@ -64,17 +65,14 @@ |
65 | 66 | $wgAutoloadClasses['RatingsStars'] = dirname( __FILE__ ) . '/starrating/RatingsStars.php'; |
66 | 67 | |
67 | 68 | $wgHooks['ParserFirstCallInit'][] = 'RatingsStars::staticInit'; |
68 | | -$wgHooks['LanguageGetMagic'][] = 'RatingsStars::staticMagic'; |
69 | 69 | |
70 | 70 | $wgAutoloadClasses['RatingsAllRating'] = dirname( __FILE__ ) . '/allrating/RatingsAllRating.php'; |
71 | 71 | |
72 | 72 | $wgHooks['ParserFirstCallInit'][] = 'RatingsAllRating::staticInit'; |
73 | | -$wgHooks['LanguageGetMagic'][] = 'RatingsAllRating::staticMagic'; |
74 | 73 | |
75 | 74 | $wgAutoloadClasses['RatingsVoteSummary'] = dirname( __FILE__ ) . '/votesummary/RatingsVoteSummary.php'; |
76 | 75 | |
77 | 76 | $wgHooks['ParserFirstCallInit'][] = 'RatingsVoteSummary::staticInit'; |
78 | | -$wgHooks['LanguageGetMagic'][] = 'RatingsVoteSummary::staticMagic'; |
79 | 77 | |
80 | 78 | $wgAutoloadClasses['Ratings'] = dirname( __FILE__ ) . '/Ratings.class.php'; |
81 | 79 | $wgAutoloadClasses['RatingsHooks'] = dirname( __FILE__ ) . '/Ratings.hooks.php'; |
Index: trunk/extensions/Ratings/allrating/RatingsAllRating.php |
— | — | @@ -12,20 +12,10 @@ |
13 | 13 | * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
14 | 14 | */ |
15 | 15 | final class RatingsAllRating extends ParserHook { |
16 | | - |
17 | 16 | /** |
18 | 17 | * No LSB in pre-5.3 PHP *sigh*. |
19 | 18 | * This is to be refactored as soon as php >=5.3 becomes acceptable. |
20 | 19 | */ |
21 | | - public static function staticMagic( array &$magicWords, $langCode ) { |
22 | | - $instance = new self; |
23 | | - return $instance->magic( $magicWords, $langCode ); |
24 | | - } |
25 | | - |
26 | | - /** |
27 | | - * No LSB in pre-5.3 PHP *sigh*. |
28 | | - * This is to be refactored as soon as php >=5.3 becomes acceptable. |
29 | | - */ |
30 | 20 | public static function staticInit( Parser &$parser ) { |
31 | 21 | $instance = new self; |
32 | 22 | return $instance->init( $parser ); |
Index: trunk/extensions/Ratings/starrating/RatingsStars.php |
— | — | @@ -12,20 +12,10 @@ |
13 | 13 | * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
14 | 14 | */ |
15 | 15 | final class RatingsStars extends ParserHook { |
16 | | - |
17 | 16 | /** |
18 | 17 | * No LSB in pre-5.3 PHP *sigh*. |
19 | 18 | * This is to be refactored as soon as php >=5.3 becomes acceptable. |
20 | 19 | */ |
21 | | - public static function staticMagic( array &$magicWords, $langCode ) { |
22 | | - $instance = new self; |
23 | | - return $instance->magic( $magicWords, $langCode ); |
24 | | - } |
25 | | - |
26 | | - /** |
27 | | - * No LSB in pre-5.3 PHP *sigh*. |
28 | | - * This is to be refactored as soon as php >=5.3 becomes acceptable. |
29 | | - */ |
30 | 20 | public static function staticInit( Parser &$parser ) { |
31 | 21 | $instance = new self; |
32 | 22 | return $instance->init( $parser ); |
Index: trunk/extensions/SemanticInternalObjects/SemanticInternalObjects.php |
— | — | @@ -21,7 +21,6 @@ |
22 | 22 | ); |
23 | 23 | |
24 | 24 | $wgHooks['ParserFirstCallInit'][] = 'siofRegisterParserFunctions'; |
25 | | -$wgHooks['LanguageGetMagic'][] = 'siofLanguageGetMagic'; |
26 | 25 | $wgHooks['ParserClearState'][] = 'SIOHandler::clearState'; |
27 | 26 | $wgHooks['SMWSQLStore2::updateDataAfter'][] = 'SIOHandler::updateData'; |
28 | 27 | $wgHooks['SMWSQLStore2::deleteSubjectAfter'][] = 'SIOHandler::deleteData'; |
— | — | @@ -49,12 +48,3 @@ |
50 | 49 | $parser->setFunctionHook( 'set_internal_recurring_event', array( 'SIOHandler', 'doSetInternalRecurringEvent' ) ); |
51 | 50 | return true; // always return true, in order not to stop MW's hook processing! |
52 | 51 | } |
53 | | - |
54 | | -function siofLanguageGetMagic( &$magicWords, $langCode = 'en' ) { |
55 | | - switch ( $langCode ) { |
56 | | - default: |
57 | | - // Not in i18n file, so remains for now... |
58 | | - $magicWords['set_internal_recurring_event'] = array ( 0, 'set_internal_recurring_event' ); |
59 | | - } |
60 | | - return true; |
61 | | -} |
Index: trunk/extensions/SemanticInternalObjects/SemanticInternalObjects.i18n.magic.php |
— | — | @@ -8,6 +8,7 @@ |
9 | 9 | /** English (English) */ |
10 | 10 | $magicWords['en'] = array( |
11 | 11 | 'set_internal' => array( 0, 'set_internal' ), |
| 12 | + 'set_internal_recurring_event' => array( 0, 'set_internal_recurring_event' ), |
12 | 13 | ); |
13 | 14 | |
14 | 15 | /** Arabic (العربية) */ |
Index: trunk/extensions/RecordAdmin/RecordAdmin.i18n.magic.php |
— | — | @@ -0,0 +1,11 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Internationalization file for magic words. |
| 5 | + */ |
| 6 | + |
| 7 | +$magicWords = array(); |
| 8 | + |
| 9 | +$magicWords['en'] = array( |
| 10 | + 'recorddata' => array( 0, 'recorddata' ), |
| 11 | + 'recordtable' => array( 0, 'recordtable' ), |
| 12 | +); |
Property changes on: trunk/extensions/RecordAdmin/RecordAdmin.i18n.magic.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 13 | + native |
Added: svn:keywords |
2 | 14 | + Id |
Index: trunk/extensions/RecordAdmin/RecordAdmin_body.php |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | <?php |
3 | | -class RecordAdmin { |
4 | 3 | |
| 4 | +class RecordAdmin { |
5 | 5 | var $form = ''; |
6 | 6 | var $formClass = ''; |
7 | 7 | var $formAtts = ''; |
— | — | @@ -16,7 +16,7 @@ |
17 | 17 | |
18 | 18 | function __construct() { |
19 | 19 | global $wgHooks, $wgParser, $wgRequest, $wgRecordAdminTag, $wgRecordAdminCategory, |
20 | | - $wgRecordAdminTag, $wgRecordAdminTableMagic, $wgRecordAdminDataMagic; |
| 20 | + $wgRecordAdminTag; |
21 | 21 | |
22 | 22 | # Name to use for creating a new record either via RecordAdmin or a public form |
23 | 23 | $this->guid(); |
— | — | @@ -25,8 +25,8 @@ |
26 | 26 | $wgParser->setHook( $wgRecordAdminTag, array( $this, 'expandTag' ) ); |
27 | 27 | |
28 | 28 | # Add the parser-functions |
29 | | - $wgParser->setFunctionHook( $wgRecordAdminTableMagic, array( $this, 'expandTableMagic' ) ); |
30 | | - $wgParser->setFunctionHook( $wgRecordAdminDataMagic, array( $this, 'expandDataMagic' ) ); |
| 29 | + $wgParser->setFunctionHook( 'recordtable', array( $this, 'expandTableMagic' ) ); |
| 30 | + $wgParser->setFunctionHook( 'recorddata', array( $this, 'expandDataMagic' ) ); |
31 | 31 | |
32 | 32 | # Add the hooks to handle cache invalidation and edit-forms |
33 | 33 | $wgHooks['BeforePageDisplay'][] = $this; |
— | — | @@ -926,7 +926,6 @@ |
927 | 927 | } |
928 | 928 | } |
929 | 929 | |
930 | | - |
931 | 930 | /** |
932 | 931 | * Render a record search in a parser-function |
933 | 932 | */ |
— | — | @@ -979,7 +978,6 @@ |
980 | 979 | return array( $table, 'noparse' => true, 'isHTML' => true ); |
981 | 980 | } |
982 | 981 | |
983 | | - |
984 | 982 | /** |
985 | 983 | * Obtain a record or record field value from passed parameters |
986 | 984 | */ |
— | — | @@ -995,7 +993,6 @@ |
996 | 994 | return self::getFieldValue( $args ); |
997 | 995 | } |
998 | 996 | |
999 | | - |
1000 | 997 | /** |
1001 | 998 | * If a record was created by a public form, make last 5 digits of ID available via a tag |
1002 | 999 | */ |
— | — | @@ -1004,7 +1001,6 @@ |
1005 | 1002 | return $this->guid ? substr( $this->guid, -5 ) : ''; |
1006 | 1003 | } |
1007 | 1004 | |
1008 | | - |
1009 | 1005 | /** |
1010 | 1006 | * Generate a guid - check $wgRecordAdminGuidFormat array for specialised formats |
1011 | 1007 | */ |
— | — | @@ -1012,7 +1008,6 @@ |
1013 | 1009 | return $this->guid = strftime( '%Y%m%d', time() ) . '-' . substr( strtoupper( uniqid('', true) ), -5 ); |
1014 | 1010 | } |
1015 | 1011 | |
1016 | | - |
1017 | 1012 | /** |
1018 | 1013 | * Create DB table for caching queries |
1019 | 1014 | */ |
— | — | @@ -1025,5 +1020,4 @@ |
1026 | 1021 | $dbw->freeResult( $result ); |
1027 | 1022 | } |
1028 | 1023 | } |
1029 | | - |
1030 | 1024 | } |
Index: trunk/extensions/RecordAdmin/RecordAdmin.php |
— | — | @@ -10,17 +10,16 @@ |
11 | 11 | * @author Siebrand Mazeland |
12 | 12 | * @licence GNU General Public Licence 2.0 or later |
13 | 13 | */ |
14 | | -define( 'RECORDADMIN_VERSION', '1.3.5, 2011-09-29' ); |
| 14 | +define( 'RECORDADMIN_VERSION', '1.4.0, 2012-01-19' ); |
15 | 15 | |
16 | 16 | $wgRecordAdminExtPath = preg_replace( "|^.*(/extensions/.*$)|", "$wgScriptPath$1", dirname( __FILE__ ) ); |
17 | 17 | |
18 | 18 | $dir = dirname( __FILE__ ) . '/'; |
19 | 19 | $wgExtensionMessagesFiles['RecordAdmin'] = $dir . 'RecordAdmin.i18n.php'; |
20 | 20 | $wgExtensionMessagesFiles['RecordAdminAlias'] = $dir . 'RecordAdmin.alias.php'; |
21 | | -$wgAutoloadClasses['RecordAdmin'] = $dir . 'RecordAdmin_body.php'; |
| 21 | +$wgExtensionMessagesFiles['RecordAdminMagic'] = $dir . 'RecordAdmin.i18n.magic.php'; |
| 22 | +$wgAutoloadClasses['RecordAdmin'] = $dir . 'RecordAdmin_body.php'; |
22 | 23 | |
23 | | -$wgRecordAdminTableMagic = 'recordtable'; |
24 | | -$wgRecordAdminDataMagic = 'recorddata'; |
25 | 24 | $wgRecordAdminTag = 'recordid'; |
26 | 25 | |
27 | 26 | $wgGroupPermissions['sysop']['recordadmin'] = true; |
— | — | @@ -49,11 +48,3 @@ |
50 | 49 | |
51 | 50 | $wgRecordAdmin = new RecordAdmin(); |
52 | 51 | } |
53 | | - |
54 | | -$wgHooks['LanguageGetMagic'][] = 'wfRecordAdminLanguageGetMagic'; |
55 | | -function wfRecordAdminLanguageGetMagic( &$magicWords, $langCode = 0 ) { |
56 | | - global $wgRecordAdminTableMagic, $wgRecordAdminDataMagic; |
57 | | - $magicWords[$wgRecordAdminTableMagic] = array( $langCode, $wgRecordAdminTableMagic ); |
58 | | - $magicWords[$wgRecordAdminDataMagic] = array( $langCode, $wgRecordAdminDataMagic ); |
59 | | - return true; |
60 | | -} |
Index: trunk/extensions/PureWikiDeletion/PureWikiDeletion.i18n.magic.php |
— | — | @@ -0,0 +1,11 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Internationalization file for magic words. |
| 5 | + */ |
| 6 | + |
| 7 | +$magicWords = array(); |
| 8 | + |
| 9 | +$magicWords['en'] = array( |
| 10 | + 'ifblank' => array( 0, 'ifblank' ), |
| 11 | + 'ifnotblank' => array( 0, 'ifnotblank' ), |
| 12 | +); |
Property changes on: trunk/extensions/PureWikiDeletion/PureWikiDeletion.i18n.magic.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 13 | + native |
Added: svn:keywords |
2 | 14 | + Id |
Index: trunk/extensions/PureWikiDeletion/PureWikiDeletion.php |
— | — | @@ -31,7 +31,7 @@ |
32 | 32 | 'author' => 'Tisane', |
33 | 33 | 'url' => 'https://www.mediawiki.org/wiki/Extension:PureWikiDeletion', |
34 | 34 | 'descriptionmsg' => 'purewikideletion-desc', |
35 | | - 'version' => '1.0.5', |
| 35 | + 'version' => '1.1.0', |
36 | 36 | ); |
37 | 37 | |
38 | 38 | $dir = dirname( __FILE__ ) . '/'; |
— | — | @@ -44,6 +44,7 @@ |
45 | 45 | $wgAutoloadClasses['PopulateBlankedPagesTable'] = "$dir/SpecialPureWikiDeletion.php"; |
46 | 46 | $wgExtensionMessagesFiles['PureWikiDeletion'] = $dir . 'PureWikiDeletion.i18n.php'; |
47 | 47 | $wgExtensionMessagesFiles['PureWikiDeletionAlias'] = $dir . 'PureWikiDeletion.alias.php'; |
| 48 | +$wgExtensionMessagesFiles['PureWikiDeletionMagic'] = $dir . 'PureWikiDeletion.i18n.magic.php'; |
48 | 49 | |
49 | 50 | $wgHooks['LoadExtensionSchemaUpdates'][] = 'PureWikiDeletionHooks::PureWikiDeletionCreateTable'; |
50 | 51 | $wgHooks['ArticleSaveComplete'][] = 'PureWikiDeletionHooks::PureWikiDeletionSaveCompleteHook'; |
— | — | @@ -54,7 +55,6 @@ |
55 | 56 | $wgHooks['ArticleUndelete'][] = 'PureWikiDeletionHooks::PureWikiDeletionUndeleteHook'; |
56 | 57 | $wgHooks['GetPreferences'][] = 'PureWikiDeletionGetPreferences'; |
57 | 58 | $wgHooks['ParserFirstCallInit'][] = 'PureWikiDeletionHooks::efPureWikiDeletionParserFunction_Setup'; |
58 | | -$wgHooks['LanguageGetMagic'][] = 'PureWikiDeletionHooks::efPureWikiDeletionParserFunction_Magic'; |
59 | 59 | $wgHooks['AlternateEdit'][] = 'PureWikiDeletionAlternateEditHook'; |
60 | 60 | $wgHooks['OutputPageParserOutput'][] = 'PureWikiDeletionHooks::PureWikiDeletionOutputPageParserOutputHook'; |
61 | 61 | |
— | — | @@ -164,4 +164,4 @@ |
165 | 165 | } |
166 | 166 | $wgOut->showErrorPage( 'purewikideletion-blanknologin', 'purewikideletion-unblanknologintext' ); |
167 | 167 | return false; |
168 | | -} |
\ No newline at end of file |
| 168 | +} |
Index: trunk/extensions/PureWikiDeletion/PureWikiDeletion.hooks.php |
— | — | @@ -1,14 +1,6 @@ |
2 | 2 | <?php |
3 | | -if ( !defined( 'MEDIAWIKI' ) ) { |
4 | | - echo <<<EOT |
5 | | -To install the Pure Wiki Deletion extension, put the following line in LocalSettings.php: |
6 | | -require_once( "\$IP/extensions/PureWikiDeletion/PureWikiDeletion.php" ); |
7 | | -EOT; |
8 | | - exit( 1 ); |
9 | | -} |
10 | 3 | |
11 | 4 | class PureWikiDeletionHooks { |
12 | | - |
13 | 5 | /** |
14 | 6 | * When a user visits the URL of a blanked page, redirect to the edit page |
15 | 7 | */ |
— | — | @@ -235,17 +227,6 @@ |
236 | 228 | return true; |
237 | 229 | } |
238 | 230 | |
239 | | - public static function efPureWikiDeletionParserFunction_Magic( &$magicWords, $langCode ) { |
240 | | - # Add the magic word |
241 | | - # The first array element is whether to be case sensitive, in this case (0) it is not case |
242 | | - # sensitive, 1 would be sensitive. All remaining elements are synonyms for our parser |
243 | | - # function |
244 | | - $magicWords['ifnotblank'] = array( 0, 'ifnotblank' ); |
245 | | - $magicWords['ifblank'] = array( 0, 'ifblank' ); |
246 | | - # unless we return true, other parser functions extensions won't get loaded. |
247 | | - return true; |
248 | | - } |
249 | | - |
250 | 231 | public static function efPureWikiDeletionParserFunction_RenderBlank( $parser, $param1 = '', $param2 = '', $param3 = '' ) { |
251 | 232 | return PureWikiDeletionHooks::evaluateBlankness ( $parser, $param1, $param2, $param3 ); |
252 | 233 | } |
Index: trunk/extensions/ParserFun/includes/PFun_Caller.php |
— | — | @@ -19,14 +19,6 @@ |
20 | 20 | |
21 | 21 | /** |
22 | 22 | * No LSB in pre-5.3 PHP, to be refactored later |
23 | | - */ |
24 | | - public static function staticMagic( array &$magicWords, $langCode ) { |
25 | | - $instance = new self; |
26 | | - return $instance->magic( $magicWords, $langCode ); |
27 | | - } |
28 | | - |
29 | | - /** |
30 | | - * No LSB in pre-5.3 PHP, to be refactored later |
31 | 23 | */ |
32 | 24 | public static function staticInit( Parser &$parser ) { |
33 | 25 | global $egParserFunEnabledFunctions; |
Index: trunk/extensions/ParserFun/includes/PFun_This.php |
— | — | @@ -2,16 +2,16 @@ |
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Class for the 'THIS' variable/parser function. |
6 | | - * |
| 6 | + * |
7 | 7 | * @since 0.2 (in 'ExtParserFun' class before) |
8 | | - * |
| 8 | + * |
9 | 9 | * @file PFun_This.php |
10 | 10 | * @ingroup ParserFun |
11 | | - * |
| 11 | + * |
12 | 12 | * @author Daniel Werner |
13 | 13 | */ |
14 | 14 | class ParserFunThis { |
15 | | - |
| 15 | + |
16 | 16 | /** |
17 | 17 | * Magic word 'THIS:' to return certain information about the page the word actually is defined on |
18 | 18 | */ |
— | — | @@ -20,21 +20,21 @@ |
21 | 21 | if( $frame === null || $frame->title === null ) { |
22 | 22 | return ''; |
23 | 23 | } |
24 | | - |
| 24 | + |
25 | 25 | // get part behind 'THIS:' if only 'THIS', use 'FULLPAGENAME' |
26 | 26 | $index = isset( $args[0] ) ? trim( $frame->expand( $args[0] ) ) : ''; |
27 | | - |
| 27 | + |
28 | 28 | $newArgs = array(); |
29 | | - |
| 29 | + |
30 | 30 | if( $index !== '' ) { |
31 | 31 | // clean up arguments as if first argument never were set: |
32 | | - unset( $args[0] ); |
| 32 | + unset( $args[0] ); |
33 | 33 | foreach( $args as $arg ) { |
34 | 34 | $newArgs[] = $arg; |
35 | 35 | } |
36 | | - |
| 36 | + |
37 | 37 | // get magic word ID of the variable name: |
38 | | - $mwId = self::getVariablesMagicWordId( $parser, $index ); |
| 38 | + $mwId = self::getVariablesMagicWordId( $parser, $index ); |
39 | 39 | if( $mwId === null ) { |
40 | 40 | // requested variable doesn't exist, make the thing a template call |
41 | 41 | return array( null, 'found' => false ); |
— | — | @@ -44,32 +44,31 @@ |
45 | 45 | // if only '{{THIS}}', set magic word id to 'FULLPAGENAME' |
46 | 46 | $mwId = 'fullpagename'; |
47 | 47 | } |
48 | | - |
| 48 | + |
49 | 49 | // get value: |
50 | | - $out = self::getThisVariableValue( $mwId, $parser, $frame, $newArgs ); |
| 50 | + $out = self::getThisVariableValue( $mwId, $parser, $frame, $newArgs ); |
51 | 51 | if( $out === null ) { |
52 | 52 | // requested variable doesn't support 'THIS:', make the thing a template call |
53 | 53 | return array( null, 'found' => false ); |
54 | 54 | } |
55 | | - |
| 55 | + |
56 | 56 | return $out; |
57 | | - |
58 | 57 | } |
59 | | - |
| 58 | + |
60 | 59 | /** |
61 | 60 | * Returns the magic word ID for a variable like the user would write it. Returns null in case there |
62 | 61 | * is no word for the given variables name. |
63 | | - * |
| 62 | + * |
64 | 63 | * @param Parser $parser |
65 | 64 | * @param type $word |
66 | | - * |
| 65 | + * |
67 | 66 | * @return string|null |
68 | 67 | */ |
69 | 68 | static function getVariablesMagicWordId( Parser $parser, $word ) { |
70 | 69 | // get all local (including translated) magic words IDs (values) with their actual literals (keys) |
71 | 70 | // for case insensitive [0] and sensitive [1] |
72 | 71 | $magicWords = $parser->mVariables->getHash(); |
73 | | - |
| 72 | + |
74 | 73 | if( array_key_exists( strtolower( $word ), $magicWords[0] ) ) { |
75 | 74 | // case insensitive word match |
76 | 75 | $mwId = $magicWords[0][ strtolower( $word ) ]; |
— | — | @@ -80,32 +79,31 @@ |
81 | 80 | } |
82 | 81 | else { |
83 | 82 | // requested magic word doesn't exist for variables |
84 | | - |
85 | 83 | return null; |
86 | 84 | } |
87 | 85 | return $mwId; |
88 | 86 | } |
89 | | - |
| 87 | + |
90 | 88 | /** |
91 | 89 | * Returns the value of a variable like '{{FULLPAGENAME}}' in the context of the given PPFrame objects |
92 | 90 | * $frame->$title instead of the Parser objects subject. Returns null in case the requested variable |
93 | 91 | * does not support '{{THIS:}}'. |
94 | | - * |
| 92 | + * |
95 | 93 | * @param string $mwId magic word ID of the variable |
96 | 94 | * @param Parser $parser |
97 | 95 | * @param PPFrame $frame |
98 | 96 | * @param array $args |
99 | | - * |
| 97 | + * |
100 | 98 | * @return string|null |
101 | 99 | */ |
102 | | - static function getThisVariableValue( $mwId, Parser &$parser, $frame, $args = array() ) { |
| 100 | + static function getThisVariableValue( $mwId, Parser &$parser, $frame, $args = array() ) { |
103 | 101 | $ret = null; |
104 | 102 | $title = $frame->title; |
105 | | - |
| 103 | + |
106 | 104 | if( $title === null ) { |
107 | 105 | return null; |
108 | 106 | } |
109 | | - |
| 107 | + |
110 | 108 | // check whether info is available, e.g. 'THIS:FULLPAGENAME' requires 'FULLPAGENAME' |
111 | 109 | switch( $mwId ) { |
112 | 110 | case 'namespace': |
— | — | @@ -133,15 +131,14 @@ |
134 | 132 | case 'subjectspacee': |
135 | 133 | case 'talkspace': |
136 | 134 | case 'talkspacee': |
137 | | - // core parser function information requested |
| 135 | + // core parser function information requested |
138 | 136 | $ret = CoreParserFunctions::$mwId( $parser, $title->getPrefixedText() ); |
139 | 137 | break; |
140 | | - |
| 138 | + |
141 | 139 | default: |
142 | 140 | // give other extensions a chance to hook up with this and return their own values: |
143 | 141 | wfRunHooks( 'GetThisVariableValueSwitch', array( &$parser, $title, &$mwId, &$ret, $frame, $args ) ); |
144 | 142 | } |
145 | 143 | return $ret; |
146 | 144 | } |
147 | | - |
148 | 145 | } |
Index: trunk/extensions/ParserFun/includes/PFun_Parse.php |
— | — | @@ -32,14 +32,6 @@ |
33 | 33 | |
34 | 34 | /** |
35 | 35 | * No LSB in pre-5.3 PHP, to be refactored later |
36 | | - */ |
37 | | - public static function staticMagic( array &$magicWords, $langCode ) { |
38 | | - $instance = new self; |
39 | | - return $instance->magic( $magicWords, $langCode ); |
40 | | - } |
41 | | - |
42 | | - /** |
43 | | - * No LSB in pre-5.3 PHP, to be refactored later |
44 | 36 | */ |
45 | 37 | public static function staticInit( Parser &$parser ) { |
46 | 38 | global $egParserFunEnabledFunctions; |
Index: trunk/extensions/ParserFun/ParserFun.i18n.magic.php |
— | — | @@ -18,22 +18,13 @@ |
19 | 19 | */ |
20 | 20 | $magicWords['en'] = array( |
21 | 21 | 'parse' => array( 0, 'parse' ), |
22 | | - ExtParserFun::MAG_THIS => array( 1, 'THIS' ), |
23 | | - ExtParserFun::MAG_CALLER => array( 1, 'CALLER' ), |
| 22 | + 'this' => array( 1, 'THIS' ), |
| 23 | + 'caller' => array( 1, 'CALLER' ), |
24 | 24 | ); |
25 | 25 | |
26 | | -/** Message documentation (Message documentation) |
27 | | - * @author Daniel Werner |
28 | | - */ |
29 | | -$messages['qqq'] = array( |
30 | | - 'parse' => array( 0, 'Do not translate this! This is the magic word for the "#parse" function' ), |
31 | | - ExtParserFun::MAG_THIS => array( 1, 'Keyword to put in front of a variable like "{{THIS:PAGENAME}}". This will output the pagename of the page where it is defined on instead of the page actually being parsed. "THIS" refers to that page.' ), |
32 | | - ExtParserFun::MAG_CALLER => array( 1, 'Variable/Parser function returning an templates direct initiator or with options even all or just specific initiators.' ), |
33 | | -); |
34 | | - |
35 | 26 | /** German (Deutsch) |
36 | 27 | * @author Daniel Werner |
37 | 28 | */ |
38 | 29 | $magicWords['de'] = array( |
39 | | - ExtParserFun::MAG_THIS => array( 1, 'DIESER', 'DIESE', 'DIESES' ), |
| 30 | + 'this' => array( 1, 'DIESER', 'DIESE', 'DIESES' ), |
40 | 31 | ); |
Index: trunk/extensions/ParserFun/ParserFun.php |
— | — | @@ -53,7 +53,6 @@ |
54 | 54 | |
55 | 55 | $wgHooks['ParserFirstCallInit' ][] = 'ExtParserFun::init'; |
56 | 56 | |
57 | | - |
58 | 57 | // for magic word 'THISPAGENAME': |
59 | 58 | $wgHooks['MagicWordwgVariableIDs' ][] = 'ExtParserFun::onMagicWordwgVariableIDs'; |
60 | 59 | $wgHooks['ParserGetVariableValueSwitch'][] = 'ExtParserFun::onParserGetVariableValueSwitch'; |
— | — | @@ -65,12 +64,8 @@ |
66 | 65 | $wgAutoloadClasses['ParserFunCaller'] = ExtParserFun::getDir() . '/includes/PFun_Caller.php'; |
67 | 66 | |
68 | 67 | $wgHooks['ParserFirstCallInit'][] = 'ParserFunParse::staticInit'; |
69 | | -$wgHooks['LanguageGetMagic' ][] = 'ParserFunParse::staticMagic'; |
70 | | - |
71 | 68 | $wgHooks['ParserFirstCallInit'][] = 'ParserFunCaller::staticInit'; |
72 | | -$wgHooks['LanguageGetMagic' ][] = 'ParserFunCaller::staticMagic'; |
73 | 69 | |
74 | | - |
75 | 70 | /** |
76 | 71 | * Extension class of the 'Parser Fun' extension. |
77 | 72 | * Handling the functionality around the 'THIS' magic word feature. |
— | — | @@ -83,15 +78,12 @@ |
84 | 79 | * |
85 | 80 | * @var string |
86 | 81 | */ |
87 | | - const VERSION = '0.2'; |
88 | | - |
89 | | - const MAG_THIS = 'this'; |
90 | | - const MAG_CALLER = 'caller'; |
91 | | - |
92 | | - static function init( Parser &$parser ) { |
93 | | - if( self::isEnabledFunction( self::MAG_THIS ) ) { |
| 82 | + const VERSION = '0.3'; |
| 83 | + |
| 84 | + static function init( Parser &$parser ) { |
| 85 | + if( self::isEnabledFunction( 'this' ) ) { |
94 | 86 | // only register function if not disabled by configuration |
95 | | - $parser->setFunctionHook( self::MAG_THIS, array( 'ParserFunThis', 'pfObj_this' ), SFH_NO_HASH | SFH_OBJECT_ARGS ); |
| 87 | + $parser->setFunctionHook( 'this', array( 'ParserFunThis', 'pfObj_this' ), SFH_NO_HASH | SFH_OBJECT_ARGS ); |
96 | 88 | } |
97 | 89 | return true; |
98 | 90 | } |
— | — | @@ -136,12 +128,12 @@ |
137 | 129 | } |
138 | 130 | switch( $magicWordId ) { |
139 | 131 | /** THIS **/ |
140 | | - case self::MAG_THIS: |
| 132 | + case 'this': |
141 | 133 | $ret = ParserFunThis::pfObj_this( $parser, $frame, null ); |
142 | 134 | break; |
143 | 135 | |
144 | 136 | /** CALLER **/ |
145 | | - case self::MAG_CALLER: |
| 137 | + case 'caller': |
146 | 138 | $ret = ParserFunCaller::getCallerVar( $frame ); |
147 | 139 | break; |
148 | 140 | } |
— | — | @@ -150,11 +142,11 @@ |
151 | 143 | |
152 | 144 | static function onMagicWordwgVariableIDs( &$variableIds ) { |
153 | 145 | // only register variables if not disabled by configuration |
154 | | - if( self::isEnabledFunction( self::MAG_THIS ) ) { |
155 | | - $variableIds[] = self::MAG_THIS; |
| 146 | + if( self::isEnabledFunction( 'this' ) ) { |
| 147 | + $variableIds[] = 'this'; |
156 | 148 | } |
157 | | - if( self::isEnabledFunction( self::MAG_CALLER ) ) { |
158 | | - $variableIds[] = self::MAG_CALLER; |
| 149 | + if( self::isEnabledFunction( 'caller' ) ) { |
| 150 | + $variableIds[] = 'caller'; |
159 | 151 | } |
160 | 152 | return true; |
161 | 153 | } |
Index: trunk/extensions/QrCode/QrCode.i18n.magic.php |
— | — | @@ -0,0 +1,10 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Internationalization file for magic words. |
| 5 | + */ |
| 6 | + |
| 7 | +$magicWords = array(); |
| 8 | + |
| 9 | +$magicWords['en'] = array( |
| 10 | + 'qrcode' => array( 0, 'qrcode' ), |
| 11 | +); |
Property changes on: trunk/extensions/QrCode/QrCode.i18n.magic.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 12 | + native |
Added: svn:keywords |
2 | 13 | + Id |
Index: trunk/extensions/QrCode/QrCode.php |
— | — | @@ -22,7 +22,7 @@ |
23 | 23 | $wgExtensionCredits['parserhook'][] = array( |
24 | 24 | 'path' => __FILE__, |
25 | 25 | 'name' => 'QrCode', |
26 | | - 'version' => '0.11', |
| 26 | + 'version' => '0.12', |
27 | 27 | 'author' => array( 'David Raison' ), |
28 | 28 | 'url' => 'https://www.mediawiki.org/wiki/Extension:QrCode', |
29 | 29 | 'descriptionmsg' => 'qrcode-desc' |
— | — | @@ -30,8 +30,8 @@ |
31 | 31 | |
32 | 32 | $wgAutoloadClasses['QRcode'] = dirname(__FILE__) . '/phpqrcode/qrlib.php'; |
33 | 33 | $wgExtensionMessagesFiles['QrCode'] = dirname(__FILE__) .'/QrCode.i18n.php'; |
| 34 | +$wgExtensionMessagesFiles['QrCodeMagic'] = dirname(__FILE__) .'/QrCode.i18n.magic.php'; |
34 | 35 | |
35 | | -$wgHooks['LanguageGetMagic'][] = 'wfQrCodeLanguageGetMagic'; |
36 | 36 | $wgHooks['ParserFirstCallInit'][] = 'efQrcodeRegisterFunction'; |
37 | 37 | $wgJobClasses['uploadQrCode'] = 'UploadQrCodeJob'; |
38 | 38 | |
— | — | @@ -40,11 +40,6 @@ |
41 | 41 | return true; |
42 | 42 | } |
43 | 43 | |
44 | | -function wfQrCodeLanguageGetMagic( &$magicWords, $langCode = 'en' ) { |
45 | | - $magicWords['qrcode'] = array( 0, 'qrcode' ); |
46 | | - return true; |
47 | | -} |
48 | | - |
49 | 44 | // Defaults (overwritten by LocalSettings.php and possibly also by the function call's arguments) |
50 | 45 | $wgQrCodeECC = 'L'; // L,M,Q,H |
51 | 46 | $wgQrCodeSize = 4; // pixel size of black squares |
— | — | @@ -61,7 +56,6 @@ |
62 | 57 | * to OOP patterns. |
63 | 58 | */ |
64 | 59 | function newQrCode() { |
65 | | - |
66 | 60 | $params = func_get_args(); |
67 | 61 | $parser = array_shift($params); // we'll need the parser later |
68 | 62 | |
— | — | @@ -79,13 +73,14 @@ |
80 | 74 | $newQrCode = new MWQrCode( $parser, $ecc, $size, $margin, $scheme ); |
81 | 75 | return $newQrCode->showCode( $label ); |
82 | 76 | } |
83 | | - |
| 77 | + |
| 78 | +// @todo FIXME: Move classes out of the init file. |
| 79 | + |
84 | 80 | /** |
85 | 81 | * Class that handles QrCode generation and MW file handling. |
86 | 82 | * |
87 | 83 | */ |
88 | 84 | class MWQrCode { |
89 | | - |
90 | 85 | /** |
91 | 86 | * @var Parser |
92 | 87 | */ |
— | — | @@ -123,7 +118,6 @@ |
124 | 119 | * first generate then publish it. |
125 | 120 | */ |
126 | 121 | public function showCode( $label = false ){ |
127 | | - |
128 | 122 | // Check for a provided label and use the page URL as default (but force protocol if requested) |
129 | 123 | if ( $label ) { |
130 | 124 | $this->_label = $label; // should we sanitize this? |
— | — | @@ -189,8 +183,6 @@ |
190 | 184 | } |
191 | 185 | |
192 | 186 | class UploadQrCodeJob extends Job { |
193 | | - |
194 | | - |
195 | 187 | public function __construct( $title, $params, $id = 0 ) { |
196 | 188 | wfDebug("QrCodeDebug::Creating Job\n"); |
197 | 189 | $this->_dstFileName = $params['dstName']; |
— | — | @@ -233,7 +225,6 @@ |
234 | 226 | * @note there doesn't seem to be a decent method for checking if a user already exists |
235 | 227 | * */ |
236 | 228 | private function _getBot(){ |
237 | | - |
238 | 229 | $bot = User::createNew( QRCODEBOT ); |
239 | 230 | if( $bot != null ){ |
240 | 231 | wfDebug( 'QrCode::_getBot: Created new user '.QRCODEBOT."\n" ); |
Index: trunk/extensions/SelectionSifter/TableDisplay.php |
— | — | @@ -1,13 +1,9 @@ |
2 | 2 | <?php |
3 | | -if ( !defined( 'MEDIAWIKI' ) ) { |
4 | | - exit( 1 ); |
5 | | -} |
6 | 3 | |
7 | 4 | /** |
8 | 5 | * @todo Document overall purpose of this class. |
9 | 6 | */ |
10 | 7 | class TableDisplay { |
11 | | - |
12 | 8 | /** |
13 | 9 | * Register our parser functions |
14 | 10 | */ |
— | — | @@ -17,14 +13,6 @@ |
18 | 14 | } |
19 | 15 | |
20 | 16 | /** |
21 | | - * Register new magic words. |
22 | | - */ |
23 | | - public static function LanguageGetMagic( &$magicWords, $langCode ) { |
24 | | - $magicWords['AssessmentStats'] = array( 0, 'AssessmentStats' ); |
25 | | - return true; |
26 | | - } |
27 | | - |
28 | | - /** |
29 | 17 | * @todo Document! |
30 | 18 | * @param string $projectName |
31 | 19 | * @param unknown $projectStats |
Index: trunk/extensions/SelectionSifter/SelectionSifter.i18n.magic.php |
— | — | @@ -0,0 +1,10 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Internationalization file for magic words. |
| 5 | + */ |
| 6 | + |
| 7 | +$magicWords = array(); |
| 8 | + |
| 9 | +$magicWords['en'] = array( |
| 10 | + 'AssessmentStats' => array( 0, 'AssessmentStats' ), |
| 11 | +); |
Property changes on: trunk/extensions/SelectionSifter/SelectionSifter.i18n.magic.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 12 | + native |
Added: svn:keywords |
2 | 13 | + Id |
Index: trunk/extensions/SelectionSifter/SelectionSifter.php |
— | — | @@ -29,6 +29,7 @@ |
30 | 30 | |
31 | 31 | $wgExtensionMessagesFiles['SelectionSifter'] = $dir . 'SelectionSifter.i18n.php'; |
32 | 32 | $wgExtensionMessagesFiles['SelectionSifterAlias'] = $dir . 'SelectionSifter.alias.php'; |
| 33 | +$wgExtensionMessagesFiles['SelectionSifterMagic'] = $dir . 'SelectionSifter.i18n.magic.php'; |
33 | 34 | |
34 | 35 | $wgAutoloadClasses['SelectionSifterHooks'] = $dir . 'SelectionSifter.hooks.php'; |
35 | 36 | $wgAutoloadClasses['Statistics'] = $dir . 'models/Statistics.php'; |
— | — | @@ -48,7 +49,6 @@ |
49 | 50 | $wgHooks['LoadExtensionSchemaUpdates'][] = 'SelectionSifterHooks::SetupSchema'; |
50 | 51 | |
51 | 52 | $wgHooks['ParserFirstCallInit'][] = 'TableDisplay::ParserFunctionInit'; |
52 | | -$wgHooks['LanguageGetMagic'][] = 'TableDisplay::LanguageGetMagic'; |
53 | 53 | |
54 | 54 | $wgHooks['TitleMoveComplete'][] = 'SelectionSifterHooks::TitleMoveComplete'; |
55 | 55 | |
Index: trunk/extensions/SelectionSifter/SelectionSifter.hooks.php |
— | — | @@ -8,12 +8,7 @@ |
9 | 9 | * @licence Modified BSD License |
10 | 10 | */ |
11 | 11 | |
12 | | -if ( !defined( 'MEDIAWIKI' ) ) { |
13 | | - exit( 1 ); |
14 | | -} |
15 | | - |
16 | 12 | class SelectionSifterHooks { |
17 | | - |
18 | 13 | private static function updateDatabase( $title, $assessments, $timestamp ) { |
19 | 14 | $main_title = Title::makeTitle( NS_MAIN, $title->getText() ); |
20 | 15 | $ratings = Rating::forTitle( $main_title ); |