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:
1ee242f
)
Model::Stories: fix update() to add primaryskid
author
hylom
<hylom@users.osdn.me>
Fri, 7 Jun 2019 11:28:04 +0000
(11:28 +0000)
committer
hylom
<hylom@users.osdn.me>
Fri, 7 Jun 2019 11:28:04 +0000
(11:28 +0000)
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
acff2e1
..
bd0a1f8
100644
(file)
--- a/
src/newslash_web/lib/Newslash/Model/Stories.pm
+++ b/
src/newslash_web/lib/Newslash/Model/Stories.pm
@@
-469,6
+469,11
@@
sub update {
my $add_tags = $params->{add_tags};
delete $params->{add_tags} if $add_tags;
+ # add primaryskid
+ if (!$params->{primaryskid}) {
+ $params->{primaryskid} = 1; # mainpage
+ }
+
$stoid = $slash_db->updateStory($stoid, $params);
return if !$stoid;