ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilChatroomInfoTask.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4
16{
17 private $gui;
18
27 {
28 $this->gui = $gui;
29 require_once 'Services/InfoScreen/classes/class.ilInfoScreenGUI.php';
30 }
31
39 public function executeDefault($method)
40 {
46 global $rbacsystem, $ilCtrl, $lng;
47
48 include_once 'Modules/Chatroom/classes/class.ilChatroom.php';
49
50 if(!ilChatroom::checkUserPermissions('read', $this->gui->ref_id))
51 {
52 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", ROOT_FOLDER_ID);
53 $ilCtrl->redirectByClass("ilrepositorygui", "");
54 }
55
56 $this->gui->switchToVisibleMode();
57
58 if(!$rbacsystem->checkAccess("visible", $this->gui->ref_id))
59 {
60 $this->gui->ilias->raiseError(
61 $lng->txt("msg_no_perm_read"), $this->ilias->error_obj->MESSAGE
62 );
63 }
64
65 $info = new ilInfoScreenGUI($this->gui);
66
67 $info->enablePrivateNotes();
68
69 if($rbacsystem->checkAccess("read", (int)$_GET["ref_id"]))
70 {
71 $info->enableNews();
72 }
73
74 $info->addMetaDataSections(
75 $this->gui->object->getId(), 0, $this->gui->object->getType()
76 );
77 if(!$method)
78 {
79 $ilCtrl->setCmd('showSummary');
80 }
81 else
82 {
83 $ilCtrl->setCmd($method);
84 }
85 $ilCtrl->forwardCommand($info);
86 }
87}
$_GET["client_id"]
Class ilChatroomInfoTask.
__construct(ilChatroomObjectGUI $gui)
Constructor.
executeDefault($requestedMethod)
static checkUserPermissions($permissions, $ref_id, $send_info=true)
Checks user permissions by given array and ref_id.
Class ilInfoScreenGUI.
$info
Definition: example_052.php:80
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:40