The EN DASH is not really required in year ranges such as 2012–2015 when
we're talking about comments in source code that is probably being
displayed in a fixed font anyway. Changing back to an ordinary hypen
allows us to make a meaningful test for use utf8.
We have just read-TFM and figured out that we can use \&Sub. This way it
passes "use strict" but produces a warning with "use warnings" (the
warning is "Subroutine package::Sub redefined at ...").
We can "fix" it with "no warnings 'redefine'"
All the banning modules have a problem. They use code like the
following:
*StrangeOldBannedContent = *BannedContent;
*BannedContent = *StrangeNewBannedContent;
The code above changes both the sub and the variable. $BannedContent now
points to $StrangeNewBannedContent (which is undefined) and the name of
the Banned Content page is only accessible via $StrangeOldBannedContent.
If we copy $StrangeOldBannedContent to $BannedContent, everything else
will keep working.
$BannedContent = $StrangeOldBannedContent;
But now use strict will not work. When we tried this:
my $StrangeOldBannedContent; # use strict
Then BannedContent disappeared from the admin page as shown by the tests
in strange-spam.t; the correct solution uses our instead of my.
I'm not sure why.
When the webserver is behind a reverse proxy, $ENV{REMOTE_ADDR} is not
the actual remote client's address but the reverse proxy's address. The
actual remote client's address is available from an environment
variable. The name of this variable depends on the proxy, e.g. pound
uses $ENV{HTTP_X_FORWARDED_FOR}.
As suggested by tyatsumi on the wiki, all access $ENV{REMOTE_ADDR} now
happens via a new function which allows users to override it in their
config file.
Renamed wrappers to make sure all have the Log prefix.
Moved log writing to a separate sub. Provide a little wrapper text for
banned hosts.
Using TimeToW3 to use a standard date and time format.
Use the id if no page has been opened yet (since DoEdit calls
UserIsBanned and DoPost calls UserCanEdit before either calls
OpenPage).
Replaced the $Id$ tags in $WikiDescription for all the modules and wiki.pl itself with a link to the source and an appropriate wiki page, if possible. This is shown in action=version and should help users figure out what another wiki has installed.