diff options
author | Simon L'nu <simon.lnu@gmail.com> | 2012-05-31 23:22:19 -0400 |
---|---|---|
committer | Simon L'nu <simon.lnu@gmail.com> | 2012-05-31 23:22:19 -0400 |
commit | b1dacd6d838ecf75fe828279e57c2e7a866be22f (patch) | |
tree | 46b41c1f463ab90588f109105c95e85dad8fd432 /mod/dfrn_request.php | |
parent | 04119d31e51c749cfa81b9a8ac5f52005d71f8c4 (diff) | |
parent | 93bc29a711637c84a4ffc380078277de89af4e6d (diff) | |
download | volse-hubzilla-b1dacd6d838ecf75fe828279e57c2e7a866be22f.tar.gz volse-hubzilla-b1dacd6d838ecf75fe828279e57c2e7a866be22f.tar.bz2 volse-hubzilla-b1dacd6d838ecf75fe828279e57c2e7a866be22f.zip |
Merge branch 'master', remote-tracking branch 'remotes/upstream/master'
* remotes/upstream/master:
turn registration code into a standalone function for re-use
query using both `id` and `parent`
prevent email from leaking in feeds
y didn't i think of this b4?
some zero theming on settings page
missing delimiter
transition to beta for private forums
rev update
Friendicaland - you can't 'live' on a demo server.
Create a "potential default group" called "Friends" on registration.
fix private photos that also have a size specification
private group tests, cont.
hide private group if desired
prvgroup should see intros
private group fix
possible sql injection in search
bugfixes: private photo embeds and search for strings with %
* master:
Diffstat (limited to 'mod/dfrn_request.php')
-rw-r--r-- | mod/dfrn_request.php | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php index b809929d7..896fe1792 100644 --- a/mod/dfrn_request.php +++ b/mod/dfrn_request.php @@ -68,7 +68,7 @@ function dfrn_request_post(&$a) { $dfrn_url = notags(trim($_POST['dfrn_url'])); $aes_allow = (((x($_POST,'aes_allow')) && ($_POST['aes_allow'] == 1)) ? 1 : 0); $confirm_key = ((x($_POST,'confirm_key')) ? $_POST['confirm_key'] : ""); - + $hidden = ((x($_POST,'hidden-contact')) ? intval($_POST['hidden-contact']) : 0); $contact_record = null; if(x($dfrn_url)) { @@ -98,8 +98,9 @@ function dfrn_request_post(&$a) { } if(is_array($contact_record)) { - $r = q("UPDATE `contact` SET `ret-aes` = %d WHERE `id` = %d LIMIT 1", + $r = q("UPDATE `contact` SET `ret-aes` = %d, hidden = %d WHERE `id` = %d LIMIT 1", intval($aes_allow), + intval($hidden), intval($contact_record['id']) ); } @@ -144,8 +145,8 @@ function dfrn_request_post(&$a) { */ $r = q("INSERT INTO `contact` ( `uid`, `created`,`url`, `nurl`, `name`, `nick`, `photo`, `site-pubkey`, - `request`, `confirm`, `notify`, `poll`, `poco`, `network`, `aes_allow`) - VALUES ( %d, '%s', '%s', '%s', '%s' , '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d)", + `request`, `confirm`, `notify`, `poll`, `poco`, `network`, `aes_allow`, `hidden`) + VALUES ( %d, '%s', '%s', '%s', '%s' , '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d)", intval(local_user()), datetime_convert(), dbesc($dfrn_url), @@ -160,7 +161,8 @@ function dfrn_request_post(&$a) { $parms['dfrn-poll'], $parms['dfrn-poco'], dbesc(NETWORK_DFRN), - intval($aes_allow) + intval($aes_allow), + intval($hidden) ); } @@ -649,6 +651,8 @@ function dfrn_request_content(&$a) { $o = replace_macros($tpl,array( '$dfrn_url' => $dfrn_url, '$aes_allow' => (($aes_allow) ? '<input type="hidden" name="aes_allow" value="1" />' : "" ), + '$hidethem' => t('Hide this contact'), + '$hidechecked' => '', '$confirm_key' => $confirm_key, '$welcome' => sprintf( t('Welcome home %s.'), $a->user['username']), '$please' => sprintf( t('Please confirm your introduction/connection request to %s.'), $dfrn_url), @@ -680,7 +684,7 @@ function dfrn_request_content(&$a) { $auto_confirm = false; if(count($r)) { - if($r[0]['page-flags'] != PAGE_NORMAL) + if(($r[0]['page-flags'] != PAGE_NORMAL) && ($r[0]['page-flags'] != PAGE_PRVGROUP)) $auto_confirm = true; if(! $auto_confirm) { |