diff options
Diffstat (limited to 'app/controller')
| -rw-r--r-- | app/controller/obj.control.php | 13 | 
1 files changed, 5 insertions, 8 deletions
| diff --git a/app/controller/obj.control.php b/app/controller/obj.control.php index 74288ee..2154d16 100644 --- a/app/controller/obj.control.php +++ b/app/controller/obj.control.php @@ -16,7 +16,6 @@  require_once "class/controller.class.php";  require_once "model/obj.mod.php"; -require_once "class/object.class.php";  /*   * Object viewer, Used to view groups, pads, and more! @@ -28,23 +27,21 @@ class Obj extends Controller       */      function handle($argv)      { -        $mod = new ObjModel(); -        $obj = new DBObject($argv[0]); +        $mod = new ObjModel($argv[0]); -        if (!$obj->canAccess($this->getCurrentUser())) +        if (!$mod->obj->canAccess($this->getCurrentUser()))              throw new Exception("You do not have permission to access this object"); -        switch ($obj->type) +        switch ($mod->obj->type)          {              case "group": -                $this->action_group($mod, $obj->guid); +                $this->action_group($mod);                  break;          }      } -    function action_group($mod, $guid) +    function action_group($mod)      { -        $mod->initGroup($guid);          include "view/obj/group.view.php";      }  } | 
