r109525 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109524‎ | r109525 | r109526 >
Date:12:16, 19 January 2012
Author:siebrand
Status:ok (Comments)
Tags:backcompat, languagegetmagic 
Comment:
Remove use of deprecated LanguageGetMagic hook.
Remove a few globals or constants that were used for magic words.
Trim trailing whitespace.
Remove unneeded MEDIAWIKI checks in class files.
Add FIXME where needed.
Probably some other minor miscellaneous changes.
Modified paths:
  • /trunk/extensions/ParserFun/ParserFun.i18n.magic.php (modified) (history)
  • /trunk/extensions/ParserFun/ParserFun.php (modified) (history)
  • /trunk/extensions/ParserFun/includes/PFun_Caller.php (modified) (history)
  • /trunk/extensions/ParserFun/includes/PFun_Parse.php (modified) (history)
  • /trunk/extensions/ParserFun/includes/PFun_This.php (modified) (history)
  • /trunk/extensions/PipeEscape/PipeEscape.i18n.magic.php (added) (history)
  • /trunk/extensions/PipeEscape/PipeEscape.php (modified) (history)
  • /trunk/extensions/PrivatePageProtection/PrivatePageProtection.i18n.magic.php (added) (history)
  • /trunk/extensions/PrivatePageProtection/PrivatePageProtection.php (modified) (history)
  • /trunk/extensions/PureWikiDeletion/PureWikiDeletion.hooks.php (modified) (history)
  • /trunk/extensions/PureWikiDeletion/PureWikiDeletion.i18n.magic.php (added) (history)
  • /trunk/extensions/PureWikiDeletion/PureWikiDeletion.php (modified) (history)
  • /trunk/extensions/QrCode/QrCode.i18n.magic.php (added) (history)
  • /trunk/extensions/QrCode/QrCode.php (modified) (history)
  • /trunk/extensions/Ratings/Ratings.i18n.magic.php (added) (history)
  • /trunk/extensions/Ratings/Ratings.php (modified) (history)
  • /trunk/extensions/Ratings/allrating/RatingsAllRating.php (modified) (history)
  • /trunk/extensions/Ratings/starrating/RatingsStars.php (modified) (history)
  • /trunk/extensions/Ratings/votesummary/RatingsVoteSummary.php (modified) (history)
  • /trunk/extensions/RecordAdmin/RecordAdmin.i18n.magic.php (added) (history)
  • /trunk/extensions/RecordAdmin/RecordAdmin.php (modified) (history)
  • /trunk/extensions/RecordAdmin/RecordAdmin_body.php (modified) (history)
  • /trunk/extensions/SNMPquery/SNMPquery.i18n.magic.php (added) (history)
  • /trunk/extensions/SNMPquery/SNMPquery.php (modified) (history)
  • /trunk/extensions/SelectionSifter/SelectionSifter.hooks.php (modified) (history)
  • /trunk/extensions/SelectionSifter/SelectionSifter.i18n.magic.php (added) (history)
  • /trunk/extensions/SelectionSifter/SelectionSifter.php (modified) (history)
  • /trunk/extensions/SelectionSifter/TableDisplay.php (modified) (history)
  • /trunk/extensions/SemanticDrilldown/SemanticDrilldown.php (modified) (history)
  • /trunk/extensions/SemanticDrilldown/includes/SD_Utils.php (modified) (history)
  • /trunk/extensions/SemanticDrilldown/languages/SemanticDrilldown.i18n.magic.php (added) (history)
  • /trunk/extensions/SemanticInternalObjects/SemanticInternalObjects.i18n.magic.php (modified) (history)
  • /trunk/extensions/SemanticInternalObjects/SemanticInternalObjects.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/parserhooks/SMW_Info.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/parserhooks/SMW_SMWDoc.php (modified) (history)
  • /trunk/extensions/Translate/Translate.magic.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/parserhooks/SMW_Info.php
