diff --git a/application/api/controller/References.php b/application/api/controller/References.php index 71038535..9124533d 100644 --- a/application/api/controller/References.php +++ b/application/api/controller/References.php @@ -188,6 +188,7 @@ class References extends Base if(!is_string($sContent)){ return json_encode(['status' => 2,'msg' => 'The content format is incorrect']); } + $sContent = str_replace(['?','?'], '.', $sContent); $aContent = explode('.', $sContent); $aUpdate = []; if(count($aContent) > 1){ @@ -218,6 +219,7 @@ class References extends Base $doiPattern = '/10\.\d{4,9}\/[^\s\/?#&=]+/i'; if (preg_match($doiPattern, $sDoi, $matches)) { $aUpdate['doi'] = $matches[0]; + $aUpdate['doilink'] = 'https://doi.org/'.''.$aUpdate['doi']; }else{ $aUpdate['doi'] = $sDoi; }