コミットメタ情報

リビジョン3e90a0b393a3fdc9c3236e6d2a3dca2718f862d8 (tree)
日時2017-12-01 18:44:03
作者hylom <hylom@user...>
コミッターhylom

ログメッセージ

  • Model::Journals: set firehose table's 'discussion' column correctly in create_firehose_item()

変更サマリ

差分

--- a/src/newslash_web/lib/Newslash/Model/Journals.pm
+++ b/src/newslash_web/lib/Newslash/Model/Journals.pm
@@ -452,6 +452,7 @@ EOSQL
452452 tid => $params->{tid} || 2068,
453453 posttype => $post_type,
454454 date => strftime("%F %T", gmtime),
455+ discussion => $discussion_id,
455456 };
456457 # TODO: update firehose's timestamp.
457458 # create firehose item
@@ -948,10 +949,10 @@ sub create_firehose_item {
948949 # TODO: sprite_info column don't have default value...
949950 my $sql = <<"EOSQL";
950951 INSERT INTO firehose
951- (uid, globjid, type, createtime, popularity, editorpop, public, attention_needed, primaryskid, tid, srcid,
952+ (uid, globjid, discussion, type, createtime, popularity, editorpop, public, attention_needed, primaryskid, tid, srcid,
952953 url_id, email, emaildomain, name, ipid, subnetid, sprite_info)
953954 VALUES
954- (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
955+ (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
955956 ?, ?, ?, ?, ?, ?, "")
956957 EOSQL
957958 my $dbh = $self->connect_db;
@@ -972,6 +973,7 @@ EOSQL
972973 my $rs = $dbh->do($sql, undef,
973974 $journal->{uid} || $journal->{user_id}, #uid
974975 $globj_id, #globjid
976+ $journal->{discussion} || 0,
975977 "journal", #type
976978 $journal->{date} || $journal->{create_time}, #createtime
977979 $popularity, #popularity
旧リポジトリブラウザで表示