Commit Graph

75 Commits

Author SHA1 Message Date
Alex Schroeder
0666ed13af Return objects where it begs for it
sub ParseData is fully backwards compatible. If some module runs it in list
context, then it will get listified hash like previously. New code should
always run it in scalar context though (everything in our code base
was changed according to that).

sub GetTextRevision is not backwards compatible (don't let “wantarray” usage
to confuse you). Most modules do not touch that subroutine, so we are probably
fine (modules from our git repo that do use were changed accordingly).

“EncodePage(%$page)” looks wrong. It seems like we should change it to accept
hash ref.
2015-09-04 04:55:48 +03:00
Alex Schroeder
5f019a6ce2 No more /o, modifiers sorted alphabetically 2015-08-23 21:22:12 +03:00
Alex Schroeder
0ec8dd44e6 use v5.10 everywhere + enabled test in meta.t 2015-08-18 10:48:03 +02:00
Alex Schroeder
3b3fd64688 No more bareword filehandles in modules 2015-05-02 03:49:07 +03:00
Alex Schroeder
238b58ae62 No more "*Sub = *NewSub", \&NewSub used instead. (Completely now!) 2015-04-12 22:50:50 +03:00
Alex Schroeder
482888cfaf No more "*Sub = *NewSub", \&NewSub used instead. (Partial progress) 2015-04-11 23:41:33 +03:00
Alex Schroeder
5d2db4b547 No more "use vars"! 2015-04-10 13:31:28 +03:00
Alex Schroeder
0aa41c8f06 namespaces.pl uses strict
Apparently whatever prevented this from working has been fixed in the
mean time.
2015-03-29 23:15:35 +02:00
Alex Schroeder
013588da6f Merge commit '5e4426b' 2015-03-27 12:12:47 +01:00
Alex Schroeder
a4e0e5a9be "use strict;" in modules (some modules have problems) 2015-03-27 03:01:01 +02:00
Alex Schroeder
a1fd3a2704 namespaces.pl: remove $Monolithic
This option is never set and even it was set (in the old days it
indicated that the entire wiki was going to be exported as a single
file), then I don't see why that should prevent namespaces from
working.
2015-03-17 07:13:44 +01:00
Alex Schroeder
4a29b28ef2 namespaces.pl: add match to @NamespaceParameters
When using $MatchingPages = 1, the following URL would is a
possiblity:
https://campaignwiki.org/wiki/Adventures?search=&match=dung&dosearch=Go%21

In this situation, "Adventures" needs to be the namespace. The
'search' parameter is ignored and the script needs to react to
'match'.
2015-01-07 15:16:09 +01:00
Alex Schroeder
e6d3ad8382 Fixed typo in AddModuleDescription sub name 2014-08-21 22:23:23 +02:00
Alex Schroeder
17bd795ef0 Automatically reformatted modules 2014-08-21 07:29:46 +03:00
Alex Schroeder
23484cce31 Prevent double "Showing revision X" by passing QUIET to GetTextRevision. 2012-11-16 15:51:19 +01:00
Alex Schroeder
33e071b630 Use bsd_glob instead of glob.
Glob will split patterns on whitespace and non-breaking spaces are now
treated as whitespace.
2012-07-21 00:40:42 +02:00
Alex Schroeder
188e219790 $q->path_info lacks UTF-8 decoding.
Fix other encoding issues with namespaces.
2012-07-19 09:05:07 -04:00
Alex Schroeder
af51f7fd8d Use utf8::encode when creating a directory.
There is no way to provide an encoding layer to directory names.
Therefore they need to be raw bytes and not characters. This becomes
apparent when creating namespaces containing non-ASCII characters.
2012-07-19 13:58:58 +02:00
Alex Schroeder
bbdda6787a Pod fix.
Changed =head to =head2 as suggested by anonymous visitor to the wiki.
2012-06-22 18:23:51 +02:00
Alex Schroeder
e533bc3915 Fix an encoding error in namespaces.pl on Debian
The Debian installation uses ext3 and therefore raw bytes for
filenames unlike the HFS filesystem of Mac OSX.

