Fix formatting

This commit is contained in:
Hypolite Petovan 2018-01-09 22:27:40 -05:00
parent ca6e477701
commit 3e141d268e
7 changed files with 36 additions and 18 deletions

View file

@ -239,14 +239,17 @@ function buffer_post_local(&$a,&$b) {
function buffer_send(App $a, &$b) function buffer_send(App $a, &$b)
{ {
if($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) if($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) {
return; return;
}
if(! strstr($b['postopts'],'buffer')) if(! strstr($b['postopts'],'buffer')) {
return; return;
}
if($b['parent'] != $b['id']) if($b['parent'] != $b['id']) {
return; return;
}
// Dont't post if the post doesn't belong to us. // Dont't post if the post doesn't belong to us.
// This is a check for forum postings // This is a check for forum postings

View file

@ -275,14 +275,17 @@ function diaspora_send(&$a,&$b) {
logger('diaspora_send: invoked'); logger('diaspora_send: invoked');
if($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) if($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) {
return; return;
}
if(! strstr($b['postopts'],'diaspora')) if(! strstr($b['postopts'],'diaspora')) {
return; return;
}
if($b['parent'] != $b['id']) if($b['parent'] != $b['id']) {
return; return;
}
// Dont't post if the post doesn't belong to us. // Dont't post if the post doesn't belong to us.
// This is a check for forum postings // This is a check for forum postings

View file

@ -155,14 +155,17 @@ function libertree_send(&$a,&$b) {
logger('libertree_send: invoked'); logger('libertree_send: invoked');
if ($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) if ($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) {
return; return;
}
if (! strstr($b['postopts'],'libertree')) if (! strstr($b['postopts'],'libertree')) {
return; return;
}
if ($b['parent'] != $b['id']) if ($b['parent'] != $b['id']) {
return; return;
}
// Dont't post if the post doesn't belong to us. // Dont't post if the post doesn't belong to us.
// This is a check for forum postings // This is a check for forum postings

View file

@ -413,8 +413,9 @@ function pumpio_send(&$a,&$b) {
logger("pumpio_send: receiver ".print_r($receiver, true)); logger("pumpio_send: receiver ".print_r($receiver, true));
if (!count($receiver) && ($b['private'] || !strstr($b['postopts'],'pumpio'))) if (!count($receiver) && ($b['private'] || !strstr($b['postopts'],'pumpio'))) {
return; return;
}
// Dont't post if the post doesn't belong to us. // Dont't post if the post doesn't belong to us.
// This is a check for forum postings // This is a check for forum postings

View file

@ -568,15 +568,17 @@ function statusnet_post_hook(App $a, &$b)
$nicknameplain = "@" . $nick; $nicknameplain = "@" . $nick;
logger("statusnet_post_hook: comparing " . $nickname . " and " . $nicknameplain . " with " . $b["body"], LOGGER_DEBUG); logger("statusnet_post_hook: comparing " . $nickname . " and " . $nicknameplain . " with " . $b["body"], LOGGER_DEBUG);
if ((strpos($b["body"], $nickname) === false) && (strpos($b["body"], $nicknameplain) === false)) if ((strpos($b["body"], $nickname) === false) && (strpos($b["body"], $nicknameplain) === false)) {
$b["body"] = $nickname . " " . $b["body"]; $b["body"] = $nickname . " " . $b["body"];
}
logger("statusnet_post_hook: parent found " . print_r($orig_post, true), LOGGER_DEBUG); logger("statusnet_post_hook: parent found " . print_r($orig_post, true), LOGGER_DEBUG);
} else { } else {
$iscomment = false; $iscomment = false;
if ($b['private'] || !strstr($b['postopts'], 'statusnet')) if ($b['private'] || !strstr($b['postopts'], 'statusnet')) {
return; return;
}
// Dont't post if the post doesn't belong to us. // Dont't post if the post doesn't belong to us.
// This is a check for forum postings // This is a check for forum postings

View file

@ -316,14 +316,17 @@ function tumblr_post_local(&$a, &$b) {
function tumblr_send(&$a,&$b) { function tumblr_send(&$a,&$b) {
if($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) if($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) {
return; return;
}
if(! strstr($b['postopts'],'tumblr')) if(! strstr($b['postopts'],'tumblr')) {
return; return;
}
if($b['parent'] != $b['id']) if($b['parent'] != $b['id']) {
return; return;
}
// Dont't post if the post doesn't belong to us. // Dont't post if the post doesn't belong to us.
// This is a check for forum postings // This is a check for forum postings

View file

@ -191,14 +191,17 @@ function wppost_post_local(&$a, &$b) {
function wppost_send(&$a,&$b) { function wppost_send(&$a,&$b) {
if($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) if($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) {
return; return;
}
if(! strstr($b['postopts'],'wppost')) if(! strstr($b['postopts'],'wppost')) {
return; return;
}
if($b['parent'] != $b['id']) if($b['parent'] != $b['id']) {
return; return;
}
// Dont't post if the post doesn't belong to us. // Dont't post if the post doesn't belong to us.
// This is a check for forum postings // This is a check for forum postings