58 $this->logger =
$GLOBALS[
'DIC']->logger()->meta();
59 $this->db =
$GLOBALS[
'DIC']->database();
60 $this->entry_id = $a_entry_id;
75 $query =
"SELECT entry_id FROM il_md_cpr_selections ";
80 return $entries ? $entries :
array();
92 if (!
$entry_id = self::_extractEntryId($a_cp_string)) {
96 $query =
"SELECT title FROM il_md_cpr_selections " .
97 "WHERE entry_id = " . $ilDB->quote(
$entry_id) .
" ";
100 return $row->title ?
$row->title :
'';
116 if (!
$entry_id = self::_extractEntryId($a_cp_string)) {
120 $query =
"SELECT copyright FROM il_md_cpr_selections " .
121 "WHERE entry_id = " . $ilDB->quote(
$entry_id) .
" ";
124 return $row->copyright ?
$row->copyright :
'';
137 if (!preg_match(
'/il_copyright_entry__([0-9]+)__([0-9]+)/', $a_cp_string, $matches)) {
140 if ($matches[1] != IL_INST_ID) {
143 return $matches[2] ? $matches[2] : 0;
179 $this->title = $a_title;
202 $this->description = $a_desc;
224 $this->copyright = $a_copyright;
246 $this->costs = $a_costs;
268 $this->language = $a_lang_key;
290 $this->copyright_and_other_restrictions = $a_status;
315 $next_id = $ilDB->nextId(
'il_md_cpr_selections');
317 $ilDB->insert(
'il_md_cpr_selections',
array(
318 'entry_id' =>
array(
'integer',$next_id),
326 $this->entry_id = $next_id;
340 $ilDB->update(
'il_md_cpr_selections',
array(
359 public function delete()
363 $query =
"DELETE FROM il_md_cpr_selections " .
364 "WHERE entry_id = " . $this->db->quote($this->
getEntryId(),
'integer') .
" ";
394 $query =
"SELECT * FROM il_md_cpr_selections " .
395 "WHERE entry_id = " . $this->db->quote($this->entry_id,
'integer') .
" ";
407 $query =
"SELECT count(meta_rights_id) used FROM il_meta_rights " .
408 "WHERE description = " . $ilDB->quote(
'il_copyright_entry__' . IL_INST_ID .
'__' . $this->
getEntryId(),
'text');
410 $this->logger->debug(
$query);
getLanguage()
get language
static _getEntries()
get entries
setLanguage($a_lang_key)
set language
setCosts($a_costs)
set costs
setDescription($a_desc)
set description
getCopyrightAndOtherRestrictions()
get copyright and other restrictions
getCopyright()
get copyright
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
setCopyrightAndOtherRestrictions($a_status)
set copyright and other restrictions
foreach($_POST as $key=> $value) $res
static _extractEntryId($a_cp_string)
extract entry id
__construct($a_entry_id)
Constructor.
static _lookupCopyright($a_cp_string)
lookup copyright by entry id
getDescription()
get description
Create styles array
The data for the language used.
setTitle($a_title)
set title
static lookupCopyyrightTitle($a_cp_string)
Lookup copyright title.
$copyright_and_other_restrictions
setCopyright($a_copyright)
set copyright