aboutsummaryrefslogtreecommitdiffstats
path: root/mod/group.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-10-18 14:34:59 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-10-18 14:34:59 -0700
commitac824fe83e67950f9303d13d574ff00b57dd5727 (patch)
tree025eb4346b278d5eb6493bd8b935cf6e842f3db1 /mod/group.php
parent103814ab8e6940a8e0e24b618d2e02e0779bc39b (diff)
downloadvolse-hubzilla-ac824fe83e67950f9303d13d574ff00b57dd5727.tar.gz
volse-hubzilla-ac824fe83e67950f9303d13d574ff00b57dd5727.tar.bz2
volse-hubzilla-ac824fe83e67950f9303d13d574ff00b57dd5727.zip
eradicate redundant get_uid function
Diffstat (limited to 'mod/group.php')
-rw-r--r--mod/group.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/mod/group.php b/mod/group.php
index 56c3e21d1..e5c6b92ae 100644
--- a/mod/group.php
+++ b/mod/group.php
@@ -22,10 +22,10 @@ function group_post(&$a) {
if(($a->argc == 2) && ($a->argv[1] === 'new')) {
$name = notags(trim($_POST['groupname']));
- $r = group_add(get_uid(),$name);
+ $r = group_add(local_user(),$name);
if($r) {
notice( t('Group created.') . EOL );
- $r = group_byname(get_uid(),$name);
+ $r = group_byname(local_user(),$name);
if($r)
goaway($a->get_baseurl() . '/group/' . $r);
}
@@ -37,7 +37,7 @@ function group_post(&$a) {
if(($a->argc == 2) && (intval($a->argv[1]))) {
$r = q("SELECT * FROM `group` WHERE `id` = %d AND `uid` = %d LIMIT 1",
intval($a->argv[1]),
- intval(get_uid())
+ intval(local_user())
);
if(! count($r)) {
notice( t('Group not found.') . EOL );
@@ -49,7 +49,7 @@ function group_post(&$a) {
if((strlen($groupname)) && ($groupname != $group['name'])) {
$r = q("UPDATE `group` SET `name` = '%s' WHERE `uid` = %d AND `id` = %d LIMIT 1",
dbesc($groupname),
- intval(get_uid()),
+ intval(local_user()),
intval($group['id'])
);
if($r)
@@ -59,14 +59,14 @@ function group_post(&$a) {
array_walk($members,'validate_members');
$r = q("DELETE FROM `group_member` WHERE `gid` = %d AND `uid` = %d",
intval($a->argv[1]),
- intval(get_uid())
+ intval(local_user())
);
$result = true;
if(count($members)) {
foreach($members as $member) {
$r = q("INSERT INTO `group_member` ( `uid`, `gid`, `contact-id`)
VALUES ( %d, %d, %d )",
- intval(get_uid()),
+ intval(local_user()),
intval($group['id']),
intval($member)
);
@@ -98,10 +98,10 @@ function group_content(&$a) {
if(intval($a->argv[2])) {
$r = q("SELECT `name` FROM `group` WHERE `id` = %d AND `uid` = %d LIMIT 1",
intval($a->argv[2]),
- intval(get_uid())
+ intval(local_user())
);
if(count($r))
- $result = group_rmv(get_uid(),$r[0]['name']);
+ $result = group_rmv(local_user(),$r[0]['name']);
if($result)
notice( t('Group removed.') . EOL);
else
@@ -116,7 +116,7 @@ function group_content(&$a) {
require_once('view/acl_selectors.php');
$r = q("SELECT * FROM `group` WHERE `id` = %d AND `uid` = %d LIMIT 1",
intval($a->argv[1]),
- intval(get_uid())
+ intval(local_user())
);
if(! count($r)) {
notice( t('Group not found.') . EOL );