track whether contact is a community page or not
This commit is contained in:
@@ -207,6 +207,9 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
|
||||
if($duplex == 1)
|
||||
$params['duplex'] = 1;
|
||||
|
||||
if($user['page-flags'] == PAGE_COMMUNITY)
|
||||
$params['page'] = 1;
|
||||
|
||||
logger('dfrn_confirm: Confirm: posting data to ' . $dfrn_confirm . ': ' . print_r($params,true), LOGGER_DATA);
|
||||
|
||||
/**
|
||||
@@ -522,6 +525,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
|
||||
$source_url = ((x($_POST,'source_url')) ? hex2bin($_POST['source_url']) : '');
|
||||
$aes_key = ((x($_POST,'aes_key')) ? $_POST['aes_key'] : '');
|
||||
$duplex = ((x($_POST,'duplex')) ? intval($_POST['duplex']) : 0 );
|
||||
$page = ((x($_POST,'page')) ? intval($_POST['page']) : 0 );
|
||||
$version_id = ((x($_POST,'dfrn_version')) ? (float) $_POST['dfrn_version'] : 2.0);
|
||||
|
||||
logger('dfrn_confirm: requestee contacted: ' . $node);
|
||||
@@ -677,6 +681,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
|
||||
`blocked` = 0,
|
||||
`pending` = 0,
|
||||
`duplex` = %d,
|
||||
`forum` = %d,
|
||||
`network` = '%s' WHERE `id` = %d LIMIT 1
|
||||
",
|
||||
dbesc($photos[0]),
|
||||
@@ -687,6 +692,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
|
||||
dbesc(datetime_convert()),
|
||||
dbesc(datetime_convert()),
|
||||
intval($duplex),
|
||||
intval($page),
|
||||
dbesc(NETWORK_DFRN),
|
||||
intval($dfrn_record)
|
||||
);
|
||||
|
||||
@@ -15,6 +15,7 @@ function dfrn_notify_post(&$a) {
|
||||
$dissolve = ((x($_POST,'dissolve')) ? intval($_POST['dissolve']) : 0);
|
||||
$perm = ((x($_POST,'perm')) ? notags(trim($_POST['perm'])) : 'r');
|
||||
$ssl_policy = ((x($_POST,'ssl_policy')) ? notags(trim($_POST['ssl_policy'])): 'none');
|
||||
$page = ((x($_POST,'page')) ? intval($_POST['page']) : 0);
|
||||
|
||||
$writable = (-1);
|
||||
if($dfrn_version >= 2.21) {
|
||||
@@ -87,12 +88,15 @@ function dfrn_notify_post(&$a) {
|
||||
|
||||
$importer = $r[0];
|
||||
|
||||
if(($writable != (-1)) && ($writable != $importer['writable'])) {
|
||||
q("UPDATE `contact` SET `writable` = %d WHERE `id` = %d LIMIT 1",
|
||||
intval($writable),
|
||||
if((($writable != (-1)) && ($writable != $importer['writable'])) || ($importer['forum'] != $page)) {
|
||||
q("UPDATE `contact` SET `writable` = %d, forum = %d WHERE `id` = %d LIMIT 1",
|
||||
intval(($writable == (-1)) ? $importer['writable'] : $writable),
|
||||
intval($page),
|
||||
intval($importer['id'])
|
||||
);
|
||||
$importer['writable'] = $writable;
|
||||
if($writable != (-1))
|
||||
$importer['writable'] = $writable;
|
||||
$importer['forum'] = $page;
|
||||
}
|
||||
|
||||
// if contact's ssl policy changed, update our links
|
||||
|
||||
Reference in New Issue
Block a user