-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Platonides Sent: Thursday, July 10, 2008 6:19 PM To: mediawiki-l@lists.wikimedia.org Subject: Re: [Mediawiki-l] advice on telling wiki: Don't run extension if MWversion 1.13
Christensen, Courtney wrote:
What is a good way to not load the extension if the wiki version is high enough? Right now I am using
the
inaccurate if (function_exists( 'wfLoadExtensionMessages' )) { return true; }
P > What about checking the global variable $wgVersion ?
I tried that, but I couldn't get $wgVersion to be declared at the top of the file. I'm trying to do a check like the if (!defined(MEDIAWIKI)) at the top of the file so the extension isn't loaded at all if it isn't needed. I'm not sure why $wgVersion was giving me problems outside a function, but it was.