kareila: (Default)
kareila ([personal profile] kareila) wrote in [site community profile] changelog2011-11-28 06:47 pm

[dw-free] move cgi-bin/lj*.pl files into proper modules (in cgi-bin/LJ)

[commit: http://hg.dwscoalition.org/dw-free/rev/9f92be0f0cdc]

http://bugs.dwscoalition.org/show_bug.cgi?id=1726

Trailing whitespace cleanup.

Patch by [personal profile] kareila.

Files modified:
  • bin/worker/esn-cluster-subs
  • bin/worker/esn-cluster-subs-mass
  • bin/worker/esn-filter-subs
  • bin/worker/esn-filter-subs-mass
  • bin/worker/esn-fired-event
  • bin/worker/esn-fired-event-mass
  • bin/worker/esn-process-sub
  • bin/worker/esn-process-sub-mass
  • bin/worker/process-esn
  • bin/worker/process-esn-mass
  • bin/worker/process-eventlogrecord
  • bin/worker/process-privacy
  • cgi-bin/Apache/LiveJournal.pm
  • cgi-bin/DW/Worker/XPostWorker.pm
  • cgi-bin/LJ/Tags.pm
  • t/comment.t
  • t/esn-journalnewcomment.t
  • t/protocol.t
--------------------------------------------------------------------------------
diff -r 0f9b745ab598 -r 9f92be0f0cdc bin/worker/esn-cluster-subs
--- a/bin/worker/esn-cluster-subs	Fri Nov 25 23:12:05 2011 +0800
+++ b/bin/worker/esn-cluster-subs	Mon Nov 28 12:47:24 2011 -0600
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 # This code was forked from the LiveJournal project owned and operated
-# by Live Journal, Inc. The code has been modified and expanded by 
+# by Live Journal, Inc. The code has been modified and expanded by
 # Dreamwidth Studios, LLC. These files were originally licensed under
 # the terms of the license supplied by Live Journal, Inc, which can
 # currently be found at:
@@ -8,7 +8,7 @@
 # http://code.livejournal.org/trac/livejournal/browser/trunk/LICENSE-LiveJournal.txt
 #
 # In accordance with the original license, this code and all its
-# modifications are provided under the GNU General Public License. 
+# modifications are provided under the GNU General Public License.
 # A copy of that license can be found in the LICENSE file included as
 # part of this distribution.
 
diff -r 0f9b745ab598 -r 9f92be0f0cdc bin/worker/esn-cluster-subs-mass
--- a/bin/worker/esn-cluster-subs-mass	Fri Nov 25 23:12:05 2011 +0800
+++ b/bin/worker/esn-cluster-subs-mass	Mon Nov 28 12:47:24 2011 -0600
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 # This code was forked from the LiveJournal project owned and operated
-# by Live Journal, Inc. The code has been modified and expanded by 
+# by Live Journal, Inc. The code has been modified and expanded by
 # Dreamwidth Studios, LLC. These files were originally licensed under
 # the terms of the license supplied by Live Journal, Inc, which can
 # currently be found at:
@@ -8,7 +8,7 @@
 # http://code.livejournal.org/trac/livejournal/browser/trunk/LICENSE-LiveJournal.txt
 #
 # In accordance with the original license, this code and all its
-# modifications are provided under the GNU General Public License. 
+# modifications are provided under the GNU General Public License.
 # A copy of that license can be found in the LICENSE file included as
 # part of this distribution.
 
diff -r 0f9b745ab598 -r 9f92be0f0cdc bin/worker/esn-filter-subs
--- a/bin/worker/esn-filter-subs	Fri Nov 25 23:12:05 2011 +0800
+++ b/bin/worker/esn-filter-subs	Mon Nov 28 12:47:24 2011 -0600
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 # This code was forked from the LiveJournal project owned and operated
-# by Live Journal, Inc. The code has been modified and expanded by 
+# by Live Journal, Inc. The code has been modified and expanded by
 # Dreamwidth Studios, LLC. These files were originally licensed under
 # the terms of the license supplied by Live Journal, Inc, which can
 # currently be found at:
@@ -8,7 +8,7 @@
 # http://code.livejournal.org/trac/livejournal/browser/trunk/LICENSE-LiveJournal.txt
 #
 # In accordance with the original license, this code and all its
-# modifications are provided under the GNU General Public License. 
+# modifications are provided under the GNU General Public License.
 # A copy of that license can be found in the LICENSE file included as
 # part of this distribution.
 
diff -r 0f9b745ab598 -r 9f92be0f0cdc bin/worker/esn-filter-subs-mass
--- a/bin/worker/esn-filter-subs-mass	Fri Nov 25 23:12:05 2011 +0800
+++ b/bin/worker/esn-filter-subs-mass	Mon Nov 28 12:47:24 2011 -0600
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 # This code was forked from the LiveJournal project owned and operated
-# by Live Journal, Inc. The code has been modified and expanded by 
+# by Live Journal, Inc. The code has been modified and expanded by
 # Dreamwidth Studios, LLC. These files were originally licensed under
 # the terms of the license supplied by Live Journal, Inc, which can
 # currently be found at:
@@ -8,7 +8,7 @@
 # http://code.livejournal.org/trac/livejournal/browser/trunk/LICENSE-LiveJournal.txt
 #
 # In accordance with the original license, this code and all its
-# modifications are provided under the GNU General Public License. 
+# modifications are provided under the GNU General Public License.
 # A copy of that license can be found in the LICENSE file included as
 # part of this distribution.
 
diff -r 0f9b745ab598 -r 9f92be0f0cdc bin/worker/esn-fired-event
--- a/bin/worker/esn-fired-event	Fri Nov 25 23:12:05 2011 +0800
+++ b/bin/worker/esn-fired-event	Mon Nov 28 12:47:24 2011 -0600
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 # This code was forked from the LiveJournal project owned and operated
-# by Live Journal, Inc. The code has been modified and expanded by 
+# by Live Journal, Inc. The code has been modified and expanded by
 # Dreamwidth Studios, LLC. These files were originally licensed under
 # the terms of the license supplied by Live Journal, Inc, which can
 # currently be found at:
@@ -8,7 +8,7 @@
 # http://code.livejournal.org/trac/livejournal/browser/trunk/LICENSE-LiveJournal.txt
 #
 # In accordance with the original license, this code and all its
-# modifications are provided under the GNU General Public License. 
+# modifications are provided under the GNU General Public License.
 # A copy of that license can be found in the LICENSE file included as
 # part of this distribution.
 
diff -r 0f9b745ab598 -r 9f92be0f0cdc bin/worker/esn-fired-event-mass
--- a/bin/worker/esn-fired-event-mass	Fri Nov 25 23:12:05 2011 +0800
+++ b/bin/worker/esn-fired-event-mass	Mon Nov 28 12:47:24 2011 -0600
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 # This code was forked from the LiveJournal project owned and operated
-# by Live Journal, Inc. The code has been modified and expanded by 
+# by Live Journal, Inc. The code has been modified and expanded by
 # Dreamwidth Studios, LLC. These files were originally licensed under
 # the terms of the license supplied by Live Journal, Inc, which can
 # currently be found at:
@@ -8,7 +8,7 @@
 # http://code.livejournal.org/trac/livejournal/browser/trunk/LICENSE-LiveJournal.txt
 #
 # In accordance with the original license, this code and all its
-# modifications are provided under the GNU General Public License. 
+# modifications are provided under the GNU General Public License.
 # A copy of that license can be found in the LICENSE file included as
 # part of this distribution.
 
diff -r 0f9b745ab598 -r 9f92be0f0cdc bin/worker/esn-process-sub
--- a/bin/worker/esn-process-sub	Fri Nov 25 23:12:05 2011 +0800
+++ b/bin/worker/esn-process-sub	Mon Nov 28 12:47:24 2011 -0600
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 # This code was forked from the LiveJournal project owned and operated
-# by Live Journal, Inc. The code has been modified and expanded by 
+# by Live Journal, Inc. The code has been modified and expanded by
 # Dreamwidth Studios, LLC. These files were originally licensed under
 # the terms of the license supplied by Live Journal, Inc, which can
 # currently be found at:
@@ -8,7 +8,7 @@
 # http://code.livejournal.org/trac/livejournal/browser/trunk/LICENSE-LiveJournal.txt
 #
 # In accordance with the original license, this code and all its
-# modifications are provided under the GNU General Public License. 
+# modifications are provided under the GNU General Public License.
 # A copy of that license can be found in the LICENSE file included as
 # part of this distribution.
 
diff -r 0f9b745ab598 -r 9f92be0f0cdc bin/worker/esn-process-sub-mass
--- a/bin/worker/esn-process-sub-mass	Fri Nov 25 23:12:05 2011 +0800
+++ b/bin/worker/esn-process-sub-mass	Mon Nov 28 12:47:24 2011 -0600
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 # This code was forked from the LiveJournal project owned and operated
-# by Live Journal, Inc. The code has been modified and expanded by 
+# by Live Journal, Inc. The code has been modified and expanded by
 # Dreamwidth Studios, LLC. These files were originally licensed under
 # the terms of the license supplied by Live Journal, Inc, which can
 # currently be found at:
@@ -8,7 +8,7 @@
 # http://code.livejournal.org/trac/livejournal/browser/trunk/LICENSE-LiveJournal.txt
 #
 # In accordance with the original license, this code and all its
-# modifications are provided under the GNU General Public License. 
+# modifications are provided under the GNU General Public License.
 # A copy of that license can be found in the LICENSE file included as
 # part of this distribution.
 
diff -r 0f9b745ab598 -r 9f92be0f0cdc bin/worker/process-esn
--- a/bin/worker/process-esn	Fri Nov 25 23:12:05 2011 +0800
+++ b/bin/worker/process-esn	Mon Nov 28 12:47:24 2011 -0600
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 # This code was forked from the LiveJournal project owned and operated
-# by Live Journal, Inc. The code has been modified and expanded by 
+# by Live Journal, Inc. The code has been modified and expanded by
 # Dreamwidth Studios, LLC. These files were originally licensed under
 # the terms of the license supplied by Live Journal, Inc, which can
 # currently be found at:
@@ -8,7 +8,7 @@
 # http://code.livejournal.org/trac/livejournal/browser/trunk/LICENSE-LiveJournal.txt
 #
 # In accordance with the original license, this code and all its
-# modifications are provided under the GNU General Public License. 
+# modifications are provided under the GNU General Public License.
 # A copy of that license can be found in the LICENSE file included as
 # part of this distribution.
 
diff -r 0f9b745ab598 -r 9f92be0f0cdc bin/worker/process-esn-mass
--- a/bin/worker/process-esn-mass	Fri Nov 25 23:12:05 2011 +0800
+++ b/bin/worker/process-esn-mass	Mon Nov 28 12:47:24 2011 -0600
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 # This code was forked from the LiveJournal project owned and operated
-# by Live Journal, Inc. The code has been modified and expanded by 
+# by Live Journal, Inc. The code has been modified and expanded by
 # Dreamwidth Studios, LLC. These files were originally licensed under
 # the terms of the license supplied by Live Journal, Inc, which can
 # currently be found at:
@@ -8,7 +8,7 @@
 # http://code.livejournal.org/trac/livejournal/browser/trunk/LICENSE-LiveJournal.txt
 #
 # In accordance with the original license, this code and all its
-# modifications are provided under the GNU General Public License. 
+# modifications are provided under the GNU General Public License.
 # A copy of that license can be found in the LICENSE file included as
 # part of this distribution.
 
diff -r 0f9b745ab598 -r 9f92be0f0cdc bin/worker/process-eventlogrecord
--- a/bin/worker/process-eventlogrecord	Fri Nov 25 23:12:05 2011 +0800
+++ b/bin/worker/process-eventlogrecord	Mon Nov 28 12:47:24 2011 -0600
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 # This code was forked from the LiveJournal project owned and operated
-# by Live Journal, Inc. The code has been modified and expanded by 
+# by Live Journal, Inc. The code has been modified and expanded by
 # Dreamwidth Studios, LLC. These files were originally licensed under
 # the terms of the license supplied by Live Journal, Inc, which can
 # currently be found at:
@@ -8,7 +8,7 @@
 # http://code.livejournal.org/trac/livejournal/browser/trunk/LICENSE-LiveJournal.txt
 #
 # In accordance with the original license, this code and all its
-# modifications are provided under the GNU General Public License. 
+# modifications are provided under the GNU General Public License.
 # A copy of that license can be found in the LICENSE file included as
 # part of this distribution.
 
diff -r 0f9b745ab598 -r 9f92be0f0cdc bin/worker/process-privacy
--- a/bin/worker/process-privacy	Fri Nov 25 23:12:05 2011 +0800
+++ b/bin/worker/process-privacy	Mon Nov 28 12:47:24 2011 -0600
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 # This code was forked from the LiveJournal project owned and operated
-# by Live Journal, Inc. The code has been modified and expanded by 
+# by Live Journal, Inc. The code has been modified and expanded by
 # Dreamwidth Studios, LLC. These files were originally licensed under
 # the terms of the license supplied by Live Journal, Inc, which can
 # currently be found at:
@@ -8,7 +8,7 @@
 # http://code.livejournal.org/trac/livejournal/browser/trunk/LICENSE-LiveJournal.txt
 #
 # In accordance with the original license, this code and all its
-# modifications are provided under the GNU General Public License. 
+# modifications are provided under the GNU General Public License.
 # A copy of that license can be found in the LICENSE file included as
 # part of this distribution.
 
diff -r 0f9b745ab598 -r 9f92be0f0cdc cgi-bin/Apache/LiveJournal.pm
--- a/cgi-bin/Apache/LiveJournal.pm	Fri Nov 25 23:12:05 2011 +0800
+++ b/cgi-bin/Apache/LiveJournal.pm	Mon Nov 28 12:47:24 2011 -0600
@@ -396,7 +396,7 @@
     }
 
     # handle alternate domains
