Commit Graph

24 Commits

Author SHA1 Message Date
Alex Schroeder
e24f853bef Translation: "Email: "
Removed trailing whitespace.
2015-10-15 14:41:55 +02:00
Aleks-Daniel Jakimenko
4eef4d2d76 No more /o, modifiers sorted alphabetically 2015-08-23 21:22:12 +03:00
Alex Schroeder
b3a1f199c1 Renamed MailCommentAdditions to MailFormAddition 2015-08-18 12:44:08 +02:00
Alex Schroeder
9fbf8a6f39 Use @MyFormChanges in mail.pl
This also requires a change in gravatar.pl because we can no longer test
for MailNewGetCommentForm. Instead, we test @MyFormChanges as variables
are being initialized and if MailCommentAdditions is already on it, we
don't add GravatarFormAddition.
2015-08-18 12:37:18 +02:00
Alex Schroeder
89fa22d1c9 Introducing @MyFormChanges
GetEditForm and GetCommentForm will now call all the subs in
@FormChanges in order to let them change the generated HTML. This is
used by all the modules that used to hook into either of these two
functions.

A typical change from questionasker.pl:

push(@MyFormChanges, \&QuestionAddTo);

sub QuestionAddTo {
  my ($form, $type, $upload) = @_;
  if (not $upload
      and not QuestionaskerException(GetId())
      and not $QuestionaskerRememberAnswer && GetParam($QuestionaskerSecretKey, 0)
      and not UserIsEditor()) {
    my $question = QuestionaskerGetQuestion();
    $form =~ s/(.*)<p>(.*?)<label for="username">/$1$question<p>$2<label for="username">/;
  }
  return $form;
}

This commit als moves from &$foo to $foo->() based on a recommendation
in Modern Perl by Conway.
2015-08-18 11:11:13 +02:00
Alex Schroeder
58e9a1e240 use v5.10 everywhere + enabled test in meta.t 2015-08-18 10:48:03 +02:00
Aleks-Daniel Jakimenko
40ec24349a No more "*Sub = *NewSub", \&NewSub used instead. (Partial progress) 2015-04-11 23:41:33 +03:00
Aleks-Daniel Jakimenko
6f8d281d79 No more "use vars"! 2015-04-10 13:31:28 +03:00
Alex Schroeder
1e5fe85253 gravatar.pl ready for use strict
Looks like a simple typo.
2015-03-28 16:45:10 +01:00
Aleks-Daniel Jakimenko
4492ede096 "use strict;" in modules (some modules have problems) 2015-03-27 03:01:01 +02:00
Aleks-Daniel Jakimenko
62c7553d82 'return undef' changed to 'return'
This command was used:
find . -type f -print0 | xargs -0 sed -i 's/return undef/return/g'

The idea behind this commit is described on http://oddmuse.org/wiki/Refactoring page.
In short: 'return undef' returns (undef) in list context (a list with one element),
which is wrong.
2015-02-27 12:10:18 +02:00
Alex Schroeder
f7b99d44fd gravatar.pl: use https 2014-08-25 20:29:25 +02:00
Alex Schroeder
5aba2ae56f Fixed typo in AddModuleDescription sub name 2014-08-21 22:23:23 +02:00
Alex Jakimenko
ee932dee37 Automatically reformatted modules 2014-08-21 07:29:46 +03:00
Alex Schroeder
f11e2a8731 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
f7aa033939 * gravatar.pl (AddGravatar): UnquoteHtml the comment
before adding the gravatar to it.
2012-02-10 10:49:04 +00:00
Alex Schroeder
3809f60b44 (AddGravatar): Ignore case. 2011-03-03 12:55:24 +00:00
Alex Schroeder
2d63c3ea3b (AddGravatar): Prefix "http://" to homepage
if user did not provide it.
2011-03-01 16:48:41 +00:00
Alex Schroeder
15edfb4232 No extra paragraph. 2011-02-12 22:09:55 +00:00
Alex Schroeder
7b84db38bf Separate the homepage URL from the name by a space. 2011-02-12 22:03:20 +00:00
Alex Schroeder
e5ce373cf7 Fix gravatar regexp in order to not munch John Williams' name. 2011-02-12 22:00:16 +00:00
Alex Schroeder
c494360584 (GravatarRule): Accept URL in addition to
the name.
(AddGravatar): Add homepage if available.
(GravatarNewGetSummary): Use the regular expression variable.
2011-02-12 21:44:57 +00:00
Alex Schroeder
4b4f7fbb98 (AddGravatar): New; strip gravatar link from
comment summary.
2010-10-09 23:27:09 +00:00
Alex Schroeder
4e00053b6a New 2010-10-09 22:48:42 +00:00