OSDN Git Service

* Model::Comments: _generalize() support "public" and "id" property, and delete...
authorhylom <hylom@users.sourceforge.jp>
Fri, 21 Jul 2017 12:45:06 +0000 (21:45 +0900)
committerhylom <hylom@users.sourceforge.jp>
Fri, 21 Jul 2017 12:45:06 +0000 (21:45 +0900)
src/newslash_web/lib/Newslash/Model/Comments.pm

index db8e4e0..c757236 100644 (file)
@@ -161,13 +161,13 @@ sub generate_signature {
 sub _generalize {
     my ($self, $c) = @_;
 
+    $c->{id} = $c->{cid};
     $c->{create_time} = $c->{date};
     $c->{update_time} = $c->{last_update};
     $c->{content_type} = "comment";
     $c->{title} = $c->{subject};
     $c->{introtext} = $c->{comment};
-
-    $c->{is_login} = ($c->{uid} == 1) ? 0 : 1;
+    $c->{public} => "yes";
 
 }