moin-search.pl, phpwiki-search.pl and usemod-search.pl were moved into a
new directory, modules/near-links, because they help support search of
near sites. They act as proxies, parsing the HTML and returning a file
format Oddmuse can understand.
See http://oddmuse.org/wiki/Near_Links#Searching_Near_Sites for more
information.
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.
Variables which are essentially global and which contain state are
localized before they are set. In order to localize them, they have to
be declared here using vars, first.
PdfNewGetFooterLinks shows that @NoLinkToPdf is simply a list of pages
that should not offer a PDF link at the bottom. Authors can add their
own exceptions to PdfNewGetFooterLinks, I guess, but in order to do
this from your config file, use vars.
createPDF needs $id as a parameter in order to use it. This code
worked before because the calling context was missing a my $id and
thus $id ended up being a global variable.
DoUpgrade is an alias for DoBrowseRequest which doesn't get $id as a
first parameter like many actions do. Therefore determine $id like
DoBrowseRequest does: call GetId.
This code was hard to maintain because it uses the actual markup code
and replaced a lot of Oddmuse machinery. Just use markdown-rule.pl
instead if you need it.
This should now correctly list pages banned due to BannedContent.
Previously, there was a stray variable $str instead of the actual page
content being matched.