<?php
/**
* Table Definition for Groups
+ *
+ *group types
+ *
+ * 0 = permission group..
+ * 1 = team
+ * 2 = contact group
+ *
+ *
*/
require_once 'DB/DataObject.php';
if (!$ids) {
return array();
}
- $p = DB_Dataobject::factory(empty($ff->Pman['authTable']) ? 'Person' : $ff->Pman['authTable']);
+ //$p = DB_Dataobject::factory(empty($ff->Pman['authTable']) ? 'Person' : $ff->Pman['authTable']);
+ // groups databse is hard coded to person.. so this should not be used for other tables.????
+ $p = DB_Dataobject::factory( 'Person' );
+
$p->whereAdd('id IN ('. implode(',', $ids) .')');
$p->active = 1;
return $p->fetchAll($what);
-
-
-
-
}
+
+ function lookup($k,$v = false) {
+ if ($v === false) {
+ $v = $k;
+ $k = 'id';
+ }
+ $this->get($k,$v);
+
+ return $this;
+ }
+
function postListFilter($ar, $au, $req)
{
}
+ function initDatabase($roo, $data)
+ {
+ $this->initGroups();
+ foreach($data as $gi) {
+ $g = DB_DataObject::factory('Groups');
+ $g->setFrom($gi);
+ if ($g->count()) {
+ continue;
+ }
+ $g->insert();
+
+
+ }
+ }
}