holyandrew (holyandrew) wrote in changelog,
holyandrew
holyandrew
changelog

[ljcom] r11910: LJSUP-12103: Incorrect Unknown journal p...

Committer: akanashin
LJSUP-12103: Incorrect Unknown journal page
U   trunk/cgi-bin/LJ/Widget/ErrorPage.pm
Modified: trunk/cgi-bin/LJ/Widget/ErrorPage.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/ErrorPage.pm	2012-05-10 09:20:49 UTC (rev 11909)
+++ trunk/cgi-bin/LJ/Widget/ErrorPage.pm	2012-05-10 11:14:27 UTC (rev 11910)
@@ -1,6 +1,7 @@
 package LJ::Widget::ErrorPage;
 use strict;
 use warnings;
+use Encode qw(encode_utf8 decode_utf8);
 
 my %links = (
     'recent' => sub {
@@ -116,9 +117,16 @@
 
     'baddomainru' => sub {
         my %args             = @_;
+        my $host = LJ::Request->header_in('Host');
+        $host = 'xn--80a8caa.xn--f1aa.xn--p1ai';
+        $host =~ s/xn--//g;
+        $host =~ s/\.(?:(?:80adlbbiisqhy9a|f1aa)\.p1ai)//;
         return {
             'title'        => LJ::Lang::ml('.errorpage.baddomainru.title'),
-            'description'  => LJ::Lang::ml('.errorpage.baddomainru.description', { 'domainname' => LJ::Request->header_in('Host'), 'uri' => "$LJ::SITEROOT/shop/domain_ru.bml" }),
+            'description'  => LJ::Lang::ml('.errorpage.baddomainru.description', { 
+                                           'domainname' => Encode::encode_utf8(LJ::Pay::Payment::PayItem::DomainRU::decode_punycode($host)), 
+                                           'uri' => "$LJ::SITEROOT/shop/domain_ru.bml" }
+                              ),
             'links'        => [qw( home faq sitemap )],
             'ads_location' => 'error_page.baduser',
         };

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