OSDN Git Service
(root)
/
newslash
/
newslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
32fcf75
)
Model::Stories: fix some warnings and add alias story->{discussiond_id}
author
hylom
<hylom@users.sourceforge.jp>
Tue, 28 Mar 2017 16:00:14 +0000
(
01:00
+0900)
committer
hylom
<hylom@users.sourceforge.jp>
Tue, 28 Mar 2017 16:00:14 +0000
(
01:00
+0900)
src/newslash_web/lib/Newslash/Model/Stories.pm
patch
|
blob
|
history
diff --git
a/src/newslash_web/lib/Newslash/Model/Stories.pm
b/src/newslash_web/lib/Newslash/Model/Stories.pm
index
ca30bb5
..
b16cd2a
100644
(file)
--- a/
src/newslash_web/lib/Newslash/Model/Stories.pm
+++ b/
src/newslash_web/lib/Newslash/Model/Stories.pm
@@
-995,13
+995,15
@@
sub _generalize {
#my $max_weight = 0;
for my $t (@{$story->{topics}}) {
- if ($t->{tid} == $story->{tid}) {
+ if ($t->{tid}
&& $t->{tid}
== $story->{tid}) {
$story->{primary_topic} = $t;
}
#if ($t->{weight} && $t->{weight} > $max_weight) {
# $max_weight = $t->{weight};
#}
}
+
+ $story->{discussion_id} = $story->{discussion};
}
# delete story from database