@@ -50,15 +50,6 @@
5151 /**
5252 * No LSB in pre-5.3 PHP *sigh*.
5353 * 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.
6354 */
6455 public static function staticInit( Parser &$parser ) {
6556 $instance = new self;
Index: trunk/extensions/SemanticMediaWiki/includes/parserhooks/SMW_SMWDoc.php
@@ -27,15 +27,6 @@
2828 * No LSB in pre-5.3 PHP *sigh*.
2929 * This is to be refactored as soon as php >=5.3 becomes acceptable.
3030 */
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 - */
4031 public static function staticInit( Parser &$parser ) {
4132 $instance = new self;
4233 return $instance->init( $parser );
@@ -231,5 +222,4 @@
232223 $key = array_shift( $args );
233224 return wfMsgReal( $key, $args, true, $this->language );
234225 }
235 -
236 -}
\ No newline at end of file
 226+}
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php
@@ -81,9 +81,7 @@
8282 $wgHooks['PageSchemasRegisterHandlers'][] = 'SMWHooks::onPageSchemasRegistration';
8383
8484 $wgHooks['ParserFirstCallInit'][] = 'SMWSMWDoc::staticInit';
85 - $wgHooks['LanguageGetMagic'][] = 'SMWSMWDoc::staticMagic';
8685 $wgHooks['ParserFirstCallInit'][] = 'SMWInfo::staticInit';
87 - $wgHooks['LanguageGetMagic'][] = 'SMWInfo::staticMagic';
8886
8987 $wgHooks['InternalParseBeforeLinks'][] = 'SMWParserExtensions::onInternalParseBeforeLinks'; // parse annotations in [[link syntax]]
9088 $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
112 + native
Added: svn:keywords
213 + Id
Index: trunk/extensions/PipeEscape/PipeEscape.php
@@ -1,5 +1,4 @@
22 <?php
3 -
43 /**
54 * @file
65 * @ingroup Extensions
@@ -35,8 +34,8 @@
3635 );
3736
3837 $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';
4140
4241 class ExtPipeEsc
4342 {
@@ -52,12 +51,6 @@
5352 return true;
5453 }
5554
56 - public static function languageGetMagic( &$magicWords, $langCode )
57 - {
58 - $magicWords[ '!' ] = array( 0, '!' );
59 - return true;
60 - }
61 -
6255 public static function pipeChar( &$parser, $frame, $args )
6356 {
6457 $output = array_shift( $args );
@@ -78,4 +71,3 @@
7972 return trim( $output );
8073 }
8174 }
82 -
Index: trunk/extensions/Translate/Translate.magic.php
@@ -1,8 +1,11 @@
22 <?php
 3+/**
 4+ * Internationalization file for magic words.
 5+ */
36
47 $magicWords = array();
58
69 /** English (English) */
710 $magicWords['en'] = array(
811 'translationdialog' => array( 0, 'translationdialog' ),
9 -);
\ No newline at end of file
 12+);
