group removal
This commit is contained in:
parent
f4e634ad52
commit
d2c6fa3fa1
2 changed files with 4 additions and 4 deletions
|
@ -38,7 +38,7 @@ function group_rmv($uid,$name) {
|
||||||
);
|
);
|
||||||
|
|
||||||
// remove group
|
// remove group
|
||||||
$r = q("UPDATE GROUP SET `deleted` = 1 WHERE `uid` = %d AND `id` = %d LIMIT 1",
|
$r = q("UPDATE `group` SET `deleted` = 1 WHERE `uid` = %d AND `name` = '%s' LIMIT 1",
|
||||||
intval($uid),
|
intval($uid),
|
||||||
dbesc($name)
|
dbesc($name)
|
||||||
);
|
);
|
||||||
|
|
|
@ -95,9 +95,9 @@ function group_content(&$a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(($a->argc == 3) && ($a->argv[1] == 'drop')) {
|
if(($a->argc == 3) && ($a->argv[1] == 'drop')) {
|
||||||
if(intval($argv[2])) {
|
if(intval($a->argv[2])) {
|
||||||
$r = q("SELECT `name` FROM `group` WHERE `id` = %d AND `uid` = %d LIMIT 1",
|
$r = q("SELECT `name` FROM `group` WHERE `id` = %d AND `uid` = %d LIMIT 1",
|
||||||
intval($argv[2]),
|
intval($a->argv[2]),
|
||||||
intval($_SESSION['uid'])
|
intval($_SESSION['uid'])
|
||||||
);
|
);
|
||||||
if(count($r))
|
if(count($r))
|
||||||
|
|
Loading…
Reference in a new issue