holyandrew (holyandrew) wrote in changelog,
holyandrew
holyandrew
changelog

[ljcom] r11879: LJSUP-12066: If LJ users answer QOTD we ...

Committer: akanashin
LJSUP-12066: If LJ users answer QOTD we shouldn't create a copy of his post to qotd_answer community
U   trunk/cgi-bin/LJ/Hooks/QotD.pm
Modified: trunk/cgi-bin/LJ/Hooks/QotD.pm
===================================================================
--- trunk/cgi-bin/LJ/Hooks/QotD.pm	2012-05-03 14:10:17 UTC (rev 11878)
+++ trunk/cgi-bin/LJ/Hooks/QotD.pm	2012-05-03 14:20:43 UTC (rev 11879)
@@ -247,29 +247,6 @@
 
     return if 'lj_bot' eq $opts->{req}->{user}; # Don't count autoposted entry from 'lj_bot'.
 
-    # repost to the QOTD answers community, unless this already goes there
-    unless ( $entry->journal->username eq $LJ::QOTD_COMMUNITY ) {
-        # clone the request hashref; a little bit hacky, but yay perl
-        my $repost_req = {
-            %{ $opts->{'req'} },
-            'props' => { %{ $opts->{'req'}->{'props'} } }
-        };
-
-        # now, alter it to post to the community as appropriate
-        $repost_req->{'usejournal'} = $LJ::QOTD_COMMUNITY;
-        $repost_req->{'qotd_xpost'} = 1;
-        $repost_req->{'props'}->{'origin_url'} = $entry->url;
-        $repost_req->{'props'}->{'opt_nocomments'} = 1;
-
-        my $error = '';
-        my $repost_res = LJ::Protocol::do_request(
-            'postevent', $repost_req, \$error, { 'noauth' => 1 } );
-
-        unless ($repost_res) {
-            warn "QotD repost error: $error";
-        }
-    }
-
     # add to queue
     unless ( $opts->{'req'}->{'qotd_xpost'} ) {
         Class::Autouse->load('LJ::PersistentQueue');

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