Index: trunk/extensions/SemanticDrilldown/includes/SD_Utils.php
@@ -6,7 +6,6 @@
77 */
88
99 class SDUtils {
10 -
1110 /**
1211 * Helper function to handle getPropertyValues() in both SMW 1.6
1312 * and earlier versions.
@@ -417,18 +416,6 @@
418417 }
419418
420419 /**
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 - /**
433420 * Set values in the page_props table based on the presence of the
434421 * 'HIDEFROMDRILLDOWN' and 'SHOWINDRILLDOWN' magic words in a page
435422 */
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
113 + native
Added: svn:keywords
214 + Id
Index: trunk/extensions/SemanticDrilldown/SemanticDrilldown.php
@@ -63,7 +63,6 @@
6464 $wgHooks['smwInitProperties'][] = 'sdfInitProperties';
6565 $wgHooks['AdminLinks'][] = 'SDUtils::addToAdminLinks';
6666 $wgHooks['MagicWordwgVariableIDs'][] = 'SDUtils::addMagicWordVariableIDs';
67 -$wgHooks['LanguageGetMagic'][] = 'SDUtils::addMagicWordLanguage';
6867 $wgHooks['ParserBeforeTidy'][] = 'SDUtils::handleShowAndHide';
6968 $wgHooks['PageSchemasRegisterHandlers'][] = 'SDPageSchemas::registerClass';
7069
@@ -262,4 +261,3 @@
263262 ),
264263 );
265264 }
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
112 + native
Added: svn:keywords
213 + Id
Index: trunk/extensions/PrivatePageProtection/PrivatePageProtection.php
@@ -1,5 +1,4 @@
22 <?php
3 -
43 /**
54 * PrivatePageProtection extension - implements per page acccess restrictions based on user group.
65 * Which groups are authorized for viewing is defined on-page, using a parser function.
@@ -40,9 +39,9 @@
4140 );
4241
4342 $wgExtensionMessagesFiles['PrivatePageProtection'] = dirname(__FILE__) . '/PrivatePageProtection.i18n.php';
 43+$wgExtensionMessagesFiles['PrivatePageProtectionMagic'] = dirname(__FILE__) . '/PrivatePageProtection.i18n.magic.php';
4444
4545 $wgHooks['ParserFirstCallInit'][] = 'privateppParserFirstCallInit';
46 -$wgHooks['LanguageGetMagic'][] = 'privateppLanguageGetMagic';
4746 $wgHooks['getUserPermissionsErrorsExpensive'][] = 'privateppUserPermissionsErrors';
4847 $wgHooks['ArticleSave'][] = 'privateppArticleSave';
4948
@@ -54,15 +53,6 @@
5554 return true;
5655 }
5756
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 -
6757 // Render the output of the parser function.
6858 function privateppRenderTag( $parser, $param1 = '', $param2 = '' ) {
6959 $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
113 + native
Added: svn:keywords
214 + Id
Index: trunk/extensions/SNMPquery/SNMPquery.php
@@ -31,19 +31,11 @@
3232
3333 $dir = dirname( __FILE__ );
3434 $wgExtensionMessagesFiles['SNMPquery'] = $dir . '/SNMPquery.i18n.php';
 35+$wgExtensionMessagesFiles['SNMPqueryMagic'] = $dir . '/SNMPquery.i18n.magic.php';
3536
3637 # Define a setup function
3738 $wgHooks['ParserFirstCallInit'][] = 'SNMP_Setup';
3839
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 -
4840 function SNMP_Setup() {
4941 global $wgParser;
5042 # 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
114 + native
Added: svn:keywords
215 + Id
Index: trunk/extensions/Ratings/votesummary/RatingsVoteSummary.php
@@ -12,20 +12,10 @@
1313 * @author Jeroen De Dauw < jeroendedauw@gmail.com >
1414 */
1515 final class RatingsVoteSummary extends ParserHook {
16 -
1716 /**
1817 * No LSB in pre-5.3 PHP *sigh*.
1918 * This is to be refactored as soon as php >=5.3 becomes acceptable.
2019 */
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 - */
3020 public static function staticInit( Parser &$parser ) {
3121 $instance = new self;
3222 return $instance->init( $parser );
Index: trunk/extensions/Ratings/Ratings.php
@@ -54,6 +54,7 @@
5555 $egRatingsScriptPath = $wgExtensionAssetsPath === false ? $wgScriptPath . '/extensions/Ratings' : $wgExtensionAssetsPath . '/Ratings';
5656
5757 $wgExtensionMessagesFiles['Ratings'] = dirname( __FILE__ ) . '/Ratings.i18n.php';
 58+$wgExtensionMessagesFiles['RatingsMagic'] = dirname( __FILE__ ) . '/Ratings.i18n.magic.php';
5859
5960 $wgAutoloadClasses['ApiDoRating'] = dirname( __FILE__ ) . '/api/ApiDoRating.php';
6061 $wgAutoloadClasses['ApiQueryRatings'] = dirname( __FILE__ ) . '/api/ApiQueryRatings.php';
@@ -64,17 +65,14 @@
6566 $wgAutoloadClasses['RatingsStars'] = dirname( __FILE__ ) . '/starrating/RatingsStars.php';
6667
6768 $wgHooks['ParserFirstCallInit'][] = 'RatingsStars::staticInit';
68 -$wgHooks['LanguageGetMagic'][] = 'RatingsStars::staticMagic';
6969
7070 $wgAutoloadClasses['RatingsAllRating'] = dirname( __FILE__ ) . '/allrating/RatingsAllRating.php';
7171
7272 $wgHooks['ParserFirstCallInit'][] = 'RatingsAllRating::staticInit';
73 -$wgHooks['LanguageGetMagic'][] = 'RatingsAllRating::staticMagic';
7473
7574 $wgAutoloadClasses['RatingsVoteSummary'] = dirname( __FILE__ ) . '/votesummary/RatingsVoteSummary.php';
7675
7776 $wgHooks['ParserFirstCallInit'][] = 'RatingsVoteSummary::staticInit';
78 -$wgHooks['LanguageGetMagic'][] = 'RatingsVoteSummary::staticMagic';
7977
8078 $wgAutoloadClasses['Ratings'] = dirname( __FILE__ ) . '/Ratings.class.php';
8179 $wgAutoloadClasses['RatingsHooks'] = dirname( __FILE__ ) . '/Ratings.hooks.php';
Index: trunk/extensions/Ratings/allrating/RatingsAllRating.php
@@ -12,20 +12,10 @@
1313 * @author Jeroen De Dauw < jeroendedauw@gmail.com >
1414 */
1515 final class RatingsAllRating extends ParserHook {
16 -
1716 /**
1817 * No LSB in pre-5.3 PHP *sigh*.
1918 * This is to be refactored as soon as php >=5.3 becomes acceptable.
2019 */
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 - */
3020 public static function staticInit( Parser &$parser ) {
3121 $instance = new self;
3222 return $instance->init( $parser );
Index: trunk/extensions/Ratings/starrating/RatingsStars.php
@@ -12,20 +12,10 @@
1313 * @author Jeroen De Dauw < jeroendedauw@gmail.com >
1414 */
1515 final class RatingsStars extends ParserHook {
16 -
1716 /**
1817 * No LSB in pre-5.3 PHP *sigh*.
1918 * This is to be refactored as soon as php >=5.3 becomes acceptable.
2019 */
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 - */
3020 public static function staticInit( Parser &$parser ) {
3121 $instance = new self;
3222 return $instance->init( $parser );
Index: trunk/extensions/SemanticInternalObjects/SemanticInternalObjects.php
@@ -21,7 +21,6 @@
2222 );
2323
2424 $wgHooks['ParserFirstCallInit'][] = 'siofRegisterParserFunctions';
25 -$wgHooks['LanguageGetMagic'][] = 'siofLanguageGetMagic';
2625 $wgHooks['ParserClearState'][] = 'SIOHandler::clearState';
2726 $wgHooks['SMWSQLStore2::updateDataAfter'][] = 'SIOHandler::updateData';
2827 $wgHooks['SMWSQLStore2::deleteSubjectAfter'][] = 'SIOHandler::deleteData';
@@ -49,12 +48,3 @@
5049 $parser->setFunctionHook( 'set_internal_recurring_event', array( 'SIOHandler', 'doSetInternalRecurringEvent' ) );
5150 return true; // always return true, in order not to stop MW's hook processing!
5251 }
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 @@
99 /** English (English) */
1010 $magicWords['en'] = array(
1111 'set_internal' => array( 0, 'set_internal' ),
 12+ 'set_internal_recurring_event' => array( 0, 'set_internal_recurring_event' ),
1213 );
1314
1415 /** 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
113 + native
Added: svn:keywords
214 + Id
Index: trunk/extensions/RecordAdmin/RecordAdmin_body.php
@@ -1,6 +1,6 @@
22 <?php
3 -class RecordAdmin {
43
 4+class RecordAdmin {
55 var $form = '';
66 var $formClass = '';
77 var $formAtts = '';
@@ -16,7 +16,7 @@
1717
1818 function __construct() {
1919 global $wgHooks, $wgParser, $wgRequest, $wgRecordAdminTag, $wgRecordAdminCategory,
20 - $wgRecordAdminTag, $wgRecordAdminTableMagic, $wgRecordAdminDataMagic;
 20+ $wgRecordAdminTag;
2121
2222 # Name to use for creating a new record either via RecordAdmin or a public form
2323 $this->guid();
@@ -25,8 +25,8 @@
2626 $wgParser->setHook( $wgRecordAdminTag, array( $this, 'expandTag' ) );
2727
2828 # 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' ) );
3131
3232 # Add the hooks to handle cache invalidation and edit-forms
3333 $wgHooks['BeforePageDisplay'][] = $this;
@@ -926,7 +926,6 @@
927927 }
928928 }
929929
930 -
931930 /**
932931 * Render a record search in a parser-function
933932 */
@@ -979,7 +978,6 @@
980979 return array( $table, 'noparse' => true, 'isHTML' => true );
981980 }
982981
983 -
984982 /**
985983 * Obtain a record or record field value from passed parameters
986984 */
@@ -995,7 +993,6 @@
996994 return self::getFieldValue( $args );
997995 }
998996
999 -
1000997 /**
1001998 * If a record was created by a public form, make last 5 digits of ID available via a tag
1002999 */
@@ -1004,7 +1001,6 @@
10051002 return $this->guid ? substr( $this->guid, -5 ) : '';
10061003 }
10071004
1008 -
10091005 /**
10101006 * Generate a guid - check $wgRecordAdminGuidFormat array for specialised formats
10111007 */
@@ -1012,7 +1008,6 @@
10131009 return $this->guid = strftime( '%Y%m%d', time() ) . '-' . substr( strtoupper( uniqid('', true) ), -5 );
10141010 }
10151011
1016 -
10171012 /**
10181013 * Create DB table for caching queries
10191014 */
@@ -1025,5 +1020,4 @@
10261021 $dbw->freeResult( $result );
10271022 }
10281023 }
1029 -
10301024 }
Index: trunk/extensions/RecordAdmin/RecordAdmin.php
@@ -10,17 +10,16 @@
1111 * @author Siebrand Mazeland
1212 * @licence GNU General Public Licence 2.0 or later
1313 */
14 -define( 'RECORDADMIN_VERSION', '1.3.5, 2011-09-29' );
 14+define( 'RECORDADMIN_VERSION', '1.4.0, 2012-01-19' );
