3 include_once(
"./classes/class.ilObjectGUI.php");
24 public function __construct($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
29 $this->lng->loadLanguageModule(
'cmps');
40 global $rbacsystem,
$ilErr,$ilAccess;
42 $next_class = $this->ctrl->getNextClass($this);
43 $cmd = $this->ctrl->getCmd();
47 if(!$ilAccess->checkAccess(
'read',
'',$this->object->getRefId()))
49 $ilErr->raiseError($this->lng->txt(
'no_permission'),$ilErr->WARNING);
54 case 'ilpermissiongui':
55 $this->tabs_gui->setTabActive(
'perm_settings');
56 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
58 $ret =& $this->ctrl->forwardCommand($perm_gui);
81 global $rbacsystem, $ilAccess;
82 if ($rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
84 $this->tabs_gui->addTarget(
"cmps_modules",
85 $this->ctrl->getLinkTarget($this,
"listModules"),
86 array(
"listModules",
"view",
"showPluginSlot"));
88 $this->tabs_gui->addTarget(
"cmps_services",
89 $this->ctrl->getLinkTarget($this,
"listServices"),
90 array(
"listServices"));
93 if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
95 $this->tabs_gui->addTarget(
"perm_settings",
96 $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm"),
97 array(),
'ilpermissiongui');
100 if (
$_GET[
"ctype"] ==
"Services")
102 $this->tabs_gui->activateTab(
"cmps_services");
113 $this->tabs_gui->setTabActive(
'cmps_modules');
115 $tpl =
new ilTemplate(
"tpl.component_list.html",
true,
true,
"Services/Component");
124 include_once(
"./Services/Component/classes/class.ilComponentsTableGUI.php");
127 $tpl->setVariable(
"TABLE", $comp_table->getHTML());
128 $this->tpl->setContent(
$tpl->get());
138 $this->tabs_gui->setTabActive(
'cmps_services');
140 $tpl =
new ilTemplate(
"tpl.component_list.html",
true,
true,
"Services/Component");
143 $tpl->setVariable(
"HREF_REFRESH_PLUGINS_INFORMATION",
144 $ilCtrl->getLinkTarget($this,
"refreshPluginsInformation"));
145 $tpl->setVariable(
"TXT_REFRESH_PLUGINS_INFORMATION",
146 $lng->txt(
"cmps_refresh_plugins_inf"));
148 include_once(
"./Services/Component/classes/class.ilComponentsTableGUI.php");
151 $tpl->setVariable(
"TABLE", $comp_table->getHTML());
152 $this->tpl->setContent(
$tpl->get());
163 if (is_array(
$_POST[
"obj_pos"]))
165 foreach(
$_POST[
"obj_pos"] as $k => $v)
167 $ilSetting->set(
"obj_dis_creation_".$k, (
int)
$_POST[
"obj_dis_creation"][$k]);
172 $double = $ex_pos = array();
173 if (is_array(
$_POST[
"obj_pos"]))
176 foreach(
$_POST[
"obj_pos"] as $k => $v)
178 if (in_array($v, $ex_pos))
183 $ilSetting->set(
"obj_add_new_pos_".$k, $v);
187 if (count($double) == 0)
193 ilUtil::sendInfo($lng->txt(
"cmps_duplicate_positions").
" ".implode($double,
", "),
true);
196 $ilCtrl->redirect($this,
"listModules");
206 if (
$_GET[
"mode"] ==
"Services")
208 $ilTabs->setTabActive(
"cmps_services");
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 $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");
312 $ilCtrl->setParameter($this,
"ctype",
$_GET[
"ctype"]);
313 $ilCtrl->setParameter($this,
"cname",
$_GET[
"cname"]);
314 $ilCtrl->setParameter($this,
"slot_id",
$_GET[
"slot_id"]);
315 $ilCtrl->redirect($this,
"showPluginSlot");
324 include_once(
"./Services/Component/classes/class.ilPlugin.php");
341 $ilCtrl->initBaseClass(
"iladministrationgui");
342 $_GET[
"cmd"] =
"jumpToPluginSlot";
343 $ilCtrl->setParameterByClass(
"iladministrationgui",
"ctype",
$_GET[
"ctype"]);
344 $ilCtrl->setParameterByClass(
"iladministrationgui",
"cname",
$_GET[
"cname"]);
345 $ilCtrl->setParameterByClass(
"iladministrationgui",
"slot_id",
$_GET[
"slot_id"]);
346 $ilCtrl->setTargetScript(
"ilias.php");
347 $ilCtrl->callBaseClass();
358 include_once(
"./Services/Component/classes/class.ilPlugin.php");
373 $ilCtrl->setParameter($this,
"ctype",
$_GET[
"ctype"]);
374 $ilCtrl->setParameter($this,
"cname",
$_GET[
"cname"]);
375 $ilCtrl->setParameter($this,
"slot_id",
$_GET[
"slot_id"]);
376 $ilCtrl->redirect($this,
"showPluginSlot");
386 include_once(
"./Services/Component/classes/class.ilPlugin.php");
390 $result = $pl->updateLanguages();
397 $ilCtrl->setParameter($this,
"ctype",
$_GET[
"ctype"]);
398 $ilCtrl->setParameter($this,
"cname",
$_GET[
"cname"]);
399 $ilCtrl->setParameter($this,
"slot_id",
$_GET[
"slot_id"]);
400 $ilCtrl->redirect($this,
"showPluginSlot");
410 include_once(
"./Services/Component/classes/class.ilPluginDBUpdate.php");
412 $_GET[
"slot_id"],
$_GET[
"pname"], $ilDB,
true);
414 $dbupdate->applyUpdate();
416 if ($dbupdate->updateMsg ==
"no_changes")
418 $message = $this->lng->txt(
"no_changes").
". ".$this->lng->txt(
"database_is_uptodate");
422 foreach ($dbupdate->updateMsg as
$row)
424 $message .= $this->lng->txt($row[
"msg"]).
": ".$row[
"nr"].
"<br/>";
432 $ilCtrl->setParameter($this,
"slot_id",
$_GET[
"slot_id"]);
433 $ilCtrl->redirect($this,
"showPluginSlot");