projects
/
Pman.Core
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Process/Php7.php
[Pman.Core]
/
Pman.php
diff --git
a/Pman.php
b/Pman.php
index
f7c7778
..
8a3cc67
100644
(file)
--- a/
Pman.php
+++ b/
Pman.php
@@
-11,22
+11,28
@@
class Pman_Core_Pman {
function init ($pg)
{
function init ($pg)
{
- if(!empty($_REQUEST['_core_skip_check'])){
- return;
- }
- $group = DB_DataObject::factory('groups');
- // group should be auto created - by update-database...
+ $group = DB_DataObject::factory('core_group');
+
+ // group should be auto created - by update-database...
+
if(!$group->get('name', 'core-person-signup-bcc')){
if(!$group->get('name', 'core-person-signup-bcc')){
- die("group core-person-signup-bcc does not exist : add ?_core_skip_check=1 to bypass this check");
+ $group = DB_DataObject::factory('core_group');
+ $group->name = 'core-person-signup-bcc';
+ $group->insert();
}
}
- $p = DB_DataObject::factory('Person');
+ $p = DB_DataObject::factory('core_person');
+ if (!$p->count()) {
+ return; // can not check people...
+ }
+ // got people...
+
- $member = DB_DataObject::factory('
group_members
');
+ $member = DB_DataObject::factory('
core_group_member
');
$member->group_id = $group->id;
if ($member->count()) {
return;
$member->group_id = $group->id;
if ($member->count()) {
return;
@@
-36,11
+42,14
@@
class Pman_Core_Pman {
// if we only have one member - then add it .... (it's the admin, and they can modify this later.. - after they get annoyed with it..
// if we only have one member - then add it .... (it's the admin, and they can modify this later.. - after they get annoyed with it..
+ $p->find(true);
+ $member = DB_DataObject::factory('core_group_member');
+ $member->group_id = $group->id;
+ $member->user_id = $p->id;
+ $member->insert();
- // only display if we have members..
- if($p->count() && !$member->count()){
- die("group core-person-signup-bcc does not have any members : add ?_core_skip_check=1 to bypass this check");
- }
+ // only display if we have members..
+
}
}