1515
1616 $wgRecordAdminExtPath = preg_replace( "|^.*(/extensions/.*$)|", "$wgScriptPath$1", dirname( __FILE__ ) );
1717
1818 $dir = dirname( __FILE__ ) . '/';
1919 $wgExtensionMessagesFiles['RecordAdmin'] = $dir . 'RecordAdmin.i18n.php';
2020 $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';
2223
23 -$wgRecordAdminTableMagic = 'recordtable';
24 -$wgRecordAdminDataMagic = 'recorddata';
2524 $wgRecordAdminTag = 'recordid';
2625
2726 $wgGroupPermissions['sysop']['recordadmin'] = true;
@@ -49,11 +48,3 @@
5049
5150 $wgRecordAdmin = new RecordAdmin();
5251 }
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
113 + native
Added: svn:keywords
214 + Id
Index: trunk/extensions/PureWikiDeletion/PureWikiDeletion.php
@@ -31,7 +31,7 @@
3232 'author' => 'Tisane',
3333 'url' => 'https://www.mediawiki.org/wiki/Extension:PureWikiDeletion',
3434 'descriptionmsg' => 'purewikideletion-desc',
35 - 'version' => '1.0.5',
 35+ 'version' => '1.1.0',
3636 );
3737
3838 $dir = dirname( __FILE__ ) . '/';
@@ -44,6 +44,7 @@
4545 $wgAutoloadClasses['PopulateBlankedPagesTable'] = "$dir/SpecialPureWikiDeletion.php";
4646 $wgExtensionMessagesFiles['PureWikiDeletion'] = $dir . 'PureWikiDeletion.i18n.php';
4747 $wgExtensionMessagesFiles['PureWikiDeletionAlias'] = $dir . 'PureWikiDeletion.alias.php';
 48+$wgExtensionMessagesFiles['PureWikiDeletionMagic'] = $dir . 'PureWikiDeletion.i18n.magic.php';
