svnno****@sourc*****
svnno****@sourc*****
2008年 1月 31日 (木) 17:34:26 JST
Revision: 473 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=473 Author: tach Date: 2008-01-31 17:34:26 +0900 (Thu, 31 Jan 2008) Log Message: ----------- Fix: takeover discussion failed when the story has been created from submit.pl Modified Paths: -------------- slashjp/trunk/debian/changelog slashjp/trunk/plugins/Admin/Admin.pm slashjp/trunk/plugins/Admin/admin.pl -------------- next part -------------- Modified: slashjp/trunk/debian/changelog =================================================================== --- slashjp/trunk/debian/changelog 2008-01-31 06:54:26 UTC (rev 472) +++ slashjp/trunk/debian/changelog 2008-01-31 08:34:26 UTC (rev 473) @@ -7,8 +7,10 @@ /usr/lib/perl5/Slash/Utility/Display.pm line 549. * Add logcheck ignore rules - Suppress story deleting message + * Fix: takeover discussion failed when the story has been created from + submit.pl - -- Taku YASUI <tach****@osdn*****> Thu, 31 Jan 2008 06:53:10 +0000 + -- Taku YASUI <tach****@osdn*****> Thu, 31 Jan 2008 08:33:13 +0000 slash (2.5.0.189-2) unstable; urgency=low Modified: slashjp/trunk/plugins/Admin/Admin.pm =================================================================== --- slashjp/trunk/plugins/Admin/Admin.pm 2008-01-31 06:54:26 UTC (rev 472) +++ slashjp/trunk/plugins/Admin/Admin.pm 2008-01-31 08:34:26 UTC (rev 473) @@ -635,6 +635,13 @@ $self->{_dbh}->disconnect if !$ENV{GATEWAY_INTERFACE} && $self->{_dbh}; } +sub getFireHoseIdBySubid { + my($self, $subid) = @_; + my $constants = getCurrentStatic(); + return undef unless ($constants->{plugin}{FireHose}); + my $subid_q = $self->sqlQuote($subid); + return $self->sqlSelect("id", "firehose", "srcid=$subid_q AND type='submission'") || undef; +} 1; Modified: slashjp/trunk/plugins/Admin/admin.pl =================================================================== --- slashjp/trunk/plugins/Admin/admin.pl 2008-01-31 06:54:26 UTC (rev 472) +++ slashjp/trunk/plugins/Admin/admin.pl 2008-01-31 08:34:26 UTC (rev 473) @@ -1493,6 +1493,7 @@ } my $pending_file_count = 0; my $story_static_files = []; + $form->{fhid} ||= $admindb->getFireHoseIdBySubid($subid) if ($subid && $constants->{plugin}{FireHose}); if ($stoid || $form->{sid}) { my $story = $slashdb->getStory($form->{sid}); $stoid ||= $story->{stoid};