23 include_once(
"./classes/class.ilObjectGUI.php");
44 public function __construct($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
49 $this->lng->loadLanguageModule(
'cmps');
60 global $rbacsystem,
$ilErr,$ilAccess;
62 $next_class = $this->ctrl->getNextClass($this);
63 $cmd = $this->ctrl->getCmd();
67 if(!$ilAccess->checkAccess(
'read',
'',$this->object->getRefId()))
69 $ilErr->raiseError($this->lng->txt(
'no_permission'),$ilErr->WARNING);
74 case 'ilpermissiongui':
75 $this->tabs_gui->setTabActive(
'perm_settings');
76 include_once(
"./classes/class.ilPermissionGUI.php");
78 $ret =& $this->ctrl->forwardCommand($perm_gui);
101 global $rbacsystem, $ilAccess;
102 if ($rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
104 $this->tabs_gui->addTarget(
"cmps_modules",
105 $this->ctrl->getLinkTarget($this,
"listModules"),
106 array(
"listModules",
"view",
"showPluginSlot"));
108 $this->tabs_gui->addTarget(
"cmps_services",
109 $this->ctrl->getLinkTarget($this,
"listServices"),
110 array(
"listServices"));
113 if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
115 $this->tabs_gui->addTarget(
"perm_settings",
116 $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm"),
117 array(),
'ilpermissiongui');
128 $tpl =
new ilTemplate(
"tpl.component_list.html",
true,
true,
"Services/Component");
137 include_once(
"./Services/Component/classes/class.ilComponentsTableGUI.php");
140 $tpl->setVariable(
"TABLE", $comp_table->getHTML());
141 $this->tpl->setContent(
$tpl->get());
151 $tpl =
new ilTemplate(
"tpl.component_list.html",
true,
true,
"Services/Component");
154 $tpl->setVariable(
"HREF_REFRESH_PLUGINS_INFORMATION",
155 $ilCtrl->getLinkTarget($this,
"refreshPluginsInformation"));
156 $tpl->setVariable(
"TXT_REFRESH_PLUGINS_INFORMATION",
157 $lng->txt(
"cmps_refresh_plugins_inf"));
159 include_once(
"./Services/Component/classes/class.ilComponentsTableGUI.php");
162 $tpl->setVariable(
"TABLE", $comp_table->getHTML());
163 $this->tpl->setContent(
$tpl->get());
174 if (is_array($_POST[
"obj_dis_creation"]))
176 foreach($_POST[
"obj_dis_creation"] as $k => $v)
178 $ilSetting->set(
"obj_dis_creation_".$k, $v);
183 if (is_array($_POST[
"obj_pos"]))
185 foreach($_POST[
"obj_pos"] as $k => $v)
187 $ilSetting->set(
"obj_dis_creation_".$k, $_POST[
"obj_dis_creation"][$k]);
192 if (is_array($_POST[
"obj_pos"]))
194 reset($_POST[
"obj_pos"]);
195 foreach($_POST[
"obj_pos"] as $k => $v)
197 $ilSetting->set(
"obj_add_new_pos_".$k, $v);
201 $ilCtrl->redirect($this,
"listModules");
212 $ptpl =
new ilTemplate(
"tpl.plugin_slot.html",
true,
true,
213 "Services/Component");
215 include_once(
"./Services/Component/classes/class.ilComponent.php");
217 $ptpl->setVariable(
"TXT_COMPONENT", $lng->txt(
"cmps_component"));
218 $ptpl->setVariable(
"VAL_COMPONENT_NAME", $comp->getComponentType().
"/".$comp->getName());
219 $ptpl->setVariable(
"VAL_COMPONENT_ID", $comp->getId());
221 $ptpl->setVariable(
"TXT_PLUGIN_SLOT", $lng->txt(
"cmps_plugin_slot"));
222 $ptpl->setVariable(
"VAL_PLUGIN_SLOT", $comp->getPluginSlotName(
$_GET[
"slot_id"]));
223 $ptpl->setVariable(
"VAL_PLUGIN_SLOT_ID",
$_GET[
"slot_id"]);
226 $ptpl->setVariable(
"TXT_PLUGIN_DIR", $lng->txt(
"cmps_plugin_dirs"));
227 $ptpl->setVariable(
"VAL_PLUGIN_DIR",
228 $comp->getPluginSlotDirectory(
$_GET[
"slot_id"]).
"/<Plugin_Name>");
229 $ptpl->setVariable(
"TXT_MAIN_DIR", $lng->txt(
"cmps_main_dir"));
230 $ptpl->setVariable(
"TXT_PLUGIN_FILE", $lng->txt(
"cmps_plugin_file"));
231 $ptpl->setVariable(
"TXT_LANG_FILES", $lng->txt(
"cmps_lang_files"));
232 $ptpl->setVariable(
"TXT_DB_UPDATE", $lng->txt(
"cmps_db_update"));
233 $ptpl->setVariable(
"VAL_PLUGIN_FILE",
234 "<".$lng->txt(
"cmps_main_dir").
">".
235 "/classes/class.il<Plugin_Name>Plugin.php");
236 $ptpl->setVariable(
"VAL_LANG_FILES",
237 "<".$lng->txt(
"cmps_main_dir").
">".
238 "/lang/ilias_<Language ID>.lang");
239 $ptpl->setVariable(
"VAL_DB_UPDATE",
240 "<".$lng->txt(
"cmps_main_dir").
">".
241 "/sql/dbupdate.php");
243 $ptpl->setVariable(
"TXT_PLUGIN_LANG_PREFIX", $lng->txt(
"cmps_plugin_lang_prefixes"));
244 $ptpl->setVariable(
"VAL_PLUGIN_LANG_PREFIX",
245 $comp->getPluginSlotLanguagePrefix(
$_GET[
"slot_id"]).
"<Plugin_ID>_");
247 $ptpl->setVariable(
"TXT_PLUGIN_DB_PREFIX", $lng->txt(
"cmps_plugin_db_prefixes"));
248 $ptpl->setVariable(
"VAL_PLUGIN_DB_PREFIX",
249 "il_".$comp->getPluginSlotLanguagePrefix(
$_GET[
"slot_id"]).
"<Plugin_ID>_");
252 include_once(
"./Services/Component/classes/class.ilPluginsTableGUI.php");
255 $ptpl->setVariable(
"PLUGIN_LIST", $plugins_table->getHTML());
258 $tpl->setContent($ptpl->get());
259 $tpl->setTitle($comp->getComponentType().
"/".$comp->getName().
": ".
260 $lng->txt(
"cmps_plugin_slot").
" \"".$comp->getPluginSlotName(
$_GET[
"slot_id"]).
"\"");
261 $tpl->setDescription(
"");
270 die (
"ilObjComponentSettigsGUI::refreshPluginsInformation: deprecated");
271 include_once(
"./Services/Component/classes/class.ilPlugin.php");
272 ilPlugin::refreshPluginXmlInformation();
276 $ilCtrl->redirect($this,
"listServices");
280 $ilCtrl->redirect($this,
"listModules");
291 include_once(
"./Services/Component/classes/class.ilPlugin.php");
302 $ilCtrl->setParameter($this,
"ctype",
$_GET[
"ctype"]);
303 $ilCtrl->setParameter($this,
"cname",
$_GET[
"cname"]);
304 $ilCtrl->setParameter($this,
"slot_id",
$_GET[
"slot_id"]);
305 $ilCtrl->redirect($this,
"showPluginSlot");
315 include_once(
"./Services/Component/classes/class.ilPlugin.php");
330 $ilCtrl->setParameter($this,
"ctype",
$_GET[
"ctype"]);
331 $ilCtrl->setParameter($this,
"cname",
$_GET[
"cname"]);
332 $ilCtrl->setParameter($this,
"slot_id",
$_GET[
"slot_id"]);
333 $ilCtrl->redirect($this,
"showPluginSlot");
343 include_once(
"./Services/Component/classes/class.ilPlugin.php");
354 $ilCtrl->setParameter($this,
"ctype",
$_GET[
"ctype"]);
355 $ilCtrl->setParameter($this,
"cname",
$_GET[
"cname"]);
356 $ilCtrl->setParameter($this,
"slot_id",
$_GET[
"slot_id"]);
357 $ilCtrl->redirect($this,
"showPluginSlot");
367 include_once(
"./Services/Component/classes/class.ilPlugin.php");
371 $result = $pl->updateLanguages();
378 $ilCtrl->setParameter($this,
"ctype",
$_GET[
"ctype"]);
379 $ilCtrl->setParameter($this,
"cname",
$_GET[
"cname"]);
380 $ilCtrl->setParameter($this,
"slot_id",
$_GET[
"slot_id"]);
381 $ilCtrl->redirect($this,
"showPluginSlot");
391 include_once(
"./Services/Component/classes/class.ilPluginDBUpdate.php");
393 $_GET[
"slot_id"],
$_GET[
"pname"], $ilDB,
true);
395 $dbupdate->applyUpdate();
397 if ($dbupdate->updateMsg ==
"no_changes")
399 $message = $this->lng->txt(
"no_changes").
". ".$this->lng->txt(
"database_is_uptodate");
403 foreach ($dbupdate->updateMsg as $row)
405 $message .= $this->lng->txt($row[
"msg"]).
": ".$row[
"nr"].
"<br/>";
413 $ilCtrl->setParameter($this,
"slot_id",
$_GET[
"slot_id"]);
414 $ilCtrl->redirect($this,
"showPluginSlot");