holyandrew (holyandrew) wrote in changelog,
holyandrew
holyandrew
changelog

[ljcom] r11769: LJSUP-11857: Cyr sub domains

Committer: akanashin
LJSUP-11857: Cyr sub domains
U   trunk/cgi-bin/LJ/Widget/Shop/View/DomainRU.pm
Modified: trunk/cgi-bin/LJ/Widget/Shop/View/DomainRU.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/Shop/View/DomainRU.pm	2012-04-24 10:43:21 UTC (rev 11768)
+++ trunk/cgi-bin/LJ/Widget/Shop/View/DomainRU.pm	2012-04-24 10:49:48 UTC (rev 11769)
@@ -32,6 +32,9 @@
     my $current = $self->authas || $remote;
 
     my $buy_manage = LJ::Request->get_param('type');
+    my $delete = LJ::Request->get_param('delete');
+    my $auth = LJ::Request->get_param('auth');
+    my $dom = LJ::Request->get_param('dom');
 
     my $authas_opts = {
         'authas' => $current->user,
@@ -42,6 +45,10 @@
         'type'  => 'S',
     };
 
+    if ($delete && grep {$auth} [ LJ::get_authas_list($remote, $authas_opts) ]) {
+        LJ::Pay::Payment::PayItem::DomainRU->delete_domains($auth, $dom);
+    }
+
     my $domains = LJ::Pay::Payment::PayItem::DomainRU->get_domains();
 
     my %ret = (
@@ -70,16 +77,10 @@
 sub process_post_request {
     my ($self) = @_;
 
-    my $action = LJ::Request->post_param('action');
     my $src_name = LJ::Request->post_param('src_name');
     my $remote = LJ::get_remote();
     my $authas = LJ::load_user(LJ::Request->post_param('authas'))->userid;
 
-    if ($action eq 'delete') {
-        LJ::Pay::Payment::PayItem::DomainRU->delete_domains($authas, $src_name);
-        return LJ::Request->redirect( "$LJ::SITEROOT/shop/domain_ru.bml?type=manage" );
-    }
-
     my @subitem_params = (
         $src_name, $authas,
     );

Tags: akanashin, holyandrew, ljcom, pm
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