r102716 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102715‎ | r102716 | r102717 >
Date:23:30, 10 November 2011
Author:reedy
Status:deferred
Tags:
Comment:
Normalise whitespace and indenting
Modified paths:
  • /trunk/tools/bugzilla/bugzilla-4.0/extensions/Wikimedia/Extension.pm (modified) (history)

Diff [purge]

Index: trunk/tools/bugzilla/bugzilla-4.0/extensions/Wikimedia/Extension.pm
@@ -30,41 +30,40 @@
3131 # See the documentation of Bugzilla::Hook ("perldoc Bugzilla::Hook"
3232 # in the bugzilla directory) for a list of all available hooks.
3333 sub install_update_db {
34 - my ($self, $args) = @_;
35 -
 34+ my ($self, $args) = @_;
3635 }
3736
3837 sub bug_format_comment {
39 - my ($self, $args) = @_;
40 - my $regexes = $args->{'regexes'};
41 - my $text = $args->{'text'};
42 - my $replacerWP = {
43 - match => qr{\[\[([a-zA-Z0-9_ ,./'()!#\*\$%:\x80-\xff-]+)\]\]},
44 - replace => \&_createWikipediaLink
45 - };
 38+ my ($self, $args) = @_;
 39+ my $regexes = $args->{'regexes'};
 40+ my $text = $args->{'text'};
 41+ my $replacerWP = {
 42+ match => qr{\[\[([a-zA-Z0-9_ ,./'()!#\*\$%:\x80-\xff-]+)\]\]},
 43+ replace => \&_createWikipediaLink
 44+ };
4645 my $replacerCR = {
47 - match => qr{r(\d+)},
48 - replace => \&_createCodeReviewLink
49 - };
50 - #~\br(\d+)\b
51 - # "<a href=\"https://www.mediawiki.org" .
52 - # "/wiki/Special:Code/MediaWiki/$1\" " .
53 - # "title=\"revision $1 in SVN\">r$1</a>"
 46+ match => qr{r(\d+)},
 47+ replace => \&_createCodeReviewLink
 48+ };
 49+ #~\br(\d+)\b
 50+ # "<a href=\"https://www.mediawiki.org" .
 51+ # "/wiki/Special:Code/MediaWiki/$1\" " .
 52+ # "title=\"revision $1 in SVN\">r$1</a>"
5453
55 - push( @$regexes, $replacerWP );
 54+ push( @$regexes, $replacerWP );
5655 push( @$regexes, $replacerCR );
5756 }
5857
5958 sub _createWikipediaLink {
60 - my $match_str = $1;
61 - my $tmp = html_quote($match_str);
62 - my $wikipedia_link = "[[<a href='https://en.wikipedia.org/w/index.php?title=Special:Search&go=Go&search=$tmp'>$tmp</a>]]";
63 - return $wikipedia_link;
 59+ my $match_str = $1;
 60+ my $tmp = html_quote($match_str);
 61+ my $wikipedia_link = "[[<a href='https://en.wikipedia.org/w/index.php?title=Special:Search&go=Go&search=$tmp'>$tmp</a>]]";
 62+ return $wikipedia_link;
6463 };
6564
6665 sub _createCodeReviewLink {
67 - my $rev_link = "<a href=\"https://www.mediawiki.org/wiki/Special:Code/MediaWiki/$1\" title=\"revision $1 in SVN\">r$1</a>";
68 - return $rev_link;
 66+ my $rev_link = "<a href=\"https://www.mediawiki.org/wiki/Special:Code/MediaWiki/$1\" title=\"revision $1 in SVN\">r$1</a>";
 67+ return $rev_link;
6968 };
7069
7170 __PACKAGE__->NAME;

Status & tagging log