-    if ( $host ne $LJ::DOMAIN && $host ne $LJ::DOMAIN_WEB && 
+    if ( $host ne $LJ::DOMAIN && $host ne $LJ::DOMAIN_WEB &&
            !( $LJ::EMBED_MODULE_DOMAIN && $host =~ /$LJ::EMBED_MODULE_DOMAIN$/ ) ) {
         my $which_alternate_domain = undef;
         foreach my $other_host ( @LJ::ALTERNATE_DOMAINS ) {
@@ -426,7 +426,7 @@
 
     # block on IP address for anonymous users but allow users to log in,
     # and logged in users to go through
-    
+
     # we're not logged in, and we're not in the middle of logging in
     unless ( LJ::get_remote() || LJ::remote_bounce_url() ) {
         # blocked anon uri contains more information for the user
@@ -535,9 +535,9 @@
             # the entry is specified but invalid OR
             # the remote user owns the journal we're viewing OR
             # the remote user posted the entry we're viewing
-            my $should_show_page = ( $u && ! $u->is_visible ) || 
+            my $should_show_page = ( $u && ! $u->is_visible ) ||
                                    ( $entry && ! $entry->valid ) ||
-                                   ( $remote && 
+                                   ( $remote &&
                                        ( $remote->can_manage( $u ) || ( $entry && $remote->equals( $poster ) ) )
                                    );
 
@@ -1263,7 +1263,7 @@
                 $r->print("User-Agent: $_\n");
                 # Some bots ignore generic section if a more specific on exists
                 $r->print("Disallow: /\n");
-                $r->print("Allow: /data/foaf\n"); 
+                $r->print("Allow: /data/foaf\n");
                 $r->print("\n");
             }
         }
@@ -1745,7 +1745,7 @@
     # (e.g. string username goes as int, if username contains digits only).
     # As workaround, we can select some elements by it's names
     # and label them by correct types.
- 
+
     # Key - field name, value - type.
     my %lj_types_map = (
         journalname => 'string',
diff -r 0f9b745ab598 -r 9f92be0f0cdc cgi-bin/DW/Worker/XPostWorker.pm
--- a/cgi-bin/DW/Worker/XPostWorker.pm	Fri Nov 25 23:12:05 2011 +0800
+++ b/cgi-bin/DW/Worker/XPostWorker.pm	Mon Nov 28 12:47:24 2011 -0600
@@ -56,7 +56,7 @@
         if keys %$arg;
     return $job->permanent_failure("Missing argument")
         unless defined $uid && defined $ditemid && defined $acctid;
-        
+
     # get the user from the uid
     my $u = LJ::want_user($uid) or return $job->failed("Unable to load user with uid $uid");
 
@@ -86,7 +86,7 @@
             )->fire_job
         );
     }
-    
+
     $job->completed;
 }
 
