projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f86256f
)
DataObjects/Groups.php
author
Alan Knowles
<alan@roojs.com>
Thu, 8 Aug 2013 04:24:00 +0000
(12:24 +0800)
committer
Alan Knowles
<alan@roojs.com>
Thu, 8 Aug 2013 04:24:00 +0000
(12:24 +0800)
DataObjects/Groups.php
patch
|
blob
|
history
diff --git
a/DataObjects/Groups.php
b/DataObjects/Groups.php
index
37c900b
..
875348c
100755
(executable)
--- a/
DataObjects/Groups.php
+++ b/
DataObjects/Groups.php
@@
-1,6
+1,14
@@
<?php
/**
* Table Definition for Groups
+ *
+ *group types
+ *
+ * 0 = permission group..
+ * 1 = team
+ * 2 = contact group
+ *
+ *
*/
require_once 'DB/DataObject.php';
@@
-147,6
+155,20
@@
class Pman_Core_DataObjects_Groups extends DB_DataObject
}
+ function initDatabase($roo, $data)
+ {
+ $this->initGroups();
+ foreach($data as $gi) {
+ $g = DB_DataObject::factory('Groups');
+ $g->setFrom($gi);
+ if ($g->count()) {
+ continue;
+ }
+ $g->insert();
+
+
+ }
+ }
}