OSDN Git Service

Model::Submissions: change form item's name
authorhylom <hylom@users.sourceforge.jp>
Thu, 27 Oct 2016 13:11:58 +0000 (22:11 +0900)
committerhylom <hylom@users.sourceforge.jp>
Thu, 27 Oct 2016 13:11:58 +0000 (22:11 +0900)
src/newslash_web/lib/Newslash/Model/Submissions.pm

index 389edb0..1274a98 100644 (file)
@@ -212,8 +212,8 @@ sub _email_to_domain {
 }
 
 sub generate_signature {
-    my ($self, $intro_text, $title) = @_;
-    return md5_hex(encode_utf8($intro_text . $title));
+    my ($self, $introtext, $title) = @_;
+    return md5_hex(encode_utf8($introtext . $title));
 }
 
 #========================================================================
@@ -235,7 +235,7 @@ submission parameters
  * title
  * url
  * email
- * intro_text
+ * introtext
  * tags
 
 =item \%options
@@ -288,13 +288,13 @@ EOSQL
              _email_to_domain($params->{email}), #emaildomain
              $user->{nickname}, #name
              $params->{title}, #subj
-             $params->{intro_text}, #story
+             $params->{introtext}, #story
              $params->{tid}, #tid
              $primaryskid, #primaryskid
              $user->{uid}, #uid,
              $user->{ipid}, #ipid,
              $user->{subnetid}, #subnetid,
-             $self->generate_signature($params->{intro_text}, $params->{title}) #signature
+             $self->generate_signature($params->{introtext}, $params->{title}) #signature
             );
     my $sub_id = $dbh->last_insert_id(undef, undef, undef, undef);
     if (!$sub_id) {
@@ -395,7 +395,7 @@ EOSQL
     my $firehose_id = $dbh->last_insert_id(undef, undef, undef, undef);
 
     $sql = "INSERT INTO firehose_text (title, introtext) VALUES (?, ?)";
-    $rs = $dbh->do($sql, undef, $params->{title}, $params->{intro_text});
+    $rs = $dbh->do($sql, undef, $params->{title}, $params->{introtext});
     if (!$rs) {
         # error occured
         $self->set_errorno($dbh->{mysql_errno});