31 include_once
'class.ilMDBase.php';
35 function ilMDRights($a_rbac_id = 0,$a_obj_id = 0,$a_obj_type =
'')
49 $this->costs = $a_costs;
66 $this->caor = $a_caor;
79 $this->description = $a_description;
83 return $this->description;
87 if(is_object($lng_obj))
89 $this->description_language = $lng_obj;
94 return is_object($this->description_language) ? $this->description_language :
false;
98 return is_object($this->description_language) ? $this->description_language->getLanguageCode() :
false;
106 $fields[
'meta_rights_id'] = array(
'integer',$next_id = $ilDB->nextId(
'il_meta_rights'));
108 if($this->db->insert(
'il_meta_rights',$fields))
122 if($this->db->update(
'il_meta_rights',
123 $this->__getFields(),
124 array(
"meta_rights_id" => array(
'integer',$this->
getMetaId()))))
138 $query =
"DELETE FROM il_meta_rights ".
139 "WHERE meta_rights_id = ".$ilDB->quote($this->
getMetaId() ,
'integer');
151 return array(
'rbac_id' => array(
'integer',$this->
getRBACId()),
152 'obj_id' => array(
'integer',$this->
getObjId()),
153 'obj_type' => array(
'text',$this->
getObjType()),
154 'costs' => array(
'text',$this->
getCosts()),
164 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
170 $query =
"SELECT * FROM il_meta_rights ".
171 "WHERE meta_rights_id = ".$ilDB->quote($this->
getMetaId() ,
'integer');
197 $writer->xmlStartTag(
'Rights',array(
'Cost' => $this->
getCosts()
207 $writer->xmlEndTag(
'Rights');
222 $query =
"SELECT description FROM il_meta_rights ".
223 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id ,
'integer').
" ".
224 "AND obj_id = ".$ilDB->quote($a_obj_id ,
'integer').
" ";
227 return $row->description ?
$row->description :
'';
235 $query =
"SELECT meta_rights_id FROM il_meta_rights ".
236 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id ,
'integer').
" ".
237 "AND obj_id = ".$ilDB->quote($a_obj_id ,
'integer');
242 return $row->meta_rights_id;