summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app/model/common.mod.php11
-rw-r--r--app/model/obj.mod.php9
2 files changed, 13 insertions, 7 deletions
diff --git a/app/model/common.mod.php b/app/model/common.mod.php
index e478e9d..232f0c2 100644
--- a/app/model/common.mod.php
+++ b/app/model/common.mod.php
@@ -17,6 +17,7 @@
require_once "model/master.mod.php";
require_once "class/form.class.php";
require_once "class/setting.class.php";
+require_once "class/object.class.php";
require_once "class/user.class.php";
require_once "class/group.class.php";
@@ -31,12 +32,20 @@ class CommonModel extends MasterModel
/*
* Constructor
*/
- function __construct()
+ function __construct($guid = null)
{
parent::__construct();
$this->first_setting_tab_active = 0;
$this->first_setting_tab_disp = 0;
$this->common_handleFormSubmissions($_REQUEST['input'], $_FILES['attachment']);
+
+ if (!is_null($guid))
+ {
+ $this->obj = new DBObject($guid);
+ $this->owner = $this->obj->getOwner();
+ $this->members = $this->obj->getMembers();
+ }
+
$this->common_deflt();
}
diff --git a/app/model/obj.mod.php b/app/model/obj.mod.php
index 426e1ac..159c962 100644
--- a/app/model/obj.mod.php
+++ b/app/model/obj.mod.php
@@ -15,18 +15,15 @@
*/
require_once "model/common.mod.php";
-require_once "class/group.class.php";
class ObjModel extends CommonModel
{
/*
- * Initialize a group view
+ * Constructor
*/
- function initGroup($guid)
+ function __construct($guid)
{
- $this->obj = new Group($guid);
- $this->owner = $this->obj->getOwner();
- $this->members = $this->obj->getMembers();
+ parent::__construct($guid);
}
}