Committer: gprochaev
LJSUP-7934. Supernaintainer: update the scriptU trunk/bin/misc/set_comm_supermaintainer.pl U trunk/cgi-bin/LJ/Poll.pm U trunk/cgi-bin/communitylib.pl
Modified: trunk/bin/misc/set_comm_supermaintainer.pl =================================================================== --- trunk/bin/misc/set_comm_supermaintainer.pl 2011-02-15 08:35:21 UTC (rev 18303) +++ trunk/bin/misc/set_comm_supermaintainer.pl 2011-02-15 08:37:20 UTC (rev 18304) @@ -62,10 +62,6 @@ die "No user 'lj_elections' on this server" unless $to_journal; -my $poster = LJ::load_user("system") - or die "No user 'system' on this server"; - - my $dbr = LJ::get_dbh("slow") or die "Can't get slow DB connection"; $dbr->{RaiseError} = 1; $dbr->{ShowErrorStatement} = 1; @@ -100,6 +96,7 @@ $i++; _log '-' x 30, "\n"; + _log "Timestamp: " . time . "\n"; my $comm = LJ::load_userid ($c_id); unless ($comm) { Modified: trunk/cgi-bin/LJ/Poll.pm =================================================================== --- trunk/cgi-bin/LJ/Poll.pm 2011-02-15 08:35:21 UTC (rev 18303) +++ trunk/cgi-bin/LJ/Poll.pm 2011-02-15 08:37:20 UTC (rev 18304) @@ -555,19 +555,19 @@ return $self if $self->_load_from_memcache; # Load object from MySQL database - my $dbr = LJ::get_db_reader(); + my $dbw = LJ::get_db_writer(); - my $journalid = $dbr->selectrow_array("SELECT journalid FROM pollowner WHERE pollid=?", undef, $self->pollid); - die $dbr->errstr if $dbr->err; + my $journalid = $dbw->selectrow_array("SELECT journalid FROM pollowner WHERE pollid=?", undef, $self->pollid); + die $dbw->errstr if $dbw->err; my $row = ''; unless ($journalid) { # this is probably not clustered, check global - $row = $dbr->selectrow_hashref("SELECT pollid, itemid, journalid, " . + $row = $dbw->selectrow_hashref("SELECT pollid, itemid, journalid, " . "posterid, whovote, whoview, name, status " . "FROM poll WHERE pollid=?", undef, $self->pollid); - die $dbr->errstr if $dbr->err; + die $dbw->errstr if $dbw->err; } else { my $u = LJ::load_userid($journalid) or die "Invalid journalid $journalid"; @@ -583,10 +583,10 @@ die $u->errstr if $u->err; } else { # unclustered poll - $row = $dbr->selectrow_hashref("SELECT pollid, itemid, journalid, " . + $row = $dbw->selectrow_hashref("SELECT pollid, itemid, journalid, " . "posterid, whovote, whoview, name, status " . "FROM poll WHERE pollid=?", undef, $self->pollid); - die $dbr->errstr if $dbr->err; + die $dbw->errstr if $dbw->err; } } Modified: trunk/cgi-bin/communitylib.pl =================================================================== --- trunk/cgi-bin/communitylib.pl 2011-02-15 08:35:21 UTC (rev 18303) +++ trunk/cgi-bin/communitylib.pl 2011-02-15 08:37:20 UTC (rev 18304) @@ -33,6 +33,7 @@ unless ($no_job) { $entry = _create_post (to => $to_journal, comm => $comm); die "Entry for Poll does not created\n" unless $entry; + $$textref .= "Entry url: " . $entry->url . "\n"; } my @items = ();