2heoh (2heoh) wrote in changelog,
2heoh
2heoh
changelog

[livejournal] r19354: LJM-1843: Redirected to the LJ homepage ...

Committer: slobin
LJM-1843: Redirected to the LJ homepage if you commented in mobile version

M talkpost_do.bml
U   branches/mobile/htdocs/talkpost_do.bml
Modified: branches/mobile/htdocs/talkpost_do.bml
===================================================================
--- branches/mobile/htdocs/talkpost_do.bml	2011-06-24 02:10:00 UTC (rev 19353)
+++ branches/mobile/htdocs/talkpost_do.bml	2011-06-24 03:17:36 UTC (rev 19354)
@@ -289,21 +289,16 @@
                           'replyto'    => $parentid, );
 
         $commentlink = $uri->as_string;
+    # need to return on mobile version
+    } elsif ($POST{'mobile_domain'} =~ qr/$LJ::DOMAIN$/) {
+        my $mobile_link = LJ::Mob::Uri->find($talkurl);
+        $commentlink = "http://$POST{'mobile_domain'}$mobile_link/comments#comments";
     } elsif ($POST{'viewing_thread'} eq '') {
         $commentlink = LJ::Talk::talkargs($talkurl, "view=$dtalkid", $stylemine) . "#t$dtalkid";
     } else {
         $commentlink = LJ::Talk::talkargs($talkurl, "thread=$POST{viewing_thread}", $stylemine) . "#t$dtalkid";
     }
 
-    if( Apache::WURFL->is_mobile && $BML::COOKIE{fullversion} ne 'yes') {
-        my $mobile_link = LJ::Mob::Uri->find($commentlink);
-        $commentlink = "http://m.$LJ::DOMAIN$mobile_link"
-            if $mobile_link ;
-    }
-        
-
-warn "\$commentlink = $commentlink";
-
     my $ret = "";
     $ret .= "<h1>$ML{'.success.title'}</h1>";
 

Tags: 2heoh, bml, livejournal
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