журнал (shhh) wrote in changelog,
журнал
shhh
changelog

[ljcom] r12388: LJSUP-13158: Add reserved and blocking b...

Committer: nnikulochkina
LJSUP-13158: Add reserved and blocking balance to acctedit.bml
U   trunk/htdocs/admin/accounts/acctedit.bml
Modified: trunk/htdocs/admin/accounts/acctedit.bml
===================================================================
--- trunk/htdocs/admin/accounts/acctedit.bml	2012-08-01 08:08:28 UTC (rev 12387)
+++ trunk/htdocs/admin/accounts/acctedit.bml	2012-08-01 11:05:41 UTC (rev 12388)
@@ -296,13 +296,12 @@
         # Refund all accounts
         if ($POST{'refund_reserved'}) {
             my $res = eval{LJ::Pay::Wallet::Account->get_user_active_accounts($u)};
-            die "$@" if $@;
+            if (my $e = $@) {die "$e"};
             
             foreach my $it (@{$res->{items}}) {
                 my $account = LJ::Pay::Wallet::Account->load($u->id,$it->{id});
                 my $err;
-                eval {$account->revoke(\$err,{release_blockings=>1})};
-                die $@ if $@;
+                $account->revoke(\$err,{release_blockings=>1});
                 die $err if $err;
             }
         }
@@ -313,7 +312,7 @@
             my $qty = int $POST{'wallet_add'};
 
             eval { LJ::Pay::Wallet->try_add($u, $qty) };
-            die "$@" if $@;
+            if (my $e = $@) {die "$e"};
 
             my $logmsg;
             if ($qty > 0) {

Tags: bml, ljcom, nikulochkina, nnikulochkina
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