Copyright years were updated. The maintenance output of for drafts was
cleaned up.
2012-05-25 01:00:10 +02:00
Alex Schroeder
c9e39a4c19 getting rid of $Id$ tags in $WikiDescription
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.
2012-04-19 02:18:45 +02:00
Alex Schroeder
69df2b05f1 (NewNamespaceBrowsePage): Allow redirection to namespaces.
(NamespacesNewGetId): Allow for the provision of the ns parameter.
2012-03-20 16:41:22 +00:00
Alex Schroeder
c9f8d09c33 Concise notation. 2012-03-18 01:03:56 +00:00
Alex Schroeder
745094f00e (NamespacesNewGetId): Fix the special case
http://example.org/cgi-bin/wiki.pl/Test?rollback-1234=foo where
Test refers to the namespace and not to the page id.
2012-03-17 19:35:19 +00:00
Alex Schroeder
37210f49d2 (NamespacesInitVariables): URL encode the
current namespace for $ScriptName, $FullUrl and $StaticUrl.
2011-06-23 00:31:59 +00:00
Alex Schroeder
4f538ac690 (DoNamespacesList): Fix the links to
namespaces.
2010-05-07 15:18:57 +00:00
Alex Schroeder
ee4e5ed463 (NewNamespaceGetRcLines): Fix bug that
prevented the oldrc.log file from being read if rc.log was missing
or empty.
2009-07-03 13:49:47 +00:00
Alex Schroeder
c275cd929a (DoNamespacesList): Add trailing newline to raw output. 2009-06-07 18:11:17 +00:00
Alex Schroeder
94c69fefc1 (NamespacesInitVariables): Don't list Main and Self.
(DoNamespacesList): Provide a raw alternative.
2009-06-07 18:05:46 +00:00
Alex Schroeder
fb95c6adf9 Added documentation explaining why full=1 is not supported for the
main RSS feed.
2009-06-07 17:59:07 +00:00
Alex Schroeder
4f984eba5c (%Namespaces): New option to differentiate
between intersites and namespaces.
(NamespacesInitVariables): Set it instead of a local variable.
(DoNamespacesList): Use it.
(NamespacesMenu): Add it to a menu.
2009-06-07 17:03:06 +00:00
Alex Schroeder
80e2f203d2 (@NamespaceParameters): New.
(NamespacesInitVariables): Use new option.
(NamespacesInitVariables): Use new function.
2009-04-06 00:26:46 +00:00
Alex Schroeder
b5dd3e7c9c (NamespacesInitVariables): Match the code
changes in GetId.
2009-04-05 23:36:20 +00:00
Alex Schroeder
c3a84e9266 (NewNamespaceGetRcLines): Strip rollbacks
for every namespace separately.
2009-03-08 23:44:54 +00:00
Alex Schroeder
7634327ab4 (NewNamespaceScriptUrl): Try and handle
the case of namespaces containing non-ASCII characters. This
should be legal, but lead to problems when generating links to
pages in such namespaces. The URL encoding of the non-ASCII
characters prevented the $InterSitePattern from matching. Instead
of using this regular expression, we now try and guess at the
string using URL constraints ([^/?&;=]+), URL decoding it, and
then checking the $InterSitePattern.
2008-12-02 23:45:41 +00:00
Alex Schroeder
fc478a5b7c (NewNamespaceGetAuthorLink): New hook into
GetAuthorLink to make sure the author link is never considered
invalid using NewNamespaceValidId.
(NamespaceValidId): Deleted.
(NewNamespaceValidId): Fully featured replacement only used by
GetAuthorLink. $NamespaceSlashing remains unused.
2008-09-22 01:31:38 +00:00
Alex Schroeder
cc37d33cfb (NewNamespaceDoRc): No longer needed.
(NewNamespaceGetRcLines): New.
(NamespaceRcLines): No longer needed.
2008-09-19 23:55:19 +00:00
Alex Schroeder
562124270d (NewNamespaceScriptUrl): Replaces
NewNamespaceScriptLink. This change depends on the related change
to ScriptLink in wiki.pl and fixes the RSS links.
2008-03-07 09:43:26 +00:00
Alex Schroeder
1963543f94 (NamespacesInitVariables): Always set
$NamespaceRoot because it will be used below when redirecting. Not
setting it will cause redirection to the Main namespace to produce
a wrong edit link to the source page.
2007-11-17 23:59:58 +00:00
Alex Schroeder
7ff7db331d (NamespaceRcLines): Use StripRollbacks. 2007-11-13 20:28:16 +00:00
Alex Schroeder
d103e4d013 (NewNamespaceBrowsePage): Fix test from
$WikiLinks to $FreeLinks.
2007-11-07 17:02:07 +00:00
Alex Schroeder
f8494ce94d Added some POD documentation.
(NewNamespaceScriptLink): Added edit backlink for interlink
redirection.
(NewNamespaceBrowsePage): Replaces BrowsePage; adds redirection
for interlinks.
2007-09-25 15:32:30 +00:00
Alex Schroeder
765129a490 Added some POD documentation.
(NewNamespaceScriptLink): Added edit backlink for interlink
redirection.
(NewNamespaceBrowsePage): Replaces BrowsePage; adds redirection
for interlinks.
2007-09-24 08:29:31 +00:00
Alex Schroeder
8aa29524d0 Update copyright year. 2007-06-02 19:19:24 +00:00
Alex Schroeder
a337b59f6b (NewNamespaceScriptLink): Make the rule
that hacks the namespace prefix more generic, and adapt it to
NewNamespaceUrlEncode which already removes %2f from the URL.
2007-05-30 08:05:09 +00:00
Alex Schroeder
7c5ed5eb8a ($NamespaceSlashing): New variable.
(NewNamespaceDoRc): Set it.
(NewNamespaceUrlEncode): Wrapper around UrlEncode() that uses it.
2007-04-02 17:05:39 +00:00
Alex Schroeder
a8c7dd0a97 Get rid of $NamespacesInit.
(NamespacesInitVariables): Get rid of various Init() calls because
they are all handled in ReInit(). Reset @IndexList so that
AllPagesList will actually do something.
2006-12-22 15:27:17 +00:00
Alex Schroeder
f425952150 (NamespaceRcLines): Bugfixing. 2006-08-24 18:32:53 +00:00
Alex Schroeder
42bc257c6a (NamespaceRcLines): Implement rollback
skipping, too.
2006-08-24 18:23:36 +00:00
Alex Schroeder
3c9b82250e (NamespacesInitVariables): Set $StaticUrl. 2006-04-20 19:59:27 +00:00