diff options
author | Friendika <info@friendika.com> | 2011-04-10 18:38:55 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-04-10 18:38:55 -0700 |
commit | 940d216395406744f23fe4144f2a503688624b45 (patch) | |
tree | e96cb4ea1eee0ad7b6b8412fcbcf86116b40a43b /mod | |
parent | 12bc4a44cf051dda665fc4fa43624c47484b1864 (diff) | |
download | volse-hubzilla-940d216395406744f23fe4144f2a503688624b45.tar.gz volse-hubzilla-940d216395406744f23fe4144f2a503688624b45.tar.bz2 volse-hubzilla-940d216395406744f23fe4144f2a503688624b45.zip |
initial dfrn update to pass perms
Diffstat (limited to 'mod')
-rw-r--r-- | mod/dfrn_notify.php | 6 | ||||
-rw-r--r-- | mod/dfrn_poll.php | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php index cd67df1d7..dd6866b38 100644 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -10,6 +10,12 @@ function dfrn_notify_post(&$a) { $data = ((x($_POST,'data')) ? $_POST['data'] : ''); $key = ((x($_POST,'key')) ? $_POST['key'] : ''); $dissolve = ((x($_POST,'dissolve')) ? intval($_POST['dissolve']) : 0); + $perm = ((x($_POST,'perm')) ? notags(trim($_POST['perm'])) : 'r'); + + $writable = (-1); + if($dfrn_version >= 2.21) { + $writable = (($perm === 'rw') ? 1 : 0); + } $direction = (-1); if(strpos($dfrn_id,':') == 1) { diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php index 2ccfadd03..a2fdb9ee1 100644 --- a/mod/dfrn_poll.php +++ b/mod/dfrn_poll.php @@ -16,6 +16,7 @@ function dfrn_poll_init(&$a) { $challenge = ((x($_GET,'challenge')) ? $_GET['challenge'] : ''); $sec = ((x($_GET,'sec')) ? $_GET['sec'] : ''); $dfrn_version = ((x($_GET,'dfrn_version')) ? (float) $_GET['dfrn_version'] : 2.0); + $perm = ((x($_GET,'perm')) ? $_GET['perm'] : 'r'); $direction = (-1); @@ -183,8 +184,9 @@ function dfrn_poll_post(&$a) { $challenge = ((x($_POST,'challenge')) ? $_POST['challenge'] : ''); $url = ((x($_POST,'url')) ? $_POST['url'] : ''); $sec = ((x($_POST,'sec')) ? $_POST['sec'] : ''); - $ptype = ((x($_POST,'type')) ? $_POST['type'] : ''); + $ptype = ((x($_POST,'type')) ? $_POST['type'] : ''); $dfrn_version = ((x($_POST,'dfrn_version')) ? (float) $_POST['dfrn_version'] : 2.0); + $perm = ((x($_POST,'perm')) ? $_POST['perm'] : 'r'); if($ptype === 'profile-check') { @@ -344,6 +346,7 @@ function dfrn_poll_content(&$a) { $destination_url = ((x($_GET,'destination_url')) ? $_GET['destination_url'] : ''); $sec = ((x($_GET,'sec')) ? $_GET['sec'] : ''); $dfrn_version = ((x($_GET,'dfrn_version')) ? (float) $_GET['dfrn_version'] : 2.0); + $perm = ((x($_GET,'perm')) ? $_GET['perm'] : 'r'); $direction = (-1); if(strpos($dfrn_id,':') == 1) { |