diff options
-rw-r--r-- | include/group.php | 2 | ||||
-rw-r--r-- | mod/group.php | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/group.php b/include/group.php index dfec4afa0..799065e27 100644 --- a/include/group.php +++ b/include/group.php @@ -38,7 +38,7 @@ function group_rmv($uid,$name) { ); // 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), dbesc($name) ); diff --git a/mod/group.php b/mod/group.php index a3bd750f9..fbd38bfeb 100644 --- a/mod/group.php +++ b/mod/group.php @@ -93,11 +93,11 @@ function group_content(&$a) { )); } - + 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", - intval($argv[2]), + intval($a->argv[2]), intval($_SESSION['uid']) ); if(count($r)) |