From cd8fe1ca8788da0776461b1a18fcfeaf93688908 Mon Sep 17 00:00:00 2001 From: wlx Date: Sat, 16 Nov 2013 07:43:30 +0000 Subject: [PATCH] fix single author could generate reference problem. --- application/module/Reference/Ris.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/application/module/Reference/Ris.php b/application/module/Reference/Ris.php index 7e30ef73..5b6ff16d 100644 --- a/application/module/Reference/Ris.php +++ b/application/module/Reference/Ris.php @@ -277,7 +277,13 @@ class Ris //创建reference 字段 public function makeReferenceFlag($ref){ - $str = join(', ',$ref['author']).'. '; + $str=''; + if(is_array($author) && count($author) > 0) + { + $str .= join(', ',$ref['author']).'. '; + } else if if(is_string($author)) { + $str .= $ref['author'].'. '; + } $str .= $ref['title'].'. '; $str .= $ref['publisher'].', '; isset($ref['year']) ? $str .= $ref['year'].', ':"";