diff -r 0f9b745ab598 -r 9f92be0f0cdc cgi-bin/LJ/Tags.pm
--- a/cgi-bin/LJ/Tags.pm	Fri Nov 25 23:12:05 2011 +0800
+++ b/cgi-bin/LJ/Tags.pm	Mon Nov 28 12:47:24 2011 -0600
@@ -413,7 +413,7 @@
             or return undef;
 
         # list of (jid, jitemid) pairs that we get from %need
-        my @where; 
+        my @where;
         foreach my $jid (keys %{$need{$cid} || {}}) {
             my @jitemids = keys %{$need{$cid}->{$jid} || {}};
             next unless @jitemids;
@@ -1407,7 +1407,7 @@
             while $_ = $sth->fetchrow_array;
     }
 
-    # getting the entry ids the tag might need to be added to (might because if we are merging to an existing tag, 
+    # getting the entry ids the tag might need to be added to (might because if we are merging to an existing tag,
     # we need to take out the entries that already have both a tag we are merging from and the tag we are merging to)
     my $sth = $u->prepare( "SELECT DISTINCT jitemid FROM logtags WHERE journalid= ? AND kwid IN (" . join( ", ", ( "?" ) x @merge_from_ids ) . ")" );
     return $rollback->() if $u->err || ! $sth;
