接口调整
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user