aboutsummaryrefslogtreecommitdiffstats
path: root/mod/invite.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/invite.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/invite.php')
-rw-r--r--mod/invite.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/mod/invite.php b/mod/invite.php
index 12080c4d9..e197278d1 100644
--- a/mod/invite.php
+++ b/mod/invite.php
@@ -9,7 +9,7 @@
function invite_post(&$a) {
- if(! local_user()) {
+ if(! local_channel()) {
notice( t('Permission denied.') . EOL);
return;
}
@@ -20,7 +20,7 @@ function invite_post(&$a) {
if(! $max_invites)
$max_invites = 50;
- $current_invites = intval(get_pconfig(local_user(),'system','sent_invites'));
+ $current_invites = intval(get_pconfig(local_channel(),'system','sent_invites'));
if($current_invites > $max_invites) {
notice( t('Total invitation limit exceeded.') . EOL);
return;
@@ -34,7 +34,7 @@ function invite_post(&$a) {
if(get_config('system','invitation_only')) {
$invonly = true;
- $x = get_pconfig(local_user(),'system','invites_remaining');
+ $x = get_pconfig(local_channel(),'system','invites_remaining');
if((! $x) && (! is_site_admin()))
return;
}
@@ -62,7 +62,7 @@ function invite_post(&$a) {
if(! is_site_admin()) {
$x --;
if($x >= 0)
- set_pconfig(local_user(),'system','invites_remaining',$x);
+ set_pconfig(local_channel(),'system','invites_remaining',$x);
else
return;
}
@@ -82,7 +82,7 @@ function invite_post(&$a) {
if($res) {
$total ++;
$current_invites ++;
- set_pconfig(local_user(),'system','sent_invites',$current_invites);
+ set_pconfig(local_channel(),'system','sent_invites',$current_invites);
if($current_invites > $max_invites) {
notice( t('Invitation limit exceeded. Please contact your site administrator.') . EOL);
return;
@@ -100,7 +100,7 @@ function invite_post(&$a) {
function invite_content(&$a) {
- if(! local_user()) {
+ if(! local_channel()) {
notice( t('Permission denied.') . EOL);
return;
}
@@ -110,7 +110,7 @@ function invite_content(&$a) {
if(get_config('system','invitation_only')) {
$invonly = true;
- $x = get_pconfig(local_user(),'system','invites_remaining');
+ $x = get_pconfig(local_channel(),'system','invites_remaining');
if((! $x) && (! is_site_admin())) {
notice( t('You have no more invitations available') . EOL);
return '';