aboutsummaryrefslogtreecommitdiffstats
path: root/mod/group.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-01-29 15:09:35 -0800
committerfriendica <info@friendica.com>2015-01-29 15:09:35 -0800
commit912be23e1627211fb417c4b7bced414cbbe38ef0 (patch)
tree2b8567d800624167b3eadf37c8855deb0ba74b0b /mod/group.php
parentff68ea608786a698ad46637ef13854ac1b1e6beb (diff)
parent872b165eb2bb5d632a12f2d7e1a28e195c2d5348 (diff)
downloadvolse-hubzilla-912be23e1627211fb417c4b7bced414cbbe38ef0.tar.gz
volse-hubzilla-912be23e1627211fb417c4b7bced414cbbe38ef0.tar.bz2
volse-hubzilla-912be23e1627211fb417c4b7bced414cbbe38ef0.zip
Merge branch 'master' into tres
Conflicts: include/group.php include/text.php mod/acl.php mod/channel.php mod/connections.php mod/display.php mod/group.php mod/item.php mod/locs.php mod/network.php mod/photos.php mod/ping.php mod/starred.php mod/viewsrc.php
Diffstat (limited to 'mod/group.php')
-rw-r--r--mod/group.php30
1 files changed, 15 insertions, 15 deletions
diff --git a/mod/group.php b/mod/group.php
index 36c31e355..f3984f9c8 100644
--- a/mod/group.php
+++ b/mod/group.php
@@ -5,7 +5,7 @@ require_once('include/group.php');
function group_post(&$a) {
- if(! local_user()) {
+ if(! local_channel()) {
notice( t('Permission denied.') . EOL);
return;
}
@@ -15,10 +15,10 @@ function group_post(&$a) {
$name = notags(trim($_POST['groupname']));
$public = intval($_POST['public']);
- $r = group_add(local_user(),$name,$public);
+ $r = group_add(local_channel(),$name,$public);
if($r) {
info( t('Collection created.') . EOL );
- $r = group_byname(local_user(),$name);
+ $r = group_byname(local_channel(),$name);
if($r)
goaway($a->get_baseurl() . '/group/' . $r);
}
@@ -32,7 +32,7 @@ function group_post(&$a) {
$r = q("SELECT * FROM `groups` WHERE `id` = %d AND `uid` = %d LIMIT 1",
intval(argv(1)),
- intval(local_user())
+ intval(local_channel())
);
if(! $r) {
notice( t('Collection not found.') . EOL );
@@ -47,7 +47,7 @@ function group_post(&$a) {
$r = q("UPDATE `groups` SET `name` = '%s', visible = %d WHERE `uid` = %d AND `id` = %d",
dbesc($groupname),
intval($public),
- intval(local_user()),
+ intval(local_channel()),
intval($group['id'])
);
if($r)
@@ -64,14 +64,14 @@ function group_content(&$a) {
logger('mod_group: ' . $a->cmd,LOGGER_DEBUG);
- if(! local_user()) {
+ if(! local_channel()) {
notice( t('Permission denied') . EOL);
return;
}
// Switch to text mode interface if we have more than 'n' contacts or group members
- $switchtotext = get_pconfig(local_user(),'system','groupedit_image_limit');
+ $switchtotext = get_pconfig(local_channel(),'system','groupedit_image_limit');
if($switchtotext === false)
$switchtotext = get_config('system','groupedit_image_limit');
if($switchtotext === false)
@@ -99,10 +99,10 @@ function group_content(&$a) {
if(intval(argv(2))) {
$r = q("SELECT `name` FROM `groups` WHERE `id` = %d AND `uid` = %d LIMIT 1",
intval(argv(2)),
- intval(local_user())
+ intval(local_channel())
);
if($r)
- $result = group_rmv(local_user(),$r[0]['name']);
+ $result = group_rmv(local_channel(),$r[0]['name']);
if($result)
info( t('Collection removed.') . EOL);
else
@@ -119,7 +119,7 @@ function group_content(&$a) {
$r = q("SELECT abook_xchan from abook left join xchan on abook_xchan = xchan_hash where abook_xchan = '%s' and abook_channel = %d and xchan_deleted = 0 and not (abook_flags & %d)>0 and not (abook_flags & %d)>0 limit 1",
dbesc(base64url_decode(argv(2))),
- intval(local_user()),
+ intval(local_channel()),
intval(ABOOK_FLAG_BLOCKED),
intval(ABOOK_FLAG_PENDING)
);
@@ -133,7 +133,7 @@ function group_content(&$a) {
require_once('include/acl_selectors.php');
$r = q("SELECT * FROM `groups` WHERE `id` = %d AND `uid` = %d AND `deleted` = 0 LIMIT 1",
intval(argv(1)),
- intval(local_user())
+ intval(local_channel())
);
if(! $r) {
notice( t('Collection not found.') . EOL );
@@ -154,10 +154,10 @@ function group_content(&$a) {
if($change) {
if(in_array($change,$preselected)) {
- group_rmv_member(local_user(),$group['name'],$change);
+ group_rmv_member(local_channel(),$group['name'],$change);
}
else {
- group_add_member(local_user(),$group['name'],$change);
+ group_add_member(local_channel(),$group['name'],$change);
}
$members = group_get_members($group['id']);
@@ -207,11 +207,11 @@ function group_content(&$a) {
$groupeditor['members'][] = micropro($member,true,'mpgroup', $textmode);
}
else
- group_rmv_member(local_user(),$group['name'],$member['xchan_hash']);
+ group_rmv_member(local_channel(),$group['name'],$member['xchan_hash']);
}
$r = q("SELECT abook.*, xchan.* FROM `abook` left join xchan on abook_xchan = xchan_hash WHERE `abook_channel` = %d AND not (abook_flags & %d)>0 and xchan_deleted = 0 and not (abook_flags & %d)>0 order by xchan_name asc",
- intval(local_user()),
+ intval(local_channel()),
intval(ABOOK_FLAG_BLOCKED),
intval(ABOOK_FLAG_PENDING)
);