@@ -1504,7 +1504,7 @@
         }
     }
 
-    # delete other tags from database and entries 
+    # delete other tags from database and entries
     foreach my $table ( qw( usertags logtags logtagsrecent logkwsum ) ) {
         $sth = $u->prepare( "DELETE FROM $table WHERE journalid = ? AND kwid IN (" . join( ", ", ( "?" ) x @merge_from_ids ) . ")" );
         return $rollback->() if $u->err || ! $sth;
@@ -1520,7 +1520,7 @@
     LJ::Tags::reset_cache( $u );
     LJ::Tags::reset_cache( $u => \@jitemids );
 
-    return 1;    
+    return 1;
 }
 
 # <LJFUNC>
diff -r 0f9b745ab598 -r 9f92be0f0cdc t/comment.t
--- a/t/comment.t	Fri Nov 25 23:12:05 2011 +0800
+++ b/t/comment.t	Mon Nov 28 12:47:24 2011 -0600
@@ -55,7 +55,7 @@
         # set a prop once, then re-set its value again
         my $jtalkid = $c2->jtalkid;
 
-        # FIXME the whole idea of using undef as one of the loop values seem to make the code 
+        # FIXME the whole idea of using undef as one of the loop values seem to make the code
         # more complex, check if this can be changed
         foreach my $propval (0,1,undef,1) {
             # re-instantiate if we've blown $c2 away
@@ -65,15 +65,15 @@
             $LJ::_T_COMMENT_SET_PROPS_INSERT = sub { $inserted++ };
             my $deleted = 0;
             $LJ::_T_COMMENT_SET_PROPS_DELETE = sub { $deleted++ };
-                
+
             $c2->set_prop('opt_preformatted', $propval);
-                
+
             if (defined $propval) {
                 ok($inserted == 1 && $deleted == 0, "$propval: Inserted talkprop row prop-erly");
             } else {
                 ok($deleted == 1 && $inserted == 0, "undef: Deleted talkprop row prop-erly");
             }
-                
+
             is($c2->prop('opt_preformatted'),  $propval, (defined $propval ? $propval : 'undef') . ": Set prop and read back via ->prop");
             is($c2->props->{opt_preformatted}, $propval, (defined $propval ? $propval : 'undef') . ": Set prop and read back via ->props");
 
@@ -81,7 +81,7 @@
             LJ::Comment->reset_singletons;
             my $loaded = 0;
             $LJ::_T_GET_TALK_PROPS2_MEMCACHE = sub { $loaded++ };
-            
+
             my $c2_new = LJ::Comment->new($u, jtalkid => $jtalkid);
             my $propval = $c2_new->prop('opt_preformatted');
             ok($loaded == 1, (defined $propval ? $propval : 'undef') . ", Re-instantiated comment and re-loaded prop");
@@ -97,11 +97,11 @@
             $LJ::_T_COMMENT_SET_PROPS_INSERT = sub { $inserted++ };
             my $deleted = 0;
             $LJ::_T_COMMENT_SET_PROPS_DELETE = sub { $deleted++ };
-                
+
             $c2->set_prop_raw('edit_time', "UNIX_TIMESTAMP()");
-                
+
             ok($inserted == 1 && $deleted == 0, "Inserted raw talkprop row prop-erly");
-                
+
             ok($c2->prop('edit_time') =~ /^\d+$/, "Set raw prop and read back via ->prop");
             ok($c2->props->{edit_time} =~ /^\d+$/ , "Set raw prop and read back via ->props");
 
@@ -109,7 +109,7 @@
             LJ::Comment->reset_singletons;
             my $loaded = 0;
             $LJ::_T_GET_TALK_PROPS2_MEMCACHE = sub { $loaded++ };
-            
+
             my $c2_new = LJ::Comment->new($u, jtalkid => $jtalkid);
             my $propval = $c2_new->prop('edit_time');
             ok($loaded == 1 && $c2_new != $c2 && $propval == $propval, "Re-instantiated comment and re-loaded raw prop");
@@ -130,7 +130,7 @@
                 my $c3 = $e3->t_enter_comment;
 
                 $c3->set_props('opt_preformatted' => 1, 'picture_keyword' => 2);
-                ok($c3->prop('opt_preformatted') == 1 && $c3->prop('picture_keyword') == 2 && 
+                ok($c3->prop('opt_preformatted') == 1 && $c3->prop('picture_keyword') == 2 &&
                    $inserted == 1 && $deleted == 0 && $queried == 1,
                    "Set 2 props and read back");
             }
@@ -142,7 +142,7 @@
                 my $c4 = $e4->t_enter_comment;
 
                 $c4->set_props('opt_preformatted' => undef, 'picture_keyword' => 2);
-                ok(!defined( $c4->prop('opt_preformatted') ) && $c4->prop('picture_keyword') == 2 && 
+                ok(!defined( $c4->prop('opt_preformatted') ) && $c4->prop('picture_keyword') == 2 &&
                    $inserted == 1 && $deleted == 1 && $queried == 1,
                    "Set 1 prop, deleted 1, and read back");
             }
@@ -154,7 +154,7 @@
                 my $c5 = $e5->t_enter_comment;
 
                 $c5->set_props('opt_preformatted' => undef, 'picture_keyword' => undef);
-                ok(!defined( $c5->prop('opt_preformatted') ) && !defined( $c5->prop('picture_keyword') ) && 
+                ok(!defined( $c5->prop('opt_preformatted') ) && !defined( $c5->prop('picture_keyword') ) &&
                    $inserted == 0 && $deleted == 1 && $queried == 1,
                    "Set 1 prop, deleted 1, and read back");
             }
@@ -166,7 +166,7 @@
                 my $c6 = $e6->t_enter_comment;
 
                 $c6->set_props_raw('edit_time' => "UNIX_TIMESTAMP()", 'opt_preformatted' => 1);
-                ok($c6->prop('opt_preformatted') == 1 && $c6->prop('edit_time') =~ /^\d+$/ && 
+                ok($c6->prop('opt_preformatted') == 1 && $c6->prop('edit_time') =~ /^\d+$/ &&
                    $inserted == 1 && $deleted == 0 && $queried == 1,
                    "Set 2 raw props and read back");
             }
@@ -174,7 +174,7 @@
     }
 
     # post a tree of comments
