ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilObjFolderListGUI.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 
35 include_once "Services/Object/classes/class.ilObjectListGUI.php";
36 
38 {
43  function ilObjFolderListGUI()
44  {
45  $this->ilObjectListGUI();
46  }
47 
51  function init()
52  {
53  $this->static_link_enabled = true;
54  $this->delete_enabled = true;
55  $this->cut_enabled = true;
56  $this->copy_enabled = true;
57  $this->subscribe_enabled = true;
58  $this->link_enabled = false;
59  $this->payment_enabled = false;
60  $this->info_screen_enabled = true;
61  $this->type = "fold";
62  $this->gui_class_name = "ilobjfoldergui";
63 
64  // general commands array
65  include_once('./Modules/Folder/classes/class.ilObjFolderAccess.php');
66  $this->commands = ilObjFolderAccess::_getCommands();
67  }
68 
69  // BEGIN WebDAV: Get parent properties
70  // BEGIN ChangeEvent: Get parent properties
79  function getProperties()
80  {
81  global $lng, $ilUser, $ilias;
82 
83  // BEGIN WebDAV get parent properties
84  $props = parent::getProperties();
85  // END WebDAV get parent properties
86 
87  return $props;
88  }
89  // END ChangeEvent: Get parent properties
90  // END WebDAV: Get parent properties
91 
99  function getCommandLink($a_cmd)
100  {
101  global $ilCtrl;
102 
103  // BEGIN WebDAV: Mount webfolder.
104  switch ($a_cmd)
105  {
106  case 'mount_webfolder' :
107  require_once ('Services/WebDAV/classes/class.ilDAVActivationChecker.php');
109  {
110  require_once ('Services/WebDAV/classes/class.ilDAVServer.php');
111  $davServer = ilDAVServer::getInstance();
112 
113  // XXX: The following is a very dirty, ugly trick.
114  // To mount URI needs to be put into two attributes:
115  // href and folder. This hack returns both attributes
116  // like this: http://...mount_uri..." folder="http://...folder_uri...
117  $cmd_link = $davServer->getMountURI($this->ref_id, $this->title, $this->parent).
118  '" folder="'.$davServer->getFolderURI($this->ref_id, $this->title, $this->parent);
119  break;
120  } // Fall through, when plugin is inactive.
121  default :
122  // separate method for this line
123  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $this->ref_id);
124  $cmd_link = $ilCtrl->getLinkTargetByClass("ilrepositorygui", $a_cmd);
125  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
126  break;
127  }
128 
129  return $cmd_link;
130  // END WebDAV: Mount Webfolder
131  }
132 
133  // BEGIN WebDAV: mount_webfolder in _blank frame
143  function getCommandFrame($a_cmd)
144  {
145  // begin-patch fm
146  return parent::getCommandFrame($a_cmd);
147  // end-patch fm
148  }
149  // END WebDAV: mount_webfolder in _blank frame
150 
151 
152 } // END class.ilObjFolderListGUI
153 ?>