X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fdelegate.php;h=4212ec9b132a4b8ff1a4d4e72d746a9074906ecb;hb=325d3afe183a397ea6688480c1b2df8e1be99dc1;hp=40618eb32458dc2427f83943d2ef6746516ae757;hpb=f42d76858655fc62dfbd05c0bcf2f6a49ea0bf30;p=friendica.git diff --git a/mod/delegate.php b/mod/delegate.php index 40618eb324..4212ec9b13 100644 --- a/mod/delegate.php +++ b/mod/delegate.php @@ -1,12 +1,12 @@ argv[2]; $r = q("select `nickname` from user where uid = %d limit 1", @@ -45,12 +44,11 @@ function delegate_content(App &$a) { if ($a->argc > 2 && $a->argv[1] === 'remove' && intval($a->argv[2])) { // delegated admins can view but not change delegation permissions - if (x($_SESSION,'submanage') && intval($_SESSION['submanage'])) { goaway(App::get_baseurl() . '/delegate'); } - q("delete from manage where uid = %d and mid = %d limit 1", + q("DELETE FROM `manage` WHERE `uid` = %d AND `mid` = %d LIMIT 1", intval($a->argv[2]), intval(local_user()) ); @@ -92,12 +90,12 @@ function delegate_content(App &$a) { // find every contact who might be a candidate for delegation - $r = q("select nurl from contact where substring_index(contact.nurl,'/',3) = '%s' + $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(App::get_baseurl())), intval(local_user()), dbesc(NETWORK_DFRN) - ); + ); if (! dbm::is_result($r)) { notice( t('No potential page delegates located.') . EOL);