aboutsummaryrefslogtreecommitdiffstats
path: root/mod/dfrn_notify.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-03-15 16:38:26 -0700
committerfriendica <info@friendica.com>2012-03-15 16:38:26 -0700
commit7684f63ecdfce560f24475630144f6058df15ca9 (patch)
tree98c24daa58b9ed3df087e14e23e2f49e24acea55 /mod/dfrn_notify.php
parentf96aff5518d2d5fb726d381892893a68d8c36450 (diff)
downloadvolse-hubzilla-7684f63ecdfce560f24475630144f6058df15ca9.tar.gz
volse-hubzilla-7684f63ecdfce560f24475630144f6058df15ca9.tar.bz2
volse-hubzilla-7684f63ecdfce560f24475630144f6058df15ca9.zip
track whether contact is a community page or not
Diffstat (limited to 'mod/dfrn_notify.php')
-rwxr-xr-xmod/dfrn_notify.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php
index 3dbdc5b32..71860ac3b 100755
--- a/mod/dfrn_notify.php
+++ b/mod/dfrn_notify.php
@@ -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