aboutsummaryrefslogtreecommitdiffstats
path: root/mod/delegate.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-01-29 00:28:23 -0800
committerfriendica <info@friendica.com>2015-01-29 00:28:23 -0800
commitfd0b6c967fce4d8a82e9dad121ae7d8301d3f342 (patch)
tree5c37812ef7baeadc17fce088c4394d25f75b593c /mod/delegate.php
parentc993ddd86ee25832e35e65333fa25b396e7aefdf (diff)
parent872b165eb2bb5d632a12f2d7e1a28e195c2d5348 (diff)
downloadvolse-hubzilla-fd0b6c967fce4d8a82e9dad121ae7d8301d3f342.tar.gz
volse-hubzilla-fd0b6c967fce4d8a82e9dad121ae7d8301d3f342.tar.bz2
volse-hubzilla-fd0b6c967fce4d8a82e9dad121ae7d8301d3f342.zip
Merge branch 'master' into pocorate
Diffstat (limited to 'mod/delegate.php')
-rw-r--r--mod/delegate.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/mod/delegate.php b/mod/delegate.php
index c78898b7f..cc399b6e5 100644
--- a/mod/delegate.php
+++ b/mod/delegate.php
@@ -2,7 +2,7 @@
function delegate_content(&$a) {
- if(! local_user()) {
+ if(! local_channel()) {
notice( t('Permission denied.') . EOL);
return;
}
@@ -22,13 +22,13 @@ function delegate_content(&$a) {
);
if(count($r)) {
$r = q("select id from contact where uid = %d and nurl = '%s' limit 1",
- intval(local_user()),
+ intval(local_channel()),
dbesc(normalise_link($a->get_baseurl() . '/channel/' . $r[0]['nickname']))
);
if(count($r)) {
q("insert into manage ( uid, mid ) values ( %d , %d ) ",
intval($a->argv[2]),
- intval(local_user())
+ intval(local_channel())
);
}
}
@@ -44,7 +44,7 @@ function delegate_content(&$a) {
q("delete from manage where uid = %d and mid = %d",
intval($a->argv[2]),
- intval(local_user())
+ intval(local_channel())
);
goaway($a->get_baseurl() . '/delegate');
@@ -66,7 +66,7 @@ function delegate_content(&$a) {
// find everybody that currently has delegated management to this account/page
$r = q("select * from user where uid in ( select uid from manage where mid = %d ) ",
- intval(local_user())
+ intval(local_channel())
);
if(count($r))
@@ -87,7 +87,7 @@ function delegate_content(&$a) {
$r = q("select nurl from contact where substring_index(contact.nurl,'/',3) = '%s'
and contact.uid = %d and contact.self = 0 and network = '%s' ",
dbesc(normalise_link($a->get_baseurl())),
- intval(local_user()),
+ intval(local_channel()),
dbesc(NETWORK_DFRN)
);