Magnus Manske wrote:
I think we all work with "standard
settings", and there are no warnings
showing up, just like the Bomis server uses standard and doesn't show
anything like that, either.
But at least one major Wikipedia bug was caused by ignoring these
warnings, so this certainly isn't a good idea. (In development, that is.
The Bomis server is obviously a different matter.)
Here,
$wikiTalk, $wikiNamespaceBackground["talk"], $wikiUser and
$wikiWikipedia are all undefined. I've no idea how to clean this
up, because I don't understand what it's supposed to look like.
Why are some of the indices variables and other constants?
In particular, what is the intended distinction between
$wikiNamespaceBackground["talk"] and $wikiNamespaceBackground[$wikiTalk]?
What should be done with this code?
The reason (without looking at the code right now) is probably the missing
"global" statement at the beginning of the function.
No, it's caused by using them before they are defined. The file
wikiTextEn.php which defines them is included later on. (This doesn't
apply to $wikiNamespaceBackground["talk"], which isn't defined anywhere.
I assume it's a mistake for $wikiNamespaceBackground[$wikiTalk].)
For the same reason, $wikiCharset is also used before being defined.
So the values in $wikiNamespaceBackground need to be assigned
after wikiTextEn.php (and any other language-specific setting file)
has been included. But these files can modify $wikiNamespaceBackground
(at least, the Esperanto one does - perhaps it shouldn't), so the only
solution appears to be to declare $wikiNamespaceBackground first,
then include the language-specific files, then assign values to
$wikiNamespaceBackground, but making sure not to overwrite any values
that have already been assigned. I'll post a patch for this later.
--
Zundark