diff options
author | Malf Furious <m@lfurio.us> | 2016-06-12 20:50:57 -0400 |
---|---|---|
committer | Malf Furious <m@lfurio.us> | 2016-06-12 20:50:57 -0400 |
commit | 1f39899416ca012d50d261d88b6c2bc86a673212 (patch) | |
tree | ad03dd255b98fa04a22de1b917edd99b87ab61a5 /app/controller/obj.control.php | |
parent | 2adba6a387ac93f750cb795bb39a36077aa7b0de (diff) | |
download | scrott-1f39899416ca012d50d261d88b6c2bc86a673212.tar.gz scrott-1f39899416ca012d50d261d88b6c2bc86a673212.zip |
Update Obj controller
This commit makes the Obj controller compatable with changes introduced
in the previous commit.
Diffstat (limited to '')
-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"; } } |