ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
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 
26  public function __construct(ilDBayObjectGUI $gui)
27  {
28  $this->gui = $gui;
29  require_once 'Services/InfoScreen/classes/class.ilInfoScreenGUI.php';
30  }
31 
40  public function executeDefault($method)
41  {
42  global $ilAccess, $ilCtrl, $lng;
43 
44  include_once 'Modules/Chatroom/classes/class.ilChatroom.php';
45 
46  if ( !ilChatroom::checkUserPermissions( 'read' , $this->gui->ref_id ) )
47  {
48  ilUtil::redirect("repository.php");
49  }
50 
51  $this->gui->switchToVisibleMode();
52 
53  if( !$ilAccess->checkAccess( "visible", "", $this->gui->ref_id ) )
54  {
55  $this->gui->ilias->raiseError(
56  $lng->txt( "msg_no_perm_read" ), $this->ilias->error_obj->MESSAGE
57  );
58  }
59 
60  $info = new ilInfoScreenGUI( $this->gui );
61 
62  $info->enablePrivateNotes();
63 
64  if( $ilAccess->checkAccess( "read", "", $_GET["ref_id"] ) )
65  {
66  $info->enableNews();
67  }
68 
69  $info->addMetaDataSections(
70  $this->gui->object->getId(), 0, $this->gui->object->getType()
71  );
72 
73  if(!$method)
74  {
75  $ilCtrl->setCmd( 'showSummary' );
76  }
77  else
78  {
79  $ilCtrl->setCmd( $method );
80  }
81  $ilCtrl->forwardCommand( $info );
82  }
83 
84 }
85 
86 ?>