afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
afuna ([personal profile] afuna) wrote in [site community profile] changelog2009-11-19 04:16 pm

[dw-free] Remove weblogs.com pinging?

[commit: http://hg.dwscoalition.org/dw-free/rev/140e81988438]

http://bugs.dwscoalition.org/show_bug.cgi?id=1977

Purge!

Patch by [personal profile] gchick.

Files modified:
  • bin/qbufferd.pl
  • bin/upgrading/en.dat
  • bin/upgrading/proplists.dat
  • bin/worker/ping-weblogscom
  • cgi-bin/LJ/Setting/NotifyWeblogs.pm
  • cgi-bin/LJ/User.pm
  • cgi-bin/ljcmdbuffer.pl
  • cgi-bin/ljdefaults.pl
  • cgi-bin/ljprotocol.pl
  • etc/config.pl
  • htdocs/manage/settings/index.bml
  • htdocs/manage/settings/index.bml.text
  • htdocs/misc/weblogs-change.bml
--------------------------------------------------------------------------------
diff -r 19b5d74b0528 -r 140e81988438 bin/qbufferd.pl
--- a/bin/qbufferd.pl	Thu Nov 19 15:52:49 2009 +0000
+++ b/bin/qbufferd.pl	Thu Nov 19 16:15:03 2009 +0000
@@ -164,7 +164,7 @@ while(not $working) {
 }
 
 # the actual work begins here
-my @all_jobs = qw(delitem weblogscom send_mail support_notify dirty);
+my @all_jobs = qw(delitem send_mail support_notify dirty);
 foreach my $hook (keys %LJ::HOOKS) {
     next unless $hook =~ /^cmdbuf:(\w+):run$/;
     push @all_jobs, $1;
diff -r 19b5d74b0528 -r 140e81988438 bin/upgrading/en.dat
--- a/bin/upgrading/en.dat	Thu Nov 19 15:52:49 2009 +0000
+++ b/bin/upgrading/en.dat	Thu Nov 19 16:15:03 2009 +0000
@@ -2767,12 +2767,6 @@ setting.nctalklinks.option=Adds the comm
 
 setting.nctalklinks.header=New Comment Link Indicator
 
-setting.notifyweblogs.label=Notify Weblogs.com
-
-setting.notifyweblogs.option.comm=Notify Weblogs.com subscribers when new public entries are posted to my community
-
-setting.notifyweblogs.option.self=Notify Weblogs.com subscribers when I post new public entries to my journal
-
 setting.prod.display.title=New Setting!
 
 setting.profileemail.label=Email to display on your profile
diff -r 19b5d74b0528 -r 140e81988438 bin/upgrading/proplists.dat
--- a/bin/upgrading/proplists.dat	Thu Nov 19 15:52:49 2009 +0000
+++ b/bin/upgrading/proplists.dat	Thu Nov 19 16:15:03 2009 +0000
@@ -838,14 +838,6 @@ userproplist.opt_usesharedpic:
   multihomed: 0
   prettyname: Use Shared Journal Pic
 
-userproplist.opt_weblogscom:
-  cldversion: 4
-  datatype: char
-  des: 1: ping weblogs.com with updates
-  indexed: 0
-  multihomed: 0
-  prettyname: Ping Weblogs.com
-
 userproplist.opt_whatemailshow:
   cldversion: 4
   datatype: char
diff -r 19b5d74b0528 -r 140e81988438 bin/worker/ping-weblogscom
--- a/bin/worker/ping-weblogscom	Thu Nov 19 15:52:49 2009 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-#!/usr/bin/perl
-use strict;
-use lib "$ENV{LJHOME}/cgi-bin";
-use LJ::Worker::TheSchwartz;
-use Time::HiRes ();
-
-schwartz_decl('LJ::Worker::Ping::WeblogsCom');
-schwartz_work();
-
-# ============================================================================
-package LJ::Worker::Ping::WeblogsCom;
-use base 'TheSchwartz::Worker';
-use XMLRPC::Lite;
-
-sub work {
-    my ($class, $job) = @_;
-    my $a = $job->arg;
-
-    my $rv = XMLRPC::Lite
-        ->new( proxy => "http://rpc.weblogs.com/RPC2",
-               timeout => 10 )
-        ->call('weblogUpdates.ping', # xml-rpc method call
-               LJ::ehtml($a->{'title'}) . " \@ $LJ::SITENAMESHORT",
-               $a->{'url'},
-               "$LJ::SITEROOT/misc/weblogs-change.bml?user=$a->{'user'}")
-        ->result;
-
-    if ($rv && $rv->{message} =~ /Thanks for the ping/) {
-        $job->completed;
-        return;
-    }
-
-    die "Got message: $rv->{message}\n";
-}
-
-sub keep_exit_status_for { 86400 }
-sub grab_for { 180 }
-sub max_retries { 3 }
-sub retry_delay { 200 }
-
diff -r 19b5d74b0528 -r 140e81988438 cgi-bin/LJ/Setting/NotifyWeblogs.pm
--- a/cgi-bin/LJ/Setting/NotifyWeblogs.pm	Thu Nov 19 15:52:49 2009 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-package LJ::Setting::NotifyWeblogs;
-use base 'LJ::Setting';
-use strict;
-use warnings;
-
-sub should_render {
-    my ($class, $u) = @_;
-
-    return LJ::is_enabled("weblogs_com") && $u && !$u->is_identity ? 1 : 0;
-}
-
-sub helpurl {
-    my ($class, $u) = @_;
-
-    return "weblogs";
-}
-
-sub label {
-    my ($class, $u) = @_;
-
-    return $class->ml('setting.notifyweblogs.label');
-}
-
-sub option {
-    my ($class, $u, $errs, $args) = @_;
-    my $key = $class->pkgkey;
-
-    my $notifyweblogs = $class->get_arg($args, "notifyweblogs") || $u->prop("opt_weblogscom");
-    my $can_use_notifyweblogs = $u->can_notify_weblogs;
-    my $upgrade_link = $can_use_notifyweblogs ? "" : (LJ::run_hook("upgrade_link", $u, "paid") || "");
-
-    my $ret = LJ::html_check({
-        name => "${key}notifyweblogs",
-        id => "${key}notifyweblogs",
-        value => 1,
-        selected => $notifyweblogs && $can_use_notifyweblogs ? 1 : 0,
-        disabled => $can_use_notifyweblogs ? 0 : 1,
-    });
-    $ret .= " <label for='${key}notifyweblogs'>";
-    $ret .= $u->is_community ? $class->ml('setting.notifyweblogs.option.comm') : $class->ml('setting.notifyweblogs.option.self');
-    $ret .= " $upgrade_link</label>";
-
-    return $ret;
-}
-
-sub save {
-    my ($class, $u, $args) = @_;
-
-    my $val = $class->get_arg($args, "notifyweblogs") ? 1 : 0;
-    $u->set_prop( opt_weblogscom => $val );
-
-    return 1;
-}
-
-1;
diff -r 19b5d74b0528 -r 140e81988438 cgi-bin/LJ/User.pm
--- a/cgi-bin/LJ/User.pm	Thu Nov 19 15:52:49 2009 +0000
+++ b/cgi-bin/LJ/User.pm	Thu Nov 19 16:15:03 2009 +0000
@@ -1862,10 +1862,6 @@ sub can_map_domains {
     return $_[0]->get_cap( 'domainmap' ) ? 1 : 0;
 }
 
-sub can_notify_weblogs {
-    return $_[0]->get_cap( 'weblogscom' ) ? 1 : 0;
-}
-
 sub can_post {
     return $_[0]->get_cap( 'can_post' ) ? 1 : 0;
 }
diff -r 19b5d74b0528 -r 140e81988438 cgi-bin/ljcmdbuffer.pl
--- a/cgi-bin/ljcmdbuffer.pl	Thu Nov 19 15:52:49 2009 +0000
+++ b/cgi-bin/ljcmdbuffer.pl	Thu Nov 19 16:15:03 2009 +0000
@@ -9,19 +9,6 @@ require "ljmail.pl";
 require "ljmail.pl";
 
 package LJ::Cmdbuffer;
-
-# built-in commands
-%LJ::Cmdbuffer::cmds =
-    (
-
-     # ping weblogs.com with updates?  takes a $u argument
-     weblogscom => {
-         too_old => 60*60*2,  # 2 hours old = qbufferd not running?
-         once_per_user => 1,
-         run => \&LJ::Cmdbuffer::_weblogscom,
-     },
-
-     );
 
 # <LJFUNC>
 # name: LJ::Cmdbuffer::flush
@@ -163,23 +150,6 @@ sub get_property {
     return undef;
 }
 
-sub _weblogscom {
-    # user, title, url
-    my ($dbh, $db, $c) = @_;
-    my $a = $c->{'args'};
-    eval {
-        eval "use XMLRPC::Lite;";
-        unless ($@) {
-            XMLRPC::Lite
-                ->new( proxy => "http://rpc.weblogs.com/RPC2",
-                       timeout => 5 )
-                ->call('weblogUpdates.ping', # xml-rpc method call
-                       LJ::ehtml($a->{'title'}) . " \@ $LJ::SITENAMESHORT",
-                       $a->{'url'},
-                       "$LJ::SITEROOT/misc/weblogs-change?user=$a->{'user'}");
-        }
-    };
-
     return 1;
 }
 
diff -r 19b5d74b0528 -r 140e81988438 cgi-bin/ljdefaults.pl
--- a/cgi-bin/ljdefaults.pl	Thu Nov 19 15:52:49 2009 +0000
+++ b/cgi-bin/ljdefaults.pl	Thu Nov 19 16:15:03 2009 +0000
@@ -104,7 +104,6 @@
                       'leave_comments' => 1,
                       'mod_queue' => 50,
                       'mod_queue_per_poster' => 1,
-                      'weblogscom' => 0,
                       'hide_email_after' => 0,
                       'userlinks' => 5,
                       'maxcomments' => 10000,
diff -r 19b5d74b0528 -r 140e81988438 cgi-bin/ljprotocol.pl
--- a/cgi-bin/ljprotocol.pl	Thu Nov 19 15:52:49 2009 +0000
+++ b/cgi-bin/ljprotocol.pl	Thu Nov 19 16:15:03 2009 +0000
@@ -1144,7 +1144,6 @@ sub postevent
     # load userprops all at once
     my @poster_props = qw(newesteventtime dupsig_post);
     my @owner_props = qw(newpost_minsecurity moderated);
-    push @owner_props, 'opt_weblogscom' unless $req->{'props'}->{'opt_backdated'};
 
     LJ::load_user_props($u, @poster_props, @owner_props);
     if ($uowner->{'userid'} == $u->{'userid'}) {
@@ -1533,16 +1532,6 @@ sub postevent
     }
 
     my @jobs;  # jobs to add into TheSchwartz
-
-    # notify weblogs.com of post if necessary
-    if ( LJ::is_enabled('weblogs_com') && $u->{'opt_weblogscom'} && $u->can_notify_weblogs &&
-        ($security eq "public") && !$req->{'props'}->{'opt_backdated'} ) {
-        push @jobs, TheSchwartz::Job->new_from_array("LJ::Worker::Ping::WeblogsCom", {
-            'user' => $u->{'user'},
-            'title' => $u->{'journaltitle'} || $u->{'name'},
-            'url' => LJ::journal_base($u) . "/",
-        });
-      }
 
     my $entry = LJ::Entry->new($uowner, jitemid => $jitemid, anum => $anum);
 
diff -r 19b5d74b0528 -r 140e81988438 etc/config.pl
--- a/etc/config.pl	Thu Nov 19 15:52:49 2009 +0000
+++ b/etc/config.pl	Thu Nov 19 16:15:03 2009 +0000
@@ -121,7 +121,7 @@
     # on a larger installation, it's useful to have multiple qbufferd.pl
     # processes, one for each command type.  this is unecessary on a
     # small installation.  you can also specify a delay between runs.
-    #@QBUFFERD_ISOLATE = ('weblogscom', 'ljcom_newpost');
+    #@QBUFFERD_ISOLATE = ('ljcom_newpost');
     #$QBUFFERD_DELAY   = 10;
 
     # path to sendmail and any necessary options
@@ -322,7 +322,6 @@
             'leave_comments' => 1,
             'mod_queue' => 50,
             'mod_queue_per_poster' => 5,
-            'weblogscom' => 1,
             'hide_email_after' => 60,
             'userlinks' => 10,
             'maxcomments' => 5000,
@@ -398,7 +397,6 @@
             'userpics' => 6,
             'userpicselect' => 0,
             'viewmailqueue' => 0,
-            'weblogscom' => 0,
             'xpost_accounts' => 1,
         },
         '2' => {  # 0x04
@@ -454,7 +452,6 @@
             'userpics' => 75,
             'userpicselect' => 1,
             'viewmailqueue' => 1,
-            'weblogscom' => 1,
             'xpost_accounts' => 3,
             'paid' => 1,
             'fastserver' => 1,
@@ -508,7 +505,6 @@
             'userpics' => 150,
             'userpicselect' => 1,
             'viewmailqueue' => 1,
-            'weblogscom' => 1,
             'xpost_accounts' => 5,
             'paid' => 1,
             'fastserver' => 1,
@@ -569,7 +565,6 @@
             'userpics' => 150,
             'userpicselect' => 1,
             'viewmailqueue' => 1,
-            'weblogscom' => 1,
             'paid' => 1,
             'fastserver' => 1,
         },
@@ -621,7 +616,6 @@
             'userpics' => 150,
             'userpicselect' => 1,
             'viewmailqueue' => 1,
-            'weblogscom' => 1,
             'xpost_accounts' => 9,
             'paid' => 1,
             'fastserver' => 1,
diff -r 19b5d74b0528 -r 140e81988438 htdocs/manage/settings/index.bml
--- a/htdocs/manage/settings/index.bml	Thu Nov 19 15:52:49 2009 +0000
+++ b/htdocs/manage/settings/index.bml	Thu Nov 19 16:15:03 2009 +0000
@@ -110,7 +110,6 @@ body<=
                 LJ::Setting::MinSecurity
                 DW::Setting::SynLevel
                 LJ::Setting::SearchInclusion
-                LJ::Setting::NotifyWeblogs
                 LJ::Setting::FacebookBeacon
                 LJ::Setting::EnableComments
                 LJ::Setting::CommentScreening
diff -r 19b5d74b0528 -r 140e81988438 htdocs/manage/settings/index.bml.text
--- a/htdocs/manage/settings/index.bml.text	Thu Nov 19 15:52:49 2009 +0000
+++ b/htdocs/manage/settings/index.bml.text	Thu Nov 19 16:15:03 2009 +0000
@@ -87,8 +87,6 @@
 .fn.public=Publicity
 
 .fn.viewingadult=Viewing Age Limited Content
-
-.fn.weblogs=Weblogs.com
 
 .imagelinks.size.custom=Custom: use placeholders for images larger than [[width]]x[[height]]
 
@@ -197,10 +195,6 @@ in any form or by any means for commerci
 
 .viewingadult.select.none=Do not collapse
 
-.weblogscom=Notify Weblogs.com when I post new public entries
-
-.weblogscom.text=Weblogs.com, a VeriSign service, is a ping server that automatically notifies subscribers when new content is posted to a website or a blog, allowing many more people to be aware of updates to your journal.
-
 .you.could.not.auth=You could not be authenticated as the specified user.
 
 .you.can.change=You can change other viewing options by <a [[login]]>logging in</a>. If you don't have an account, you can <a [[create.bml]]>create one now</a>.
diff -r 19b5d74b0528 -r 140e81988438 htdocs/misc/weblogs-change.bml
--- a/htdocs/misc/weblogs-change.bml	Thu Nov 19 15:52:49 2009 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-<?_code
-{
-    use strict;
-    use vars qw(%FORM);
-
-    return "no user" unless $FORM{'user'};
-
-    my $dbr = LJ::get_db_reader();
-    my $u =  LJ::load_user($FORM{'user'});
-    return "no user" unless $u;
-
-    my $tu = $dbr->selectrow_array("SELECT timeupdate FROM userusage WHERE userid=?", 
-                                   undef, $u->{'userid'});
-    
-    # we have no _fucking_ clue how weblogs.com detects changes.  god forbid
-    # it should be documented.
-
-    # here are some guesses, based on other people's half-educated guesses
-    # in mailing lists:
-
-    # attempt #1:  (change HTTP last modified)
-    my $modtime = LJ::mysqldate_to_time($tu);
-    BML::want_last_modified(1);
-    BML::note_mod_time($modtime);
-
-    # attempt #2:  (change the page text)
-    my $ret = "New post (not edit) at: $tu\n";
-    
-    # attempt #3:  (make the returned content differ by 50 bytes (!?!))
-    # waste 50b - 2.5k on bogus ex characters, modulus some seconds
-    $ret .= "Bogus chars to unconfuse weblogs.com:\n";
-    $ret .= "x" x ($modtime % 50 * 50);
-
-    return $ret;
-}
-_code?>
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org