wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[ljcom] r12089: LJSUP-12461: Problem with renames re-app...

Committer: wisest-owl
LJSUP-12461: Problem with renames re-appeared after R91

U   trunk/cgi-bin/LJ/Pay/Payment/PayItem/RenameAction.pm
Modified: trunk/cgi-bin/LJ/Pay/Payment/PayItem/RenameAction.pm
===================================================================
--- trunk/cgi-bin/LJ/Pay/Payment/PayItem/RenameAction.pm	2012-06-08 11:34:31 UTC (rev 12088)
+++ trunk/cgi-bin/LJ/Pay/Payment/PayItem/RenameAction.pm	2012-06-08 11:55:25 UTC (rev 12089)
@@ -155,6 +155,19 @@
             # cannot deliver actual rename
             # will deliver tokens
 
+            ##### DEBUG INFO #####
+            my $system = LJ::load_user ('system');
+            LJ::send_mail({ 'to' => 'gproschaev@sup.com,vsukhanov@sup.com',
+                            'from' => $LJ::BOGUS_EMAIL,
+                            'wrap' => 1,
+                            'charset' => 'utf-8',
+                            'subject' => 'Rename Account Failure',
+                            'body' => ("Failure processing user <" . $from_name . "> to user <" . $dest_name . ">" . 
+                                       "\n\nError: " . $opts->{error} . "\n")
+                            });
+            LJ::statushistory_add($fromu->{'userid'}, $system->userid, 'rename_failure', "Failure processing user <" . $from_name . "> to user <" . $dest_name . ">. Error: " . $opts->{error} . ".");
+            ##### END DEBUG INFO #####
+
             my $it = LJ::Pay::Payment::PayItem->new_memonly(
                 item => 'tokens',
                 subitem => 0,
@@ -168,12 +181,14 @@
             $payment->add_item_to_cart($it); 
 
             if (LJ::canonical_username($dest_name) eq $fromu->user) {
+                LJ::statushistory_add($fromu->{'userid'}, $system->userid, 'rename_failure', "Rename Account Identical (Line ".__LINE__.") <" . $from_name . "> to user <" . $dest_name . ">.");
                 return (1, # rename is delivered! we will not return to it any more
                         'Rename Account Identical',
                         'Sorry, ' . $dest_name . ' username already renamed. You’ll receive '
                             . ($LJ::Pay::Payment::PayItem::RenameAction::shop_price * LJ::Pay::Wallet::EXCHANGE_RATE)
                             . ' LJ Wallet tokens instead of the renaming.');
             } else { # cannot reuse
+                LJ::statushistory_add($fromu->{'userid'}, $system->userid, 'rename_failure', "Rename Account Failure (Line ".__LINE__.") <" . $from_name . "> to user <" . $dest_name . ">.");
                 return (1, # rename is delivered! we will not return to it any more
                         'Rename Account Failure',
                         'Sorry, ' . $dest_name . ' username already in use. You’ll receive '

Tags: ljcom, pm, wisest-owl
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