Merge pull request #2980 from rabuzarus/20161129_-_small_dfrn_request_polish

dfrn_request: added $blocked and $pending as variable to make code mo…
This commit is contained in:
Michael Vogel 2016-11-29 09:42:26 +01:00 committed by GitHub
commit 86665d47a6

View file

@ -75,6 +75,8 @@ function dfrn_request_post(&$a) {
$confirm_key = ((x($_POST,'confirm_key')) ? $_POST['confirm_key'] : ""); $confirm_key = ((x($_POST,'confirm_key')) ? $_POST['confirm_key'] : "");
$hidden = ((x($_POST,'hidden-contact')) ? intval($_POST['hidden-contact']) : 0); $hidden = ((x($_POST,'hidden-contact')) ? intval($_POST['hidden-contact']) : 0);
$contact_record = null; $contact_record = null;
$blocked = 1;
$pending = 1;
if(x($dfrn_url)) { if(x($dfrn_url)) {
@ -148,7 +150,7 @@ function dfrn_request_post(&$a) {
*/ */
$r = q("INSERT INTO `contact` ( `uid`, `created`,`url`, `nurl`, `addr`, `name`, `nick`, `photo`, `site-pubkey`, $r = q("INSERT INTO `contact` ( `uid`, `created`,`url`, `nurl`, `addr`, `name`, `nick`, `photo`, `site-pubkey`,
`request`, `confirm`, `notify`, `poll`, `poco`, `network`, `aes_allow`, `hidden`) `request`, `confirm`, `notify`, `poll`, `poco`, `network`, `aes_allow`, `hidden`, `blocked`, `pending`)
VALUES ( %d, '%s', '%s', '%s', '%s', '%s' , '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d)", VALUES ( %d, '%s', '%s', '%s', '%s', '%s' , '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d)",
intval(local_user()), intval(local_user()),
datetime_convert(), datetime_convert(),
@ -166,7 +168,9 @@ function dfrn_request_post(&$a) {
$parms['dfrn-poco'], $parms['dfrn-poco'],
dbesc(NETWORK_DFRN), dbesc(NETWORK_DFRN),
intval($aes_allow), intval($aes_allow),
intval($hidden) intval($hidden),
intval($blocked),
intval($pending)
); );
} }