ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilObjLanguageFolderGUI.php
Go to the documentation of this file.
1 <?php
2 /*
3  +-----------------------------------------------------------------------------+
4  | ILIAS open source |
5  +-----------------------------------------------------------------------------+
6  | Copyright (c) 1998-2001 ILIAS open source, University of Cologne |
7  | |
8  | This program is free software; you can redistribute it and/or |
9  | modify it under the terms of the GNU General Public License |
10  | as published by the Free Software Foundation; either version 2 |
11  | of the License, or (at your option) any later version. |
12  | |
13  | This program is distributed in the hope that it will be useful, |
14  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16  | GNU General Public License for more details. |
17  | |
18  | You should have received a copy of the GNU General Public License |
19  | along with this program; if not, write to the Free Software |
20  | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21  +-----------------------------------------------------------------------------+
22 */
23 
24 
37 require_once "./Services/Language/classes/class.ilObjLanguage.php";
38 require_once "./classes/class.ilObjectGUI.php";
39 
41 {
47  function ilObjLanguageFolderGUI($a_data,$a_id,$a_call_by_reference)
48  {
49  $this->type = "lngf";
50  $this->ilObjectGUI($a_data,$a_id,$a_call_by_reference, false);
51  $_GET["sort_by"] = "language";
52  }
53 
59  function viewObject()
60  {
61  global $rbacsystem, $ilSetting;
62 
63  if (!$rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
64  {
65  $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
66  }
67 
68  //add template for buttons
69  $this->tpl->addBlockfile("BUTTONS", "buttons", "tpl.buttons.html");
70 
71  if ($ilSetting->get("lang_ext_maintenance") == "1")
72  {
73  $this->tpl->setCurrentBlock("btn_cell");
74  $this->tpl->setVariable("BTN_LINK",
75  $this->ctrl->getLinkTarget($this, "confirmRefresh"));
76  $this->tpl->setVariable("BTN_TXT",$this->lng->txt("refresh_languages"));
77  $this->tpl->parseCurrentBlock();
78  }
79  else
80  {
81  $this->tpl->setCurrentBlock("btn_cell");
82  $this->tpl->setVariable("BTN_LINK",
83  $this->ctrl->getLinkTarget($this, "refresh"));
84  $this->tpl->setVariable("BTN_TXT",$this->lng->txt("refresh_languages"));
85  $this->tpl->parseCurrentBlock();
86  }
87 
88  $this->tpl->setCurrentBlock("btn_cell");
89  $this->tpl->setVariable("BTN_LINK",
90  $this->ctrl->getLinkTarget($this, "checkLanguage"));
91  $this->tpl->setVariable("BTN_TXT",$this->lng->txt("check_languages"));
92  $this->tpl->parseCurrentBlock();
93 
94  // extended language maintenance
95  if ($rbacsystem->checkAccess("write",$this->object->getRefId()))
96  {
97  if ($ilSetting->get("lang_ext_maintenance") == "1")
98  {
99  $this->tpl->setCurrentBlock("btn_cell");
100  $this->tpl->setVariable("BTN_LINK",
101  $this->ctrl->getLinkTarget($this, "disableExtendedLanguageMaintenance"));
102  $this->tpl->setVariable("BTN_TXT",$this->lng->txt("disable_ext_lang_maint"));
103  $this->tpl->parseCurrentBlock();
104  }
105  else
106  {
107  $this->tpl->setCurrentBlock("btn_cell");
108  $this->tpl->setVariable("BTN_LINK",
109  $this->ctrl->getLinkTarget($this, "enableExtendedLanguageMaintenance"));
110  $this->tpl->setVariable("BTN_TXT",$this->lng->txt("enable_ext_lang_maint"));
111  $this->tpl->parseCurrentBlock();
112  }
113  }
114 
115  //prepare objectlist
116  $this->data = array();
117  $this->data["data"] = array();
118  $this->data["ctrl"] = array();
119  $this->data["cols"] = array("","language","status","last_change", "usr_agreement");
120 
121  $languages = $this->object->getLanguages();
122 
123  foreach ($languages as $lang_key => $lang_data)
124  {
125  $status = "";
126 
127  // set status info (in use or systemlanguage)
128  if ($lang_data["status"])
129  {
130  $status = "<span class=\"small\"> (".$this->lng->txt($lang_data["status"]).")</span>";
131  }
132 
133  // set remark color
134  switch ($lang_data["info"])
135  {
136  case "file_not_found":
137  $remark = "<span class=\"smallred\"> ".$this->lng->txt($lang_data["info"])."</span>";
138  break;
139  case "new_language":
140  $remark = "<span class=\"smallgreen\"> ".$this->lng->txt($lang_data["info"])."</span>";
141  break;
142  default:
143  $remark = "";
144  break;
145  }
146 
147  if (file_exists("./Customizing/clients/".CLIENT_ID."/agreement/".
148  "agreement_".$lang_key.".html"))
149  {
150  $agreement_exists_str = $this->lng->txt("available")." (".$this->lng->txt("client").")";
151  }
152  else if (file_exists("./Customizing/global/agreement/".
153  "agreement_".$lang_key.".html"))
154  {
155  $agreement_exists_str = $this->lng->txt("available");
156  }
157  else
158  {
159  if ($lang_data["status"] == "system_language")
160  {
161  $agreement_exists_str = "<b>".$this->lng->txt("missing")."</b>";
162  }
163  else
164  {
165  $agreement_exists_str = $this->lng->txt("missing");
166  }
167  }
168 
169  // make language name clickable
170  if ($rbacsystem->checkAccess("write",$this->object->getRefId()))
171  {
172  if ($ilSetting->get("lang_ext_maintenance") == "1")
173  {
174  if (substr($lang_data["description"],0,9) == "installed")
175  {
176  $this->ctrl->setParameterByClass("ilobjlanguageextgui","obj_id",$lang_data["obj_id"]);
177  $url = $this->ctrl->getLinkTargetByClass("ilobjlanguageextgui","");
178  $lang_data["name"] = '<a href="'.$url.'">'.$lang_data["name"].'</a>';
179  }
180  }
181  }
182 
183  // visible data part
184  $this->data["data"][] = array(
185  "language" => $lang_data["name"].$status,
186  "status" => $this->lng->txt($lang_data["desc"])."<br/>".$remark,
187  "last_change" => $lang_data["last_update"],
188  "obj_id" => $lang_data["obj_id"],
189  "agreement" => $agreement_exists_str
190  );
191 
192  }
193 
194  $this->maxcount = count($this->data["data"]);
195 
196  // sorting array
197  $this->data["data"] = ilUtil::sortArray($this->data["data"],$_GET["sort_by"],$_GET["sort_order"]);
198 
199  // now compute control information
200  foreach ($this->data["data"] as $key => $val)
201  {
202  $this->data["ctrl"][$key] = array(
203  "obj_id" => $val["obj_id"],
204  "type" => $val["type"]
205  );
206 
207  unset($this->data["data"][$key]["obj_id"]);
208  $this->data["data"][$key]["last_change"] = ilDatePresentation::formatDate(new ilDateTime($this->data["data"][$key]["last_change"],IL_CAL_DATETIME));
209 
210  }
211 
212  $this->displayList();
213  }
214 
220  function displayList()
221  {
222  global $tree, $rbacsystem;
223 
224  require_once "./Services/Table/classes/class.ilTableGUI.php";
225 
226  // load template for table
227  $this->tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl.table.html");
228  // load template for table content data
229  $this->tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.obj_tbl_rows.html");
230 
231  $num = 0;
232 
233  $this->tpl->setVariable("FORMACTION",
234  $this->ctrl->getFormAction($this));
235 
236  // create table
237  $tbl = new ilTableGUI();
238 
239  // title & header columns
240  //$tbl->setTitle($this->lng->txt("obj_".$this->object->getType()),"icon_".$this->object->getType().".gif",$this->lng->txt("obj_".$this->object->getType()));
241  //$tbl->setHelp("tbl_help.php","icon_help.gif",$this->lng->txt("help"));
242  //$tbl->disable("header");
243  $tbl->disable("title");
244 
245  foreach ($this->data["cols"] as $val)
246  {
247  $header_names[] = $this->lng->txt($val);
248  }
249 
250  $tbl->setHeaderNames($header_names);
251 
252  $header_params = array("ref_id" => $this->ref_id);
253  $tbl->setHeaderVars($this->data["cols"],$header_params);
254 
255  // control
256  $tbl->setOrderColumn($_GET["sort_by"]);
257  $tbl->setOrderDirection($_GET["sort_order"]);
258  $tbl->setLimit(0);
259  $tbl->setOffset(0);
260  $tbl->setMaxCount($this->maxcount);
261  $tbl->disable("sort");
262 
263  // SHOW VALID ACTIONS
264  $this->tpl->setVariable("COLUMN_COUNTS",count($this->data["cols"]));
265  $this->showActions();
266 
267  // footer
268  $tbl->setFooter("tblfooter",$this->lng->txt("previous"),$this->lng->txt("next"));
269  //$tbl->disable("footer");
270 
271  // render table
272  $tbl->render();
273 
274  if (is_array($this->data["data"][0]))
275  {
276  //table cell
277  for ($i=0; $i < count($this->data["data"]); $i++)
278  {
279  $data = $this->data["data"][$i];
280  $ctrl = $this->data["ctrl"][$i];
281 
282  // color changing
283  $css_row = ilUtil::switchColor($i+1,"tblrow1","tblrow2");
284 
285  $this->tpl->setCurrentBlock("checkbox");
286  $this->tpl->setVariable("CHECKBOX_ID",$ctrl["obj_id"]);
287  $this->tpl->setVariable("CSS_ROW",$css_row);
288  $this->tpl->parseCurrentBlock();
289 
290  $this->tpl->setCurrentBlock("table_cell");
291  $this->tpl->setVariable("CELLSTYLE", "tblrow1");
292  $this->tpl->parseCurrentBlock();
293 
294  foreach ($data as $key => $val)
295  {
296 
297  $this->tpl->setCurrentBlock("text");
298 
299  $this->tpl->setVariable("TEXT_CONTENT", $val);
300  $this->tpl->parseCurrentBlock();
301 
302  $this->tpl->setCurrentBlock("table_cell");
303  $this->tpl->parseCurrentBlock();
304 
305  } //foreach
306 
307  $this->tpl->setCurrentBlock("tbl_content");
308  $this->tpl->setVariable("CSS_ROW", $css_row);
309  $this->tpl->parseCurrentBlock();
310  } //for
311  } //if is_array
312  }
313 
317  function installObject()
318  {
319  if (!isset($_POST["id"]))
320  {
321  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
322  }
323 
324  foreach ($_POST["id"] as $obj_id)
325  {
326  $langObj = new ilObjLanguage($obj_id);
327  $key = $langObj->install();
328 
329  if ($key != "")
330  {
331  $lang_installed[] = $key;
332  }
333 
334  unset($langObj);
335  }
336 
337  if (isset($lang_installed))
338  {
339  if (count($lang_installed) == 1)
340  {
341  $this->data = $this->lng->txt("lang_" . $lang_installed[0]) . " " . strtolower($this->lng->txt("installed")) . ".";
342  }
343  else
344  {
345  foreach ($lang_installed as $lang_key)
346  {
347  $langnames[] = $this->lng->txt("lang_" . $lang_key);
348  }
349  $this->data = implode(", ",$langnames) . " " . strtolower($this->lng->txt("installed")) . ".";
350  }
351  }
352  else
353  {
354  $this->data = $this->lng->txt("languages_already_installed");
355  }
356 
357  $this->out();
358  }
359 
360 
365  {
366  if (!isset($_POST["id"]))
367  {
368  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
369  }
370 
371  foreach ($_POST["id"] as $obj_id)
372  {
373  $langObj = new ilObjLanguage($obj_id);
374  $key = $langObj->install();
375 
376  if ($key != "")
377  {
378  $lang_installed[] = $key;
379  }
380 
381  unset($langObj);
382 
383  $langObj = new ilObjLanguage($obj_id);
384  $key = $langObj->install('local');
385 
386  if ($key != "")
387  {
388  $local_installed[] = $key;
389  }
390 
391  unset($langObj);
392  }
393 
394  if (isset($lang_installed))
395  {
396  if (count($lang_installed) == 1)
397  {
398  $this->data = $this->lng->txt("lang_" . $lang_installed[0]) . " " . strtolower($this->lng->txt("installed")) . ".";
399  }
400  else
401  {
402  foreach ($lang_installed as $lang_key)
403  {
404  $langnames[] = $this->lng->txt("lang_" . $lang_key);
405  }
406  $this->data = implode(", ",$langnames) . " " . strtolower($this->lng->txt("installed")) . ".";
407  }
408  }
409 
410  if (isset($local_installed))
411  {
412  if (count($local_installed) == 1)
413  {
414  $this->data .= " " . $this->lng->txt("lang_" . $local_installed[0]) . " " . $this->lng->txt("local_language_file") . " " . strtolower($this->lng->txt("installed")) . ".";
415  }
416  else
417  {
418  foreach ($local_installed as $lang_key)
419  {
420  $langnames[] = $this->lng->txt("lang_" . $lang_key);
421  }
422  $this->data .= " " . implode(", ",$langnames) . " " . $this->lng->txt("local_language_files") . " " . strtolower($this->lng->txt("installed")) . ".";
423  }
424  }
425  else
426  {
427  $this->data .= " " . $this->lng->txt("local_languages_already_installed");
428  }
429 
430  $this->out();
431  }
432 
433 
437  function uninstallObject()
438  {
439  if (!isset($_POST["id"]))
440  {
441  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
442  }
443 
444  // uninstall all selected languages
445  foreach ($_POST["id"] as $obj_id)
446  {
447  $langObj = new ilObjLanguage($obj_id);
448  if (!($sys_lang = $langObj->isSystemLanguage()))
449  if (!($usr_lang = $langObj->isUserLanguage()))
450  {
451  $key = $langObj->uninstall();
452  if ($key != "")
453  $lang_uninstalled[] = $key;
454  }
455  unset($langObj);
456  }
457 
458  // generate output message
459  if (isset($lang_uninstalled))
460  {
461  if (count($lang_uninstalled) == 1)
462  {
463  $this->data = $this->lng->txt("lang_".$lang_uninstalled[0])." ".$this->lng->txt("uninstalled");
464  }
465  else
466  {
467  foreach ($lang_uninstalled as $lang_key)
468  {
469  $langnames[] = $this->lng->txt("lang_".$lang_key);
470  }
471 
472  $this->data = implode(", ",$langnames)." ".$this->lng->txt("uninstalled");
473  }
474  }
475  elseif ($sys_lang)
476  {
477  $this->data = $this->lng->txt("cannot_uninstall_systemlanguage");
478  }
479  elseif ($usr_lang)
480  {
481  $this->data = $this->lng->txt("cannot_uninstall_language_in_use");
482  }
483  else
484  {
485  $this->data = $this->lng->txt("languages_already_uninstalled");
486  }
487 
488  $this->out();
489  }
490 
494  function refreshObject()
495  {
496  $languages = ilObject::_getObjectsByType("lng");
497 
498  foreach ($languages as $lang)
499  {
500  $langObj = new ilObjLanguage($lang["obj_id"],false);
501 
502  if ($langObj->isInstalled() == true)
503  {
504  if ($langObj->check())
505  {
506  $langObj->flush('keep_local');
507  $langObj->insert();
508  $langObj->setTitle($langObj->getKey());
509  $langObj->setDescription($langObj->getStatus());
510  $langObj->update();
511  $langObj->optimizeData();
512 
513  if ($langObj->isLocal() == true)
514  {
515  if ($langObj->check('local'))
516  {
517  $langObj->insert('local');
518  $langObj->setTitle($langObj->getKey());
519  $langObj->setDescription($langObj->getStatus());
520  $langObj->update();
521  $langObj->optimizeData();
522  }
523  }
524  }
525  }
526 
527  unset($langObj);
528  }
529 
530  $this->data = $this->lng->txt("languages_updated");
531 
532  $this->out();
533  }
534 
535 
540  {
541  global $lng;
542 
543  $this->data = $this->lng->txt("selected_languages_updated");
544  $lng->loadLanguageModule("meta");
545 
546  foreach ($_POST["id"] as $id)
547  {
548  $langObj = new ilObjLanguage($id, false);
549 
550  if ($langObj->isInstalled() == true)
551  {
552  if ($langObj->check())
553  {
554  $langObj->flush('keep_local');
555  $langObj->insert();
556  $langObj->setTitle($langObj->getKey());
557  $langObj->setDescription($langObj->getStatus());
558  $langObj->update();
559  $langObj->optimizeData();
560 
561  if ($langObj->isLocal() == true)
562  {
563  if ($langObj->check('local'))
564  {
565  $langObj->insert('local');
566  $langObj->setTitle($langObj->getKey());
567  $langObj->setDescription($langObj->getStatus());
568  $langObj->update();
569  $langObj->optimizeData();
570  }
571  }
572  }
573  $this->data .= "<br />". $lng->txt("meta_l_".$langObj->getKey());
574  }
575 
576  unset($langObj);
577  }
578 
579  $this->out();
580  }
581 
582 
587  {
588  require_once './Services/User/classes/class.ilObjUser.php';
589 
590  if (!isset($_POST["id"]))
591  {
592  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
593  }
594 
595  if (count($_POST["id"]) != 1)
596  {
597  $this->ilias->raiseError($this->lng->txt("choose_only_one_language")."<br/>".$this->lng->txt("action_aborted"),$this->ilias->error_obj->MESSAGE);
598  }
599 
600  $obj_id = $_POST["id"][0];
601 
602  $newUserLangObj = new ilObjLanguage($obj_id);
603 
604  if ($newUserLangObj->isUserLanguage())
605  {
606  $this->ilias->raiseError($this->lng->txt("lang_".$newUserLangObj->getKey())." ".$this->lng->txt("is_already_your")." ".$this->lng->txt("user_language")."<br/>".$this->lng->txt("action_aborted"),$this->ilias->error_obj->MESSAGE);
607  }
608 
609  if ($newUserLangObj->isInstalled() == false)
610  {
611  $this->ilias->raiseError($this->lng->txt("lang_".$newUserLangObj->getKey())." ".$this->lng->txt("language_not_installed")."<br/>".$this->lng->txt("action_aborted"),$this->ilias->error_obj->MESSAGE);
612  }
613 
614  $curUser = new ilObjUser($_SESSION["AccountId"]);
615  $curUser->setLanguage($newUserLangObj->getKey());
616  $curUser->update();
617  //$this->setUserLanguage($new_lang_key);
618 
619  $this->data = $this->lng->txt("user_language")." ".$this->lng->txt("changed_to")." ".$this->lng->txt("lang_".$newUserLangObj->getKey()).".";
620 
621  $this->out();
622  }
623 
624 
629  {
630  if (!isset($_POST["id"]))
631  {
632  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
633  }
634 
635  if (count($_POST["id"]) != 1)
636  {
637  $this->ilias->raiseError($this->lng->txt("choose_only_one_language")."<br/>".$this->lng->txt("action_aborted"),$this->ilias->error_obj->MESSAGE);
638  }
639 
640  $obj_id = $_POST["id"][0];
641 
642  $newSysLangObj = new ilObjLanguage($obj_id);
643 
644  if ($newSysLangObj->isSystemLanguage())
645  {
646  $this->ilias->raiseError($this->lng->txt("lang_".$newSysLangObj->getKey())." is already the system language!<br>Action aborted!",$this->ilias->error_obj->MESSAGE);
647  }
648 
649  if ($newSysLangObj->isInstalled() == false)
650  {
651  $this->ilias->raiseError($this->lng->txt("lang_".$newSysLangObj->getKey())." is not installed. Please install that language first.<br>Action aborted!",$this->ilias->error_obj->MESSAGE);
652  }
653 
654  $this->ilias->setSetting("language", $newSysLangObj->getKey());
655 
656  // update ini-file
657  $this->ilias->ini->setVariable("language","default",$newSysLangObj->getKey());
658  $this->ilias->ini->write();
659 
660  $this->data = $this->lng->txt("system_language")." ".$this->lng->txt("changed_to")." ".$this->lng->txt("lang_".$newSysLangObj->getKey()).".";
661 
662  $this->out();
663  }
664 
665 
670  {
671  //$langFoldObj = new ilObjLanguageFolder($_GET["obj_id"]);
672  //$this->data = $langFoldObj->checkAllLanguages();
673  $this->data = $this->object->checkAllLanguages();
674  $this->out();
675  }
676 
677 
678  function out()
679  {
680  ilUtil::sendInfo($this->data,true);
681  $this->ctrl->redirect($this, "view");
682  }
683 
684  function getAdminTabs(&$tabs_gui)
685  {
686  $this->getTabs($tabs_gui);
687  }
688 
694  function getTabs(&$tabs_gui)
695  {
696  global $rbacsystem;
697 
698  if ($rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
699  {
700  $tabs_gui->addTarget("settings",
701  $this->ctrl->getLinkTarget($this, "view"), array("view",""), "", "");
702  }
703 
704  if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
705  {
706  $tabs_gui->addTarget("perm_settings",
707  $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"), array("perm","info","owner"), 'ilpermissiongui');
708  }
709  }
710 
711  function &executeCommand()
712  {
713  $next_class = $this->ctrl->getNextClass($this);
714  $cmd = $this->ctrl->getCmd();
715  $this->prepareOutput();
716 
717  switch($next_class)
718  {
719  case 'ilpermissiongui':
720  include_once("./classes/class.ilPermissionGUI.php");
721  $perm_gui =& new ilPermissionGUI($this);
722  $ret =& $this->ctrl->forwardCommand($perm_gui);
723  break;
724 
725  default:
726  if(!$cmd)
727  {
728  $cmd = "view";
729  }
730  $cmd .= "Object";
731  $this->$cmd();
732 
733  break;
734  }
735  return true;
736  }
737 
742  {
743  global $ilSetting, $ilCtrl;
744 
745  $ilSetting->set("lang_ext_maintenance", 1);
746  $ilCtrl->redirect($this, "view");
747  }
748 
753  {
754  global $ilSetting, $ilCtrl;
755 
756  $ilSetting->set("lang_ext_maintenance", 0);
757  $ilCtrl->redirect($this, "view");
758  }
759 
761  {
762  global $ilCtrl, $lng;
763 
764  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
765  $conf_screen = new ilConfirmationGUI();
766  $conf_screen->setFormAction($ilCtrl->getFormAction($this));
767  $conf_screen->setHeaderText($lng->txt("lang_refresh_confirm"));
768  $conf_screen->addItem("d", "d", $lng->txt("lang_refresh_confirm_info"));
769  $conf_screen->setCancel($lng->txt("cancel"), "view");
770  $conf_screen->setConfirm($lng->txt("ok"), "refresh");
771 
772  $this->tpl->setContent($conf_screen->getHTML());
773  }
774 
776  {
777  global $ilCtrl, $lng;
778 
779  if (!isset($_POST["id"]))
780  {
781  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
782  }
783 
784  $lng->loadLanguageModule("meta");
785  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
786  $conf_screen = new ilConfirmationGUI();
787  $conf_screen->setFormAction($ilCtrl->getFormAction($this));
788  $conf_screen->setHeaderText($lng->txt("lang_refresh_confirm_selected"));
789  foreach ($_POST["id"] as $id)
790  {
791  $lang_title = ilObject::_lookupTitle($id);
792  $conf_screen->addItem("id[]", $id, $lng->txt("meta_l_".$lang_title));
793  }
794  $conf_screen->addItem("d", "d", $lng->txt("lang_refresh_confirm_info"));
795  $conf_screen->setCancel($lng->txt("cancel"), "view");
796  $conf_screen->setConfirm($lng->txt("ok"), "refreshSelected");
797  $this->tpl->setContent($conf_screen->getHTML());
798  }
799 
803  function getActions()
804  {
805  global $ilSetting;
806 
807  // standard actions for container
808  return array(
809  "install" => array("name" => "install", "lng" => "install"),
810  "installLocal" => array("name" => "installLocal", "lng" => "install_local"),
811  "uninstall" => array("name" => "uninstall", "lng" => "uninstall"),
812  "refresh" => $ilSetting->get("lang_ext_maintenance") == "1" ?
813  array("name" => "confirmRefreshSelected", "lng" => "refresh") :
814  array("name" => "RefreshSelected", "lng" => "refresh"),
815  "setSystemLanguage" => array("name" => "setSystemLanguage", "lng" => "setSystemLanguage"),
816  "setUserLanguage" => array("name" => "setUserLanguage", "lng" => "setUserLanguage")
817  );
818  }
819 
820 
821 } // END class.ilObjLanguageFolderGUI
822 ?>