-    { 
+    {
 
         # step counter so we can test multiple legacy API interactions
         foreach my $step (0..2) {
@@ -212,11 +212,11 @@
 
                 my $curr = [ $c => [] ];
                 push @tree, $curr;
- 
+
                 # now make 5 replies to each comment, except for the first
                 foreach my $reply_ct (1..$top_reply_ct) {
                     last if $top_reply_ct == 0;
-                    
+
                     my $child = $c->t_reply;
                     $child->set_prop('opt_preformatted', 1);
                     push @{$curr->[1]}, $child;
@@ -225,7 +225,7 @@
 
             # are the first-level children created properly?
             ok(@tree == 6, "$step: Created 6 child comments");
-        
+
             # how about subchildren?
             my %want = map { $_ => 1 } 0..5;
             delete $want{scalar @{$_->[1]} } foreach @tree;
@@ -245,7 +245,7 @@
             LJ::Talk::get_talk_data($u, 'L', $entry->jitemid)        if $step == 1;
             $entry->comment_list                                     if $step == 2;
             LJ::Talk::load_comments($u, undef, 'L', $entry->jitemid) if $step == 3;
-            
+
             %want = map { $_ => 1 } 0..5;
             foreach my $parent (map { $_->[0] } @tree) {
 
@@ -298,7 +298,7 @@
                     }
                 }
             }
-        } 
+        }
     }
 
     # test editing of comment text
