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

[ljcom] r12772: LJSUP-13824: Site message for unlogged u...

Committer: wisest-owl
LJSUP-13824: Site message for unlogged users must be shown by JS

U   trunk/cgi-bin/LJ/Response/JSON.pm
Modified: trunk/cgi-bin/LJ/Response/JSON.pm
===================================================================
--- trunk/cgi-bin/LJ/Response/JSON.pm	2012-10-17 06:36:48 UTC (rev 12771)
+++ trunk/cgi-bin/LJ/Response/JSON.pm	2012-10-17 06:55:53 UTC (rev 12772)
@@ -5,10 +5,12 @@
 use LJ::JSON;
 
 use base qw( LJ::Response );
-__PACKAGE__->mk_accessors( qw( data callback ) );
+__PACKAGE__->mk_accessors( qw( data callback javascript) );
 
 sub content_type {
-    return 'application/json; charset=utf-8';
+    my $self = shift;
+    return $self->javascript ?  'application/javascript; charset=utf-8' : 
+                                'application/json; charset=utf-8';
 }
 
 sub output {

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