.
This commit is contained in:
parent
c3273dfcdc
commit
e4325bc565
2 changed files with 19 additions and 11 deletions
|
@ -6,7 +6,7 @@ function validate_members(&$item) {
|
||||||
|
|
||||||
function group_init(&$a) {
|
function group_init(&$a) {
|
||||||
require_once('include/group.php');
|
require_once('include/group.php');
|
||||||
$a->page['aside'] .= group_side();
|
$a->page['aside'] = group_side();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ function group_post(&$a) {
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
notice("Could not create group." . EOL );
|
notice("Could not create group." . EOL );
|
||||||
// goaway($a->get_baseurl() . '/group');
|
goaway($a->get_baseurl() . '/group');
|
||||||
return; // NOTREACHED
|
return; // NOTREACHED
|
||||||
}
|
}
|
||||||
if(($a->argc == 2) && (intval($a->argv[1]))) {
|
if(($a->argc == 2) && (intval($a->argv[1]))) {
|
||||||
|
@ -50,6 +50,8 @@ function group_post(&$a) {
|
||||||
intval($_SESSION['uid']),
|
intval($_SESSION['uid']),
|
||||||
intval($group['id'])
|
intval($group['id'])
|
||||||
);
|
);
|
||||||
|
if($r)
|
||||||
|
notice("Group name changed." . EOL );
|
||||||
}
|
}
|
||||||
$members = $_POST['group_members_select'];
|
$members = $_POST['group_members_select'];
|
||||||
array_walk($members,'validate_members');
|
array_walk($members,'validate_members');
|
||||||
|
@ -57,6 +59,7 @@ function group_post(&$a) {
|
||||||
intval($a->argv[1]),
|
intval($a->argv[1]),
|
||||||
intval($_SESSION['uid'])
|
intval($_SESSION['uid'])
|
||||||
);
|
);
|
||||||
|
$result = true;
|
||||||
if(count($members)) {
|
if(count($members)) {
|
||||||
foreach($members as $member) {
|
foreach($members as $member) {
|
||||||
$r = q("INSERT INTO `group_member` ( `uid`, `gid`, `contact-id`)
|
$r = q("INSERT INTO `group_member` ( `uid`, `gid`, `contact-id`)
|
||||||
|
@ -65,8 +68,13 @@ function group_post(&$a) {
|
||||||
intval($group['id']),
|
intval($group['id']),
|
||||||
intval($member)
|
intval($member)
|
||||||
);
|
);
|
||||||
|
if(! $r)
|
||||||
|
$result = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if($result)
|
||||||
|
notice("Membership list updated." . EOL);
|
||||||
|
$a->page['aside'] = group_side();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
18
wip/todo
18
wip/todo
|
@ -7,13 +7,13 @@ profile photo to self contact page? - resolve profile photo inconsistency
|
||||||
use photo hash to notify of changes?
|
use photo hash to notify of changes?
|
||||||
|
|
||||||
|
|
||||||
contact editor
|
>>>>>>>>contact editor
|
||||||
block photo
|
>>>>>>>> block photo
|
||||||
|
|
||||||
profile "you name it" field
|
>>>>>>>>profile "you name it" field
|
||||||
|
|
||||||
|
|
||||||
group - delete, theme
|
group - delete (keep id in acl lists to prvent them from breaking security)
|
||||||
|
|
||||||
pager - photos
|
pager - photos
|
||||||
|
|
||||||
|
@ -21,13 +21,13 @@ photos/albums/ java uploader
|
||||||
|
|
||||||
item delete
|
item delete
|
||||||
|
|
||||||
item edit
|
>>>>>>>>item edit
|
||||||
|
|
||||||
dfrn_poll - import items
|
dfrn_poll - import items
|
||||||
|
|
||||||
local/remote indicator
|
>>>>>>>>local/remote indicator
|
||||||
|
|
||||||
side/text
|
>>>>>>>>side/text
|
||||||
|
|
||||||
|
|
||||||
notififier abstraction
|
notififier abstraction
|
||||||
|
@ -48,9 +48,9 @@ email
|
||||||
|
|
||||||
chat
|
chat
|
||||||
|
|
||||||
plugin api
|
>>>>>>>>plugin api
|
||||||
|
|
||||||
theme api
|
>>>>>>>>theme api
|
||||||
|
|
||||||
ajax
|
ajax
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue