处理在线资源的名称为空的错误
This commit is contained in:
parent
2225a3e7f6
commit
4a0307c1dd
|
@ -208,9 +208,15 @@ class ISO19115
|
|||
$id=$db->lastInsertId('metadata','id');
|
||||
//处理在线资源
|
||||
if ($this->onlineresource) foreach($this->onlineresource as $resource)
|
||||
{
|
||||
if ($resource['name'])
|
||||
{
|
||||
$sql="insert into onlineresource (uuid,linkage,protocol,name,description) values(?,?,?,?,?)";
|
||||
$db->query($sql,array($this->uuid,$resource['linkage'],$resource['protocol'],$resource['name'],$resource['description']));
|
||||
} else {
|
||||
$sql="insert into onlineresource (uuid,linkage,protocol,description) values(?,?,?,?)";
|
||||
$db->query($sql,array($this->uuid,$resource['linkage'],$resource['protocol'],$resource['description']));
|
||||
}
|
||||
}
|
||||
//处理缩略图
|
||||
if (!empty($this->thumbnail)) {
|
||||
|
|
Loading…
Reference in New Issue