NEW: make it easier to set the keyword, keywords and description attributes of an ecm file object
This commit is contained in:
parent
e23ce0bb97
commit
d0a4ae88b1
@ -1789,7 +1789,9 @@ function addFileIntoDatabaseIndex($dir, $file, $fullpathorig = '', $mode = 'uplo
|
||||
|
||||
if (is_object($object) && $object->id > 0) {
|
||||
$ecmfile->src_object_id = $object->id;
|
||||
$ecmfile->src_object_type = $object->table_element;
|
||||
if (isset($object->table_element)) $ecmfile->src_object_type = $object->table_element;
|
||||
if (isset($object->src_object_description)) $ecmfile->description = $object->src_object_description;
|
||||
if (isset($object->src_object_keyword)) $ecmfile->keyword = $object->src_object_keyword;
|
||||
}
|
||||
|
||||
if ($setsharekey) {
|
||||
|
||||
@ -288,6 +288,7 @@ class EcmFiles extends CommonObject
|
||||
$sql .= 'fullpath_orig,';
|
||||
$sql .= 'description,';
|
||||
$sql .= 'keywords,';
|
||||
$sql .= 'keyword,';
|
||||
$sql .= 'cover,';
|
||||
$sql .= 'position,';
|
||||
$sql .= 'gen_or_uploaded,';
|
||||
@ -309,6 +310,7 @@ class EcmFiles extends CommonObject
|
||||
$sql .= ' '.(!isset($this->fullpath_orig) ? 'NULL' : "'".$this->db->escape($this->fullpath_orig)."'").',';
|
||||
$sql .= ' '.(!isset($this->description) ? 'NULL' : "'".$this->db->escape($this->description)."'").',';
|
||||
$sql .= ' '.(!isset($this->keywords) ? 'NULL' : "'".$this->db->escape($this->keywords)."'").',';
|
||||
$sql .= ' '.(!isset($this->keyword) ? 'NULL' : "'".$this->db->escape($this->keyword)."'").',';
|
||||
$sql .= ' '.(!isset($this->cover) ? 'NULL' : "'".$this->db->escape($this->cover)."'").',';
|
||||
$sql .= ' '.$maxposition.',';
|
||||
$sql .= ' '.(!isset($this->gen_or_uploaded) ? 'NULL' : "'".$this->db->escape($this->gen_or_uploaded)."'").',';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user