4849
4950 $wgHooks['LoadExtensionSchemaUpdates'][] = 'PureWikiDeletionHooks::PureWikiDeletionCreateTable';
5051 $wgHooks['ArticleSaveComplete'][] = 'PureWikiDeletionHooks::PureWikiDeletionSaveCompleteHook';
@@ -54,7 +55,6 @@
5556 $wgHooks['ArticleUndelete'][] = 'PureWikiDeletionHooks::PureWikiDeletionUndeleteHook';
5657 $wgHooks['GetPreferences'][] = 'PureWikiDeletionGetPreferences';
5758 $wgHooks['ParserFirstCallInit'][] = 'PureWikiDeletionHooks::efPureWikiDeletionParserFunction_Setup';
58 -$wgHooks['LanguageGetMagic'][] = 'PureWikiDeletionHooks::efPureWikiDeletionParserFunction_Magic';
5959 $wgHooks['AlternateEdit'][] = 'PureWikiDeletionAlternateEditHook';
6060 $wgHooks['OutputPageParserOutput'][] = 'PureWikiDeletionHooks::PureWikiDeletionOutputPageParserOutputHook';
6161
@@ -164,4 +164,4 @@
165165 }
166166 $wgOut->showErrorPage( 'purewikideletion-blanknologin', 'purewikideletion-unblanknologintext' );
167167 return false;
168 -}
\ No newline at end of file
 168+}
