r75363 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75362‎ | r75363 | r75364 >
Date:16:26, 25 October 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
0.4.2 rc1 & fixed compatibility with mw 1.15.x
Modified paths:
  • /trunk/extensions/Validator/RELEASE-NOTES (modified) (history)
  • /trunk/extensions/Validator/Validator.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Validator/RELEASE-NOTES
@@ -7,8 +7,10 @@
88 == Validator change log ==
99
1010 === Validator 0.4.2 ===
11 -(2010-1x-xx)
 11+(2010-10-28)
1212
 13+* Fixed compatibility with MediaWiki 1.15.x.
 14+
1315 * Removed the lowerCaseValue field in the Parameter class and replaced it's functionality with a ParameterManipulation.
1416
1517 === Validator 0.4.1 ===
Index: trunk/extensions/Validator/Validator.php
@@ -24,7 +24,7 @@
2525 die( 'Not an entry point.' );
2626 }
2727
28 -define( 'Validator_VERSION', '0.4.2 alpha' );
 28+define( 'Validator_VERSION', '0.4.2 rc1' );
2929
3030 // Register the internationalization file.
3131 $wgExtensionMessagesFiles['Validator'] = dirname( __FILE__ ) . '/Validator.i18n.php';
@@ -38,12 +38,6 @@
3939 'descriptionmsg' => 'validator-desc',
4040 );
4141
42 -// This function has been deprecated in 1.16, but needed for earlier versions.
43 -// It's present in 1.16 as a stub, but lets check if it exists in case it gets removed at some point.
44 -if ( function_exists( 'wfLoadExtensionMessages' ) ) {
45 - wfLoadExtensionMessages( 'Validator' );
46 -}
47 -
4842 // Autoload the classes.
4943 $incDir = dirname( __FILE__ ) . '/includes/';
5044 $wgAutoloadClasses['CriterionValidationResult'] = $incDir . 'CriterionValidationResult.php';
@@ -83,5 +77,22 @@
8478 $wgAutoloadClasses['ValidatorListErrors'] = $incDir . 'parserHooks/Validator_ListErrors.php';
8579 unset( $incDir );
8680
 81+$wgExtensionFunctions[] = 'efValidatorSetup';
 82+
 83+/**
 84+ * Function for backwards compatibility with MW 1.15.x.
 85+ *
 86+ * @since 0.4.2
 87+ */
 88+function efValidatorSetup() {
 89+ // This function has been deprecated in 1.16, but needed for earlier versions.
 90+ // It's present in 1.16 as a stub, but lets check if it exists in case it gets removed at some point.
 91+ if ( function_exists( 'wfLoadExtensionMessages' ) ) {
 92+ wfLoadExtensionMessages( 'Validator' );
 93+ }
 94+
 95+ return true;
 96+}
 97+
8798 // Include the settings file.
8899 require_once 'Validator_Settings.php';
\ No newline at end of file

Status & tagging log