1
1
Fork 0

dfrn_request: fix forgotten value variable + added $blocked and $pending also for other queries

This commit is contained in:
rabuzarus 2016-11-29 15:52:12 +01:00
parent 0d223aa6f1
commit 54f3867ebd

View file

@ -151,7 +151,7 @@ function dfrn_request_post(&$a) {
$r = q("INSERT INTO `contact` ( `uid`, `created`,`url`, `nurl`, `addr`, `name`, `nick`, `photo`, `site-pubkey`,
`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, %d, %d)",
intval(local_user()),
datetime_convert(),
dbesc($dfrn_url),
@ -256,6 +256,8 @@ function dfrn_request_post(&$a) {
$contact_record = null;
$failed = false;
$parms = null;
$blocked = 1;
$pending = 1;
if( x($_POST,'dfrn_url')) {
@ -354,8 +356,6 @@ function dfrn_request_post(&$a) {
$nurl = normalise_url($host);
$poll = 'email ' . random_string();
$notify = 'smtp ' . random_string();
$blocked = 1;
$pending = 1;
$network = NETWORK_MAIL2;
$rel = CONTACT_IS_FOLLOWER;
@ -540,8 +540,8 @@ function dfrn_request_post(&$a) {
dbesc_array($parms);
$r = q("INSERT INTO `contact` ( `uid`, `created`, `url`, `nurl`, `addr`, `name`, `nick`, `issued-id`, `photo`, `site-pubkey`,
`request`, `confirm`, `notify`, `poll`, `poco`, `network` )
VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' )",
`request`, `confirm`, `notify`, `poll`, `poco`, `network`, `blocked`, `pending` )
VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d )",
intval($uid),
dbesc(datetime_convert()),
$parms['url'],
@ -557,7 +557,9 @@ function dfrn_request_post(&$a) {
$parms['dfrn-notify'],
$parms['dfrn-poll'],
$parms['dfrn-poco'],
dbesc(NETWORK_DFRN)
dbesc(NETWORK_DFRN),
intval($blocked),
intval($pending)
);
// find the contact record we just created