Index: trunk/extensions/PureWikiDeletion/PureWikiDeletion.hooks.php
@@ -1,14 +1,6 @@
22 <?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 -}
103
114 class PureWikiDeletionHooks {
12 -
135 /**
146 * When a user visits the URL of a blanked page, redirect to the edit page
157 */
@@ -235,17 +227,6 @@
236228 return true;
237229 }
238230
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 -
250231 public static function efPureWikiDeletionParserFunction_RenderBlank( $parser, $param1 = '', $param2 = '', $param3 = '' ) {
251232 return PureWikiDeletionHooks::evaluateBlankness ( $parser, $param1, $param2, $param3 );
252233 }
Index: trunk/extensions/ParserFun/includes/PFun_Caller.php
@@ -19,14 +19,6 @@
2020
2121 /**
2222 * 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
3123 */
3224 public static function staticInit( Parser &$parser ) {
3325 global $egParserFunEnabledFunctions;
Index: trunk/extensions/ParserFun/includes/PFun_This.php
@@ -2,16 +2,16 @@
33
44 /**
55 * Class for the 'THIS' variable/parser function.
6 - *
 6+ *
77 * @since 0.2 (in 'ExtParserFun' class before)
8 - *
 8+ *
99 * @file PFun_This.php
1010 * @ingroup ParserFun
11 - *
 11+ *
1212 * @author Daniel Werner
1313 */
1414 class ParserFunThis {
15 -
 15+
1616 /**
1717 * Magic word 'THIS:' to return certain information about the page the word actually is defined on
1818 */
@@ -20,21 +20,21 @@
2121 if( $frame === null || $frame->title === null ) {
2222 return '';
2323 }
24 -
 24+
2525 // get part behind 'THIS:' if only 'THIS', use 'FULLPAGENAME'
2626 $index = isset( $args[0] ) ? trim( $frame->expand( $args[0] ) ) : '';
27 -
 27+
2828 $newArgs = array();
29 -
 29+
3030 if( $index !== '' ) {
3131 // clean up arguments as if first argument never were set:
32 - unset( $args[0] );
 32+ unset( $args[0] );
3333 foreach( $args as $arg ) {
3434 $newArgs[] = $arg;
3535 }
36 -
 36+
3737 // get magic word ID of the variable name:
38 - $mwId = self::getVariablesMagicWordId( $parser, $index );
 38+ $mwId = self::getVariablesMagicWordId( $parser, $index );
3939 if( $mwId === null ) {
4040 // requested variable doesn't exist, make the thing a template call
4141 return array( null, 'found' => false );
@@ -44,32 +44,31 @@
4545 // if only '{{THIS}}', set magic word id to 'FULLPAGENAME'
4646 $mwId = 'fullpagename';
4747 }
48 -
 48+
4949 // get value:
50 - $out = self::getThisVariableValue( $mwId, $parser, $frame, $newArgs );
 50+ $out = self::getThisVariableValue( $mwId, $parser, $frame, $newArgs );
5151 if( $out === null ) {
5252 // requested variable doesn't support 'THIS:', make the thing a template call
5353 return array( null, 'found' => false );
5454 }
55 -
 55+
5656 return $out;
57 -
5857 }
59 -
 58+
6059 /**
6160 * Returns the magic word ID for a variable like the user would write it. Returns null in case there
6261 * is no word for the given variables name.
63 - *
 62+ *
6463 * @param Parser $parser
6564 * @param type $word
66 - *
 65+ *
6766 * @return string|null
6867 */
6968 static function getVariablesMagicWordId( Parser $parser, $word ) {
7069 // get all local (including translated) magic words IDs (values) with their actual literals (keys)
7170 // for case insensitive [0] and sensitive [1]
7271 $magicWords = $parser->mVariables->getHash();
73 -
 72+
7473 if( array_key_exists( strtolower( $word ), $magicWords[0] ) ) {
7574 // case insensitive word match
7675 $mwId = $magicWords[0][ strtolower( $word ) ];
@@ -80,32 +79,31 @@
8180 }
8281 else {
8382 // requested magic word doesn't exist for variables
84 -
8583 return null;
8684 }
8785 return $mwId;
8886 }
89 -
 87+
9088 /**
9189 * Returns the value of a variable like '{{FULLPAGENAME}}' in the context of the given PPFrame objects
9290 * $frame->$title instead of the Parser objects subject. Returns null in case the requested variable
9391 * does not support '{{THIS:}}'.
94 - *
 92+ *
9593 * @param string $mwId magic word ID of the variable
9694 * @param Parser $parser
9795 * @param PPFrame $frame
9896 * @param array $args
99 - *
 97+ *
10098 * @return string|null
10199 */
102 - static function getThisVariableValue( $mwId, Parser &$parser, $frame, $args = array() ) {
 100+ static function getThisVariableValue( $mwId, Parser &$parser, $frame, $args = array() ) {
103101 $ret = null;
104102 $title = $frame->title;
105 -
 103+
106104 if( $title === null ) {
107105 return null;
108106 }
109 -
 107+
110108 // check whether info is available, e.g. 'THIS:FULLPAGENAME' requires 'FULLPAGENAME'
111109 switch( $mwId ) {
112110 case 'namespace':
@@ -133,15 +131,14 @@
134132 case 'subjectspacee':
135133 case 'talkspace':
136134 case 'talkspacee':
137 - // core parser function information requested
 135+ // core parser function information requested
138136 $ret = CoreParserFunctions::$mwId( $parser, $title->getPrefixedText() );
139137 break;
140 -
 138+
141139 default:
142140 // give other extensions a chance to hook up with this and return their own values:
143141 wfRunHooks( 'GetThisVariableValueSwitch', array( &$parser, $title, &$mwId, &$ret, $frame, $args ) );
144142 }
145143 return $ret;
146144 }
147 -
148145 }
Index: trunk/extensions/ParserFun/includes/PFun_Parse.php
@@ -32,14 +32,6 @@
3333
3434 /**
3535 * 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
4436 */
4537 public static function staticInit( Parser &$parser ) {
4638 global $egParserFunEnabledFunctions;
Index: trunk/extensions/ParserFun/ParserFun.i18n.magic.php
@@ -18,22 +18,13 @@
1919 */
2020 $magicWords['en'] = array(
2121 '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' ),
2424 );
2525
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 -
3526 /** German (Deutsch)
3627 * @author Daniel Werner
3728 */
3829 $magicWords['de'] = array(
39 - ExtParserFun::MAG_THIS => array( 1, 'DIESER', 'DIESE', 'DIESES' ),
 30+ 'this' => array( 1, 'DIESER', 'DIESE', 'DIESES' ),
4031 );
Index: trunk/extensions/ParserFun/ParserFun.php
@@ -53,7 +53,6 @@
5454
5555 $wgHooks['ParserFirstCallInit' ][] = 'ExtParserFun::init';
5656
57 -
5857 // for magic word 'THISPAGENAME':
5958 $wgHooks['MagicWordwgVariableIDs' ][] = 'ExtParserFun::onMagicWordwgVariableIDs';
6059 $wgHooks['ParserGetVariableValueSwitch'][] = 'ExtParserFun::onParserGetVariableValueSwitch';
@@ -65,12 +64,8 @@
6665 $wgAutoloadClasses['ParserFunCaller'] = ExtParserFun::getDir() . '/includes/PFun_Caller.php';
6766
6867 $wgHooks['ParserFirstCallInit'][] = 'ParserFunParse::staticInit';
69 -$wgHooks['LanguageGetMagic' ][] = 'ParserFunParse::staticMagic';
70 -
7168 $wgHooks['ParserFirstCallInit'][] = 'ParserFunCaller::staticInit';
72 -$wgHooks['LanguageGetMagic' ][] = 'ParserFunCaller::staticMagic';
7369
74 -
7570 /**
7671 * Extension class of the 'Parser Fun' extension.
7772 * Handling the functionality around the 'THIS' magic word feature.
@@ -83,15 +78,12 @@
8479 *
8580 * @var string
8681 */
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' ) ) {
9486 // 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 );
9688 }
9789 return true;
9890 }
@@ -136,12 +128,12 @@
137129 }
138130 switch( $magicWordId ) {
139131 /** THIS **/
140 - case self::MAG_THIS:
 132+ case 'this':
141133 $ret = ParserFunThis::pfObj_this( $parser, $frame, null );
142134 break;
143135
144136 /** CALLER **/
145 - case self::MAG_CALLER:
 137+ case 'caller':
146138 $ret = ParserFunCaller::getCallerVar( $frame );
147139 break;
148140 }
@@ -150,11 +142,11 @@
151143
152144 static function onMagicWordwgVariableIDs( &$variableIds ) {
153145 // 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';
156148 }
157 - if( self::isEnabledFunction( self::MAG_CALLER ) ) {
158 - $variableIds[] = self::MAG_CALLER;
 149+ if( self::isEnabledFunction( 'caller' ) ) {
 150+ $variableIds[] = 'caller';
159151 }
160152 return true;
161153 }
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
112 + native
Added: svn:keywords
213 + Id
Index: trunk/extensions/QrCode/QrCode.php
@@ -22,7 +22,7 @@
2323 $wgExtensionCredits['parserhook'][] = array(
2424 'path' => __FILE__,
2525 'name' => 'QrCode',
26 - 'version' => '0.11',
 26+ 'version' => '0.12',
2727 'author' => array( 'David Raison' ),
2828 'url' => 'https://www.mediawiki.org/wiki/Extension:QrCode',
2929 'descriptionmsg' => 'qrcode-desc'
@@ -30,8 +30,8 @@
3131
3232 $wgAutoloadClasses['QRcode'] = dirname(__FILE__) . '/phpqrcode/qrlib.php';
3333 $wgExtensionMessagesFiles['QrCode'] = dirname(__FILE__) .'/QrCode.i18n.php';
 34+$wgExtensionMessagesFiles['QrCodeMagic'] = dirname(__FILE__) .'/QrCode.i18n.magic.php';
3435
35 -$wgHooks['LanguageGetMagic'][] = 'wfQrCodeLanguageGetMagic';
3636 $wgHooks['ParserFirstCallInit'][] = 'efQrcodeRegisterFunction';
3737 $wgJobClasses['uploadQrCode'] = 'UploadQrCodeJob';
3838
@@ -40,11 +40,6 @@
4141 return true;
4242 }
4343
44 -function wfQrCodeLanguageGetMagic( &$magicWords, $langCode = 'en' ) {
45 - $magicWords['qrcode'] = array( 0, 'qrcode' );
46 - return true;
47 -}
48 -
4944 // Defaults (overwritten by LocalSettings.php and possibly also by the function call's arguments)
5045 $wgQrCodeECC = 'L'; // L,M,Q,H
5146 $wgQrCodeSize = 4; // pixel size of black squares
@@ -61,7 +56,6 @@
6257 * to OOP patterns.
6358 */
6459 function newQrCode() {
65 -
6660 $params = func_get_args();
6761 $parser = array_shift($params); // we'll need the parser later
6862
@@ -79,13 +73,14 @@
8074 $newQrCode = new MWQrCode( $parser, $ecc, $size, $margin, $scheme );
8175 return $newQrCode->showCode( $label );
8276 }
83 -
 77+
 78+// @todo FIXME: Move classes out of the init file.
 79+
