ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilObjBlogListGUI.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
5 include_once "Services/Object/classes/class.ilObjectListGUI.php";
6 
16 {
20  function init()
21  {
22  $this->copy_enabled = true;
23  $this->delete_enabled = true;
24  $this->cut_enabled = true;
25  $this->subscribe_enabled = true;
26  $this->link_enabled = true; // #10498
27  $this->payment_enabled = false;
28  $this->info_screen_enabled = true;
29  $this->type = "blog";
30  $this->gui_class_name = "ilobjbloggui";
31 
32  // general commands array
33  include_once('./Modules/Blog/classes/class.ilObjBlogAccess.php');
34  $this->commands = ilObjBlogAccess::_getCommands();
35  }
36 
37  public function getCommands()
38  {
39  $commands = parent::getCommands();
40 
41  // #10182 - handle edit and contribute
42  $permissions = array();
43  foreach($commands as $idx => $item)
44  {
45  if($item["lang_var"] == "edit" && $item["granted"])
46  {
47  $permissions[$item["permission"]] = $idx;
48  }
49  }
50  if(sizeof($permissions) == 2)
51  {
52  unset($commands[$permissions["contribute"]]);
53  }
54 
55  return $commands;
56  }
57 }
58 
59 ?>