holyandrew (holyandrew) wrote in changelog,
holyandrew
holyandrew
changelog

[livejournal] r21726: LJSUP-11857: Cyr sub domains

Committer: akanashin
LJSUP-11857: Cyr sub domains
U   trunk/bin/deleteusers.pl
U   trunk/cgi-bin/LJ/User/Rename.pm
U   trunk/htdocs/manage/domain.bml
Modified: trunk/bin/deleteusers.pl
===================================================================
--- trunk/bin/deleteusers.pl	2012-04-17 05:38:09 UTC (rev 21725)
+++ trunk/bin/deleteusers.pl	2012-04-17 07:40:04 UTC (rev 21726)
@@ -147,6 +147,7 @@
     $runsql->($user, "DELETE FROM reluser WHERE targetid=$uid");
     $runsql->($user, "DELETE FROM userlog WHERE userid=$uid");
 
+    $runsql->($user, "UPDATE payitems SET status='refund' WHERE item='domainru' AND rcptid=$uid");
     $runsql->($user, "UPDATE user SET statusvis='X', statusvisdate=NOW(), password='' WHERE userid=$uid");
 
 }

Modified: trunk/cgi-bin/LJ/User/Rename.pm
===================================================================
--- trunk/cgi-bin/LJ/User/Rename.pm	2012-04-17 05:38:09 UTC (rev 21725)
+++ trunk/cgi-bin/LJ/User/Rename.pm	2012-04-17 07:40:04 UTC (rev 21726)
@@ -282,6 +282,10 @@
         }
     }   
 
+    unless ($opts->{opt_domainru}) {
+       $dbh->do("DELETE * FROM domains WHERE userid=?", undef, $u->userid); 
+    }
+
     return $to;
 }
 

Modified: trunk/htdocs/manage/domain.bml
===================================================================
--- trunk/htdocs/manage/domain.bml	2012-04-17 05:38:09 UTC (rev 21725)
+++ trunk/htdocs/manage/domain.bml	2012-04-17 07:40:04 UTC (rev 21726)
@@ -59,6 +59,9 @@
                 $dbh->do("DELETE FROM domains WHERE userid=?", undef, $u->{'userid'});
                 LJ::MemCache::delete("domain:" . $dom); 
             } else {
+                if ($dom =~ /(?:(?:живойжурнал|жж)\.рф)|(?:(?:xn--80adlbbiisqhy9a|xn--f1aa)\.xn--p1ai)/) {
+                    return LJ::bad_input($ML{'domain.bml.error.domainru'});
+                }
                 $dbh->do("INSERT INTO domains VALUES (?, ?)", undef, $dom, $u->{'userid'});
                 if ($dbh->err) {
                     my $otherid = $dbh->selectrow_array("SELECT userid FROM domains WHERE domain=?",

Tags: akanashin, bml, holyandrew, livejournal, pl, 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