aboutsummaryrefslogtreecommitdiffstats
path: root/mod/profperm.php
diff options
context:
space:
mode:
authorsirius <sirius83@gmx.de>2014-04-16 00:40:01 +0200
committersirius <sirius83@gmx.de>2014-04-16 00:40:01 +0200
commitb0dc9f13edcbb705e1aa7d0af33bf0351f4d81f4 (patch)
tree32b053e3f2c95740e316e898d6a2e15688aa4d02 /mod/profperm.php
parent8b8feea12f886a22f7eb66456be7828b7aef455e (diff)
parentefe80bb8e98b32b95d1380633e9ffd834fa82511 (diff)
downloadvolse-hubzilla-b0dc9f13edcbb705e1aa7d0af33bf0351f4d81f4.tar.gz
volse-hubzilla-b0dc9f13edcbb705e1aa7d0af33bf0351f4d81f4.tar.bz2
volse-hubzilla-b0dc9f13edcbb705e1aa7d0af33bf0351f4d81f4.zip
Merging in conflict
Diffstat (limited to 'mod/profperm.php')
-rw-r--r--mod/profperm.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/mod/profperm.php b/mod/profperm.php
index 4a52447b8..a91523805 100644
--- a/mod/profperm.php
+++ b/mod/profperm.php
@@ -61,9 +61,9 @@ function profperm_content(&$a) {
$profile = $r[0];
- $r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash WHERE abook_channel = %d AND abook_profile = %d",
+ $r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash WHERE abook_channel = %d AND abook_profile = '%s'",
intval(local_user()),
- intval(argv(1))
+ dbesc($profile['profile_guid'])
);
$ingroup = array();
@@ -75,27 +75,29 @@ function profperm_content(&$a) {
if($change) {
if(in_array($change,$ingroup)) {
- q("UPDATE abook SET abook_profile = 0 WHERE abook_id = %d AND abook_channel = %d LIMIT 1",
+ q("UPDATE abook SET abook_profile = '' WHERE abook_id = %d AND abook_channel = %d LIMIT 1",
intval($change),
intval(local_user())
);
}
else {
- q("UPDATE abook SET abook_profile = %d WHERE abook_id = %d AND abook_channel = %d LIMIT 1",
- intval(argv(1)),
+ q("UPDATE abook SET abook_profile = '%s' WHERE abook_id = %d AND abook_channel = %d LIMIT 1",
+ dbesc($profile['profile_guid']),
intval($change),
intval(local_user())
);
}
+
//Time to update the permissions on the profile-pictures as well
require_once('mod/profile_photo.php');
profile_photo_set_profile_perms($profile['id']);
- $r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash WHERE abook_channel = %d AND abook_profile = %d",
+ $r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash WHERE abook_channel = %d AND abook_profile = '%s'",
+
intval(local_user()),
- intval(argv(1))
+ dbesc($profile['profile_guid'])
);
$members = $r;