r75372 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75371‎ | r75372 | r75373 >
Date:19:14, 25 October 2010
Author:yaron
Status:ok
Tags:
Comment:
Changed ValidationError.php to be included directly instead of autoloaded, to avoid problems with certain setups
Modified paths:
  • /trunk/extensions/Validator/Validator.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Validator/Validator.php
@@ -52,7 +52,8 @@
5353 $wgAutoloadClasses['ParserHook'] = $incDir . 'ParserHook.php';
5454 $wgAutoloadClasses['Validator'] = $incDir . 'Validator.php';
5555 $wgAutoloadClasses['TopologicalSort'] = $incDir . 'TopologicalSort.php';
56 -$wgAutoloadClasses['ValidationError'] = $incDir . 'ValidationError.php';
 56+// No need to autoload this one, since it's directly included below.
 57+//$wgAutoloadClasses['ValidationError'] = $incDir . 'ValidationError.php';
5758 $wgAutoloadClasses['ValidationErrorHandler'] = $incDir . 'ValidationErrorHandler.php';
5859
5960 $wgAutoloadClasses['CriterionHasLength'] = $incDir . 'criteria/CriterionHasLength.php';
@@ -94,5 +95,8 @@
9596 return true;
9697 }
9798
 99+// This file needs to be included directly, since Validator_Settings.php
 100+// uses it, in some rare cases before autoloading is defined.
 101+require_once 'includes/ValidationError.php' ;
98102 // Include the settings file.
99 -require_once 'Validator_Settings.php';
\ No newline at end of file
 103+require_once 'Validator_Settings.php';

Status & tagging log