1
This commit is contained in:
@@ -241,8 +241,16 @@ function my_doiToFrag($data){
|
||||
$url = "https://citation.crosscite.org/format?doi=$doi&style=american-veterinary-medical-association&lang=en-US";
|
||||
$res = myGet($url);
|
||||
$frag = trim(substr($res,strpos($res,'.')+1));
|
||||
$frag1 = $frag==""?"none":$frag;
|
||||
$ts_refer_obj->where('ts_refer_id',$data['ts_refer_id'])->update(['refer_frag'=>$frag1]);
|
||||
$f = '';
|
||||
$cs = 0;
|
||||
if($frag==""){
|
||||
$f = $data['refer_content'];
|
||||
}else{
|
||||
$c_frag = rtrim($frag,'.');
|
||||
$f = substr_replace($c_frag,PHP_EOL,strripos($c_frag,"http"),0);
|
||||
$cs = 1;
|
||||
}
|
||||
$ts_refer_obj->where('ts_refer_id',$data['ts_refer_id'])->update(['refer_frag'=>$f,"cs"=>$cs]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user