vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[ljcom] r7180: LJSUP-4179: remove "my $x if cond()" con...

Committer: vad
LJSUP-4179: remove "my $x if cond()" construction.

U   trunk/cgi-bin/paylib.pl
Modified: trunk/cgi-bin/paylib.pl
===================================================================
--- trunk/cgi-bin/paylib.pl	2009-04-08 06:31:30 UTC (rev 7179)
+++ trunk/cgi-bin/paylib.pl	2009-04-08 07:33:57 UTC (rev 7180)
@@ -2632,7 +2632,7 @@
     my $dbh = LJ::get_db_writer();
 
     # we can either operate on one given item or all items for a user
-    my $itemand = (" AND item=" . $dbh->quote($item)) if $item;
+    my $itemand = $item ? (" AND item=" . $dbh->quote($item)) : '';
 
     # see if there is existing time
     my $sth = $dbh->prepare("SELECT item, size, expdate, daysleft, (expdate > NOW()) AS 'unexpired' " .
@@ -3341,7 +3341,7 @@
     foreach my $it (@{$cartobj ? $cartobj->{'items'} : []}) {
         push @uids, $it->{rcptid} if $it->{rcptid};
     }
-    my %user = %{ LJ::load_userids(@uids)||{} } if @uids;
+    my %user = %{ LJ::load_userids(@uids) };
 
     my %pic;
     if ($opts->{'pics'}) {

Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments