Browse Source

Fixed issue with pubauthor surname being > field length

spficklin 11 years ago
parent
commit
f0f484b1b8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tripal_pub/api/tripal_pub.api.inc

+ 1 - 1
tripal_pub/api/tripal_pub.api.inc

@@ -840,7 +840,7 @@ function tripal_pub_add_authors($pub_id, $authors, $do_contact) {
     $values = array(
       'pub_id' => $pub_id,
       'rank' => $rank,
-      'surname' => $author['Surname'] ? $author['Surname'] : $author['Collective'],
+      'surname' => $author['Surname'] ? substr($author['Surname'], 0, 100) : substr($author['Collective'], 0, 100),
       'givennames' => $author['Given Name'],
       'suffix' => $author['Suffix'],
     );