https://bugzilla.wikimedia.org/show_bug.cgi?id=32969
Web browser: ---
Bug #: 32969
Summary: Maps: including Validator.
Product: MediaWiki extensions
Version: any
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: Maps
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
`Maps' extension requires `Validator' extension to work. If `Validator'
extension is not yet enabled, `Maps' includes it:
> // Include the Validator extension if that hasn't been done yet, since it's
> required for Maps to work.
> if ( !defined( 'Validator_VERSION' ) ) {
> @include_once( dirname( __FILE__ ) . '/../Validator/Validator.php' );
> }
> // Only initialize the extension when all dependencies are present.
> if ( ! defined( 'Validator_VERSION' ) ) {
> die( '<b>Error:</b> You need to have <a
> href="http://www.mediawiki.org/wiki/Extension:Validator">Validator</a>
> installed in
order to use <a
href="http://www.mediawiki.org/wiki/Extension:Maps">Maps</a>.<br />' );
> }
This, probably, helps a little in simple cases, so wiki site admin may not
worry about enabling Validator. However, in complex cases does not help but it
confuses.
I have a kind of wiki farm, and have multiple versions of extensions installed
side-by-side, for example:
> Validator
> Validator-0.4.12
> Validator-0.4.13
so one wiki site can use Validator-0.4.12, another site can use
Validator-0.4.13, and test site can use just Validator (from trunk). In my
`LocalSettings.php' I mistakenly required `Validator-0.4.13' after `Maps', e.
g.:
> require_once( ".../Maps-1.0.5" );
> require_once( ".../Validator-0.4.13" );
Instead of having clear error message "Maps extension requires Validator.
Please enable it before enabling Maps." (or something similar) I have
> Notice: Constant Validator_VERSION already defined in
> .../Validator-0.4.13/Validator.php on line 28
> Fatal error: Cannot redeclare class ValidationError in
> .../Validator-0.4.13/includes/ValidationError.php on line 14
Please, do *not* include `Validator' implicitly "on behalf" of administrator,
but issue clear error message if `Validator' is not yet included.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l