aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-06-23 01:57:14 -0700
committerFriendika <info@friendika.com>2011-06-23 01:57:14 -0700
commit96857389ac6a9ab11f0543da5b0af3895dfccfaf (patch)
tree12771d50402245181c43df95e3f9c5cdedaa7c2f
parentaa4636d03a03718c5c5e58c17af40ee0104be2b6 (diff)
downloadvolse-hubzilla-96857389ac6a9ab11f0543da5b0af3895dfccfaf.tar.gz
volse-hubzilla-96857389ac6a9ab11f0543da5b0af3895dfccfaf.tar.bz2
volse-hubzilla-96857389ac6a9ab11f0543da5b0af3895dfccfaf.zip
friendika-z initial implementation
-rw-r--r--addon/facebook/facebook.php4
-rw-r--r--addon/statusnet/statusnet.php10
-rw-r--r--addon/twitter/twitter.php5
-rw-r--r--include/acl_selectors.php2
-rw-r--r--include/notifier.php9
-rw-r--r--mod/item.php1
6 files changed, 25 insertions, 6 deletions
diff --git a/addon/facebook/facebook.php b/addon/facebook/facebook.php
index 15dffa594..4265ce801 100644
--- a/addon/facebook/facebook.php
+++ b/addon/facebook/facebook.php
@@ -431,6 +431,10 @@ function facebook_post_hook(&$a,&$b) {
if((local_user()) && (local_user() == $b['uid'])) {
+ // Facebook is not considered a private network
+ if($b['prvnets'])
+ return;
+
if($b['parent']) {
$r = q("SELECT * FROM `item` WHERE `id` = %d AND `uid` = %d LIMIT 1",
intval($b['parent']),
diff --git a/addon/statusnet/statusnet.php b/addon/statusnet/statusnet.php
index 85024631c..22f7dc8f9 100644
--- a/addon/statusnet/statusnet.php
+++ b/addon/statusnet/statusnet.php
@@ -303,10 +303,14 @@ function statusnet_post_hook(&$a,&$b) {
if((local_user()) && (local_user() == $b['uid']) && (! $b['private']) && (!$b['parent']) ) {
- load_pconfig(local_user(), 'statusnet');
+ // Status.Net is not considered a private network
+ if($b['prvnets'])
+ return;
+
+ load_pconfig(local_user(), 'statusnet');
- $api = get_pconfig(local_user(), 'statusnet', 'baseapi');
- $ckey = get_pconfig(local_user(), 'statusnet', 'consumerkey' );
+ $api = get_pconfig(local_user(), 'statusnet', 'baseapi');
+ $ckey = get_pconfig(local_user(), 'statusnet', 'consumerkey' );
$csecret = get_pconfig(local_user(), 'statusnet', 'consumersecret' );
$otoken = get_pconfig(local_user(), 'statusnet', 'oauthtoken' );
$osecret = get_pconfig(local_user(), 'statusnet', 'oauthsecret' );
diff --git a/addon/twitter/twitter.php b/addon/twitter/twitter.php
index aeb9cc937..7829799bc 100644
--- a/addon/twitter/twitter.php
+++ b/addon/twitter/twitter.php
@@ -195,6 +195,11 @@ function twitter_post_hook(&$a,&$b) {
if((local_user()) && (local_user() == $b['uid']) && (! $b['private']) && (! $b['parent']) ) {
+ // Twitter is not considered a private network
+ if($b['prvnets'])
+ return;
+
+
load_pconfig(local_user(), 'twitter');
$ckey = get_config('twitter', 'consumerkey' );
diff --git a/include/acl_selectors.php b/include/acl_selectors.php
index 90fdf9c1c..921a8275b 100644
--- a/include/acl_selectors.php
+++ b/include/acl_selectors.php
@@ -64,6 +64,8 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p
$sql_extra .= " AND `network` IN ( 'dfrn', 'mail', 'face' ) ";
}
+
+
if($privmail)
$o .= "<select name=\"$selname\" id=\"$selclass\" class=\"$selclass\" size=\"$size\" >\r\n";
else
diff --git a/include/notifier.php b/include/notifier.php
index 5de6eafd1..842e11080 100644
--- a/include/notifier.php
+++ b/include/notifier.php
@@ -106,7 +106,8 @@ function notifier_run($argv, $argc){
$top_level = true;
}
- $r = q("SELECT `contact`.*, `user`.`timezone`, `user`.`nickname`, `user`.`sprvkey`, `user`.`spubkey`, `user`.`page-flags`
+ $r = q("SELECT `contact`.*, `user`.`timezone`, `user`.`nickname`, `user`.`sprvkey`, `user`.`spubkey`,
+ `user`.`page-flags`, `user`.`prvnets`
FROM `contact` LEFT JOIN `user` ON `user`.`uid` = `contact`.`uid`
WHERE `contact`.`uid` = %d AND `contact`.`self` = 1 LIMIT 1",
intval($uid)
@@ -329,7 +330,8 @@ function notifier_run($argv, $argc){
}
break;
case 'stat':
-
+ if($owner['prvnets'])
+ break;
if($followup && $contact['notify']) {
logger('notifier: slapdelivery: ' . $contact['name']);
$deliver_status = slapper($owner,$contact['notify'],$slap);
@@ -373,6 +375,7 @@ function notifier_run($argv, $argc){
}
}
break;
+
case 'mail':
// WARNING: does not currently convert to RFC2047 header encodings, etc.
@@ -447,9 +450,9 @@ function notifier_run($argv, $argc){
mail($addr, $subject, $message, $headers);
}
break;
- case 'dspr':
case 'feed':
case 'face':
+ case 'dspr':
default:
break;
}
diff --git a/mod/item.php b/mod/item.php
index 84fe237b3..9d7b954a8 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -445,6 +445,7 @@ function item_post(&$a) {
$datarray['parent'] = $parent;
$datarray['self'] = $self;
+ $datarray['prvnets'] = $user['prvnets'];
if($orig_post)
$datarray['edit'] = true;