25 include_once(
"./Services/Component/classes/class.ilComponent.php");
52 private final function getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname)
56 if (!$this->got_data[$a_ctype][$a_cname][$a_slot_id][$a_pname])
58 include_once
"./Services/Component/classes/class.ilPluginSlot.php";
61 $plugin_php_file =
"./Customizing/global/plugins/".$a_ctype.
"/".
62 $a_cname.
"/".$slot_name.
"/".$a_pname.
"/plugin.php";
66 if (is_file($plugin_php_file))
68 include_once($plugin_php_file);
69 $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname] =
70 array(
"version" => $version,
"id" => $id,
71 "ilias_min_version" => $ilias_min_version,
72 "ilias_max_version" => $ilias_max_version,
73 "responsible" => $responsible,
74 "responsible_mail" => $responsible_mail);
77 $active = $rec[
"active"];
78 $needs_update =
false;
79 $activation_possible = !$active;
85 $inactive_reason = $lng->txt(
"cmps_needs_newer_ilias_version");
86 $activation_possible =
false;
91 $inactive_reason = $lng->txt(
"cmps_needs_newer_plugin_version");
92 $activation_possible =
false;
94 else if ($rec[
"last_update_version"] ==
"")
97 $inactive_reason = $lng->txt(
"cmps_needs_update");
99 $activation_possible =
false;
104 $inactive_reason = $lng->txt(
"cmps_needs_upgrade");
105 $activation_possible =
false;
107 else if ($rec[
"last_update_version"] != $version)
110 $inactive_reason = $lng->txt(
"cmps_needs_update");
111 $needs_update =
true;
112 $activation_possible =
false;
115 $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"is_active"] = $active;
116 $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"inactive_reason"] = $inactive_reason;
117 $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"needs_update"] = $needs_update;
118 $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"activation_possible"] = $activation_possible;
120 $this->got_data[$a_ctype][$a_cname][$a_slot_id][$a_pname] =
true;
132 function getVersion($a_ctype, $a_cname, $a_slot_id, $a_pname)
134 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
135 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"version"];
148 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
149 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"ilias_min_version"];
162 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
163 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"ilias_max_version"];
174 function getId($a_ctype, $a_cname, $a_slot_id, $a_pname)
176 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
177 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"id"];
188 function isActive($a_ctype, $a_cname, $a_slot_id, $a_pname)
190 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
191 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"is_active"];
204 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
205 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"needs_update"];
216 function getAllData($a_ctype, $a_cname, $a_slot_id, $a_pname)
218 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
219 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname];
227 include_once
"./Services/Component/classes/class.ilPlugin.php";