X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=inline;f=mod%2Fprofperm.php;h=077f695bea14c15be10f592258847bcd6e3d1198;hb=e5c2c66487eceea38d7fbe792238991084718bd8;hp=8d09c429cc3b006976543d7cb17236559815632f;hpb=4bee1859be5fbf46ecc19728a908e31b4e9b09b6;p=friendica.git diff --git a/mod/profperm.php b/mod/profperm.php index 8d09c429cc..077f695bea 100644 --- a/mod/profperm.php +++ b/mod/profperm.php @@ -6,7 +6,7 @@ function profperm_init(&$a) { return; $which = $a->user['nickname']; - $profile = $a->argv[1]; + $profile = $a->argv[1]; profile_load($a,$which,$profile); @@ -36,8 +36,9 @@ function profperm_content(&$a) { if(($a->argc > 2) && intval($a->argv[1]) && intval($a->argv[2])) { - $r = q("SELECT `id` FROM `contact` WHERE `blocked` = 0 AND `pending` = 0 AND `self` = 0 - AND `network` = 'dfrn' AND `id` = %d AND `uid` = %d LIMIT 1", + $r = q("SELECT `id` FROM `contact` WHERE `blocked` = 0 AND `pending` = 0 AND `self` = 0 + AND `network` = '%s' AND `id` = %d AND `uid` = %d LIMIT 1", + dbesc(NETWORK_DFRN), intval($a->argv[2]), intval(local_user()) ); @@ -71,13 +72,13 @@ function profperm_content(&$a) { if($change) { if(in_array($change,$ingroup)) { - q("UPDATE `contact` SET `profile-id` = 0 WHERE `id` = %d AND `uid` = %d LIMIT 1", + q("UPDATE `contact` SET `profile-id` = 0 WHERE `id` = %d AND `uid` = %d", intval($change), intval(local_user()) ); } else { - q("UPDATE `contact` SET `profile-id` = %d WHERE `id` = %d AND `uid` = %d LIMIT 1", + q("UPDATE `contact` SET `profile-id` = %d WHERE `id` = %d AND `uid` = %d", intval($a->argv[1]), intval($change), intval(local_user()) @@ -130,10 +131,11 @@ function profperm_content(&$a) { $o .= '