[Slashdotjp-dev 955] [474] * Fix: remaining firehose url at discussion table when takeover discussion

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2008年 1月 31日 (木) 18:05:07 JST


Revision: 474
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=474
Author:   tach
Date:     2008-01-31 18:05:07 +0900 (Thu, 31 Jan 2008)

Log Message:
-----------
 * Fix: remaining firehose url at discussion table when takeover discussion
   from firehose.

Modified Paths:
--------------
    slashjp/trunk/Slash/DB/MySQL/MySQL.pm
    slashjp/trunk/debian/changelog


-------------- next part --------------
Modified: slashjp/trunk/Slash/DB/MySQL/MySQL.pm
===================================================================
--- slashjp/trunk/Slash/DB/MySQL/MySQL.pm	2008-01-31 08:34:26 UTC (rev 473)
+++ slashjp/trunk/Slash/DB/MySQL/MySQL.pm	2008-01-31 09:05:07 UTC (rev 474)
@@ -7667,7 +7667,7 @@
 		};
 
 		my $id;
-		if ($story->{discussion} && ($story->{journal_id} || $constants->{takeover_discussion_from_firehose})) {
+		if ($story->{discussion} && $story->{journal_id}) {
 			# updating now for journals tips off users that this will
 			# be a story soon, esp. ts, url, title, kind ... i don't
 			# care personally, does it matter?  if so we can task some
@@ -7678,7 +7678,7 @@
 			delete $discussion->{uid}; # leave it "owned" by poster
 
 			$id = $story->{discussion};
-			$discussion->{kind} = $story->{journal_id} ? 'journal-story' : 'story';
+			$discussion->{kind} = 'journal-story';
 			$discussion->{type} = 'open'; # should be already
 			$discussion->{archivable} = 'yes'; # for good measure
 
@@ -7692,6 +7692,15 @@
 				}, 'id=' . $self->sqlQuote($story->{journal_id}));
 			}
 
+		} elsif ($story->{discussion} && $constants->{takeover_discussion_from_firehose}) {
+			$id = $story->{discussion};
+			$discussion->{kind} = 'story';
+			$discussion->{type} = 'open'; # should be already
+			$discussion->{archivable} = 'yes'; # for good measure
+			if (!$self->setDiscussion($id, $discussion)) {
+				$error = "Failed to set discussion data for story\n";
+			}
+
 		} else {
 			$id = $self->createDiscussion($discussion);
 			if (!$id) {

Modified: slashjp/trunk/debian/changelog
===================================================================
--- slashjp/trunk/debian/changelog	2008-01-31 08:34:26 UTC (rev 473)
+++ slashjp/trunk/debian/changelog	2008-01-31 09:05:07 UTC (rev 474)
@@ -9,8 +9,10 @@
     - Suppress story deleting message
   * Fix: takeover discussion failed when the story has been created from
     submit.pl
+  * Fix: remaining firehose url at discussion table when takeover discussion
+    from firehose.
 
- -- Taku YASUI <tach****@osdn*****>  Thu, 31 Jan 2008 08:33:13 +0000
+ -- Taku YASUI <tach****@osdn*****>  Thu, 31 Jan 2008 09:03:10 +0000
 
 slash (2.5.0.189-2) unstable; urgency=low
 


Slashdotjp-dev メーリングリストの案内
Back to archive index