diff -r 0f9b745ab598 -r 9f92be0f0cdc t/esn-journalnewcomment.t
--- a/t/esn-journalnewcomment.t	Fri Nov 25 23:12:05 2011 +0800
+++ b/t/esn-journalnewcomment.t	Mon Nov 28 12:47:24 2011 -0600
@@ -23,7 +23,7 @@
 #    S4:     0       0       0   all new comments from any journal you watch
 #    -- NOTE: This test is disabled unless JournalNewComment allows it
 
-# we also want to test for matching and not matching cases for JournalNewComment::TopLevel 
+# we also want to test for matching and not matching cases for JournalNewComment::TopLevel
 # a subclass of JournalNewComment
 
 my %got_email = ();   # userid -> received email
@@ -265,7 +265,7 @@
                             arg1    => $u2e6->ditemid,
                             );
 
-    my $subsc2 = $u1->subscribe( 
+    my $subsc2 = $u1->subscribe(
                     event  => "JournalNewComment::TopLevel",
                     method  => "Email",
                     journal => $u2,
diff -r 0f9b745ab598 -r 9f92be0f0cdc t/protocol.t
--- a/t/protocol.t	Fri Nov 25 23:12:05 2011 +0800
+++ b/t/protocol.t	Mon Nov 28 12:47:24 2011 -0600
@@ -90,7 +90,7 @@
 
     ( $res, $err ) = $do_request->( "gettrustgroups", username => $u->user );
     $success->( "'gettrustgroups' for user." );
-    ok( ref $res->{trustgroups} eq "ARRAY" && scalar @{$res->{trustgroups}} == 0, 
+    ok( ref $res->{trustgroups} eq "ARRAY" && scalar @{$res->{trustgroups}} == 0,
         "Empty trust groups list." );
 };
 
@@ -164,7 +164,7 @@
     ( $res, $err ) = $do_request->( "getcircle", username => $u->user, includetrustgroups => 1 );
     $success->( "'getcircle' => includetrustgroups" );
     is( scalar keys %$res, 1, "One key: " . (keys %$res)[0] );
-    ok( ref $res->{trustgroups} eq "ARRAY" && scalar @{$res->{trustgroups}} == 0, 
+    ok( ref $res->{trustgroups} eq "ARRAY" && scalar @{$res->{trustgroups}} == 0,
         "Empty trust groups list." );
 
 
@@ -347,7 +347,7 @@
     ok( $watchertruster->watches( $u ), "Watched by." );
 
 
-    # now to 
+    # now to
     my %contentfilters = (
         1 => {
             name => "first",
@@ -680,7 +680,7 @@
 
 note( "checkforupdates" );
 {
-    
+
     my $u = temp_user();
 
     my $start = 0;
--------------------------------------------------------------------------------