8480 /**
8581 * Class that handles QrCode generation and MW file handling.
8682 *
8783 */
8884 class MWQrCode {
89 -
9085 /**
9186 * @var Parser
9287 */
@@ -123,7 +118,6 @@
124119 * first generate then publish it.
125120 */
126121 public function showCode( $label = false ){
127 -
128122 // Check for a provided label and use the page URL as default (but force protocol if requested)
129123 if ( $label ) {
130124 $this->_label = $label; // should we sanitize this?
@@ -189,8 +183,6 @@
190184 }
191185
192186 class UploadQrCodeJob extends Job {
193 -
194 -
195187 public function __construct( $title, $params, $id = 0 ) {
196188 wfDebug("QrCodeDebug::Creating Job\n");
197189 $this->_dstFileName = $params['dstName'];
@@ -233,7 +225,6 @@
234226 * @note there doesn't seem to be a decent method for checking if a user already exists
235227 * */
236228 private function _getBot(){
237 -
238229 $bot = User::createNew( QRCODEBOT );
239230 if( $bot != null ){
240231 wfDebug( 'QrCode::_getBot: Created new user '.QRCODEBOT."\n" );
Index: trunk/extensions/SelectionSifter/TableDisplay.php
@@ -1,13 +1,9 @@
22 <?php
3 -if ( !defined( 'MEDIAWIKI' ) ) {
4 - exit( 1 );
5 -}
63
74 /**
85 * @todo Document overall purpose of this class.
96 */
107 class TableDisplay {
11 -
128 /**
139 * Register our parser functions
1410 */
@@ -17,14 +13,6 @@
1814 }
1915
2016 /**
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 - /**
2917 * @todo Document!
3018 * @param string $projectName
3119 * @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
112 + native
Added: svn:keywords
213 + Id
Index: trunk/extensions/SelectionSifter/SelectionSifter.php
@@ -29,6 +29,7 @@
3030
3131 $wgExtensionMessagesFiles['SelectionSifter'] = $dir . 'SelectionSifter.i18n.php';
3232 $wgExtensionMessagesFiles['SelectionSifterAlias'] = $dir . 'SelectionSifter.alias.php';
 33+$wgExtensionMessagesFiles['SelectionSifterMagic'] = $dir . 'SelectionSifter.i18n.magic.php';
3334
3435 $wgAutoloadClasses['SelectionSifterHooks'] = $dir . 'SelectionSifter.hooks.php';
3536 $wgAutoloadClasses['Statistics'] = $dir . 'models/Statistics.php';
@@ -48,7 +49,6 @@
4950 $wgHooks['LoadExtensionSchemaUpdates'][] = 'SelectionSifterHooks::SetupSchema';
5051
5152 $wgHooks['ParserFirstCallInit'][] = 'TableDisplay::ParserFunctionInit';
52 -$wgHooks['LanguageGetMagic'][] = 'TableDisplay::LanguageGetMagic';
5353
5454 $wgHooks['TitleMoveComplete'][] = 'SelectionSifterHooks::TitleMoveComplete';
5555
Index: trunk/extensions/SelectionSifter/SelectionSifter.hooks.php
@@ -8,12 +8,7 @@
99 * @licence Modified BSD License
1010 */
1111
12 -if ( !defined( 'MEDIAWIKI' ) ) {
13 - exit( 1 );
14 -}
15 -
1612 class SelectionSifterHooks {
17 -
1813 private static function updateDatabase( $title, $assessments, $timestamp ) {
1914 $main_title = Title::makeTitle( NS_MAIN, $title->getText() );
2015 $ratings = Rating::forTitle( $main_title );

Follow-up revisions

RevisionCommit summaryAuthorDate
r110191Follow-up to r109525 - added new i18n.magic fileyaron23:37, 27 January 2012
r112633Repaired CALLER parser function after it was broken in r109525. Changed versi...danwe20:43, 28 February 2012
r112635added message explanations again after they were removed in r109525danwe20:50, 28 February 2012

Comments

#Comment by Danwe (talk | contribs)   19:46, 28 February 2012

What's the problem with constants for magic words?

Status & tagging log