Browse Source

"remote self" should work now with the addons

pull/423/head
Michael 4 years ago
parent
commit
642ab7f76f
  1. 2
      appnet/appnet.php
  2. 2
      blogger/blogger.php
  3. 12
      buffer/buffer.php
  4. 25
      diaspora/diaspora.php
  5. 25
      libertree/libertree.php
  6. 16
      pumpio/pumpio.php
  7. 32
      statusnet/statusnet.php
  8. 21
      tumblr/tumblr.php
  9. 28
      twitter/twitter.php
  10. 2
      unicode_smilies/unicode_smilies.php
  11. 27
      wppost/wppost.php

2
appnet/appnet.php

@ -296,7 +296,7 @@ function appnet_post_local(&$a,&$b) {
$appnet_enable = (($appnet_post && x($_REQUEST,'appnet_enable')) ? intval($_REQUEST['appnet_enable']) : 0);
// if API is used, default to the chosen settings
if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'appnet','post_by_default')))
if($b['api_source'] && intval(get_pconfig(local_user(),'appnet','post_by_default')))
$appnet_enable = 1;
if(! $appnet_enable)

2
blogger/blogger.php

@ -141,7 +141,7 @@ function blogger_post_local(&$a,&$b) {
$bl_enable = (($bl_post && x($_REQUEST,'blogger_enable')) ? intval($_REQUEST['blogger_enable']) : 0);
if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'blogger','post_by_default')))
if($b['api_source'] && intval(get_pconfig(local_user(),'blogger','post_by_default')))
$bl_enable = 1;
if(! $bl_enable)

12
buffer/buffer.php

@ -210,21 +210,25 @@ function buffer_settings_post(&$a,&$b) {
function buffer_post_local(&$a,&$b) {
if((! local_user()) || (local_user() != $b['uid']))
if (!local_user() || (local_user() != $b['uid'])) {
return;
}
$buffer_post = intval(get_pconfig(local_user(),'buffer','post'));
$buffer_enable = (($buffer_post && x($_REQUEST,'buffer_enable')) ? intval($_REQUEST['buffer_enable']) : 0);
if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'buffer','post_by_default')))
if ($b['api_source'] && intval(get_pconfig(local_user(),'buffer','post_by_default'))) {
$buffer_enable = 1;
}
if(! $buffer_enable)
if (!$buffer_enable) {
return;
}
if(strlen($b['postopts']))
if (strlen($b['postopts'])) {
$b['postopts'] .= ',';
}
$b['postopts'] .= 'buffer';
}

25
diaspora/diaspora.php

@ -233,28 +233,35 @@ function diaspora_settings_post(&$a,&$b) {
function diaspora_post_local(&$a,&$b) {
if($b['edit'])
if ($b['edit']) {
return;
}
if((! local_user()) || (local_user() != $b['uid']))
if (!local_user() || (local_user() != $b['uid'])) {
return;
}
if($b['private'] || $b['parent'])
if ($b['private'] || $b['parent']) {
return;
}
$diaspora_post = intval(get_pconfig(local_user(),'diaspora','post'));
$diaspora_enable = (($diaspora_post && x($_REQUEST,'diaspora_enable')) ? intval($_REQUEST['diaspora_enable']) : 0);
if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'diaspora','post_by_default')))
if ($b['api_source'] && intval(get_pconfig(local_user(),'diaspora','post_by_default'))) {
$diaspora_enable = 1;
}
if(! $diaspora_enable)
return;
if (!$diaspora_enable) {
return;
}
if (strlen($b['postopts'])) {
$b['postopts'] .= ',';
}
if(strlen($b['postopts']))
$b['postopts'] .= ',';
$b['postopts'] .= 'diaspora';
$b['postopts'] .= 'diaspora';
}

25
libertree/libertree.php

@ -115,28 +115,35 @@ function libertree_post_local(&$a,&$b) {
// This can probably be changed to allow editing by pointing to a different API endpoint
if($b['edit'])
if ($b['edit']) {
return;
}
if((! local_user()) || (local_user() != $b['uid']))
if ((! local_user()) || (local_user() != $b['uid'])) {
return;
}
if($b['private'] || $b['parent'])
if ($b['private'] || $b['parent']) {
return;
}
$ltree_post = intval(get_pconfig(local_user(),'libertree','post'));
$ltree_enable = (($ltree_post && x($_REQUEST,'libertree_enable')) ? intval($_REQUEST['libertree_enable']) : 0);
if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'libertree','post_by_default')))
if ($b['api_source'] && intval(get_pconfig(local_user(),'libertree','post_by_default'))) {
$ltree_enable = 1;
}
if(! $ltree_enable)
return;
if (!$ltree_enable) {
return;
}
if (strlen($b['postopts'])) {
$b['postopts'] .= ',';
}
if(strlen($b['postopts']))
$b['postopts'] .= ',';
$b['postopts'] .= 'libertree';
$b['postopts'] .= 'libertree';
}

16
pumpio/pumpio.php

@ -349,23 +349,27 @@ function pumpio_settings_post(&$a,&$b) {
}
}
function pumpio_post_local(&$a,&$b) {
function pumpio_post_local(&$a, &$b) {
if((! local_user()) || (local_user() != $b['uid']))
if (!local_user() || (local_user() != $b['uid'])) {
return;
}
$pumpio_post = intval(get_pconfig(local_user(),'pumpio','post'));
$pumpio_post = intval(get_pconfig(local_user(), 'pumpio', 'post'));
$pumpio_enable = (($pumpio_post && x($_REQUEST,'pumpio_enable')) ? intval($_REQUEST['pumpio_enable']) : 0);
if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'pumpio','post_by_default')))
if ($b['api_source'] && intval(get_pconfig(local_user(), 'pumpio', 'post_by_default'))) {
$pumpio_enable = 1;
}
if(! $pumpio_enable)
if (!$pumpio_enable) {
return;
}
if(strlen($b['postopts']))
if (strlen($b['postopts'])) {
$b['postopts'] .= ',';
}
$b['postopts'] .= 'pumpio';
}

32
statusnet/statusnet.php

@ -428,26 +428,32 @@ function statusnet_settings(&$a,&$s) {
}
function statusnet_post_local(&$a,&$b) {
if($b['edit'])
function statusnet_post_local(&$a, &$b) {
if ($b['edit']) {
return;
}
if((local_user()) && (local_user() == $b['uid']) && (! $b['private'])) {
if (!local_user() || (local_user() != $b['uid'])) {
return;
}
$statusnet_post = get_pconfig(local_user(),'statusnet','post');
$statusnet_enable = (($statusnet_post && x($_REQUEST,'statusnet_enable')) ? intval($_REQUEST['statusnet_enable']) : 0);
$statusnet_post = get_pconfig(local_user(),'statusnet','post');
$statusnet_enable = (($statusnet_post && x($_REQUEST,'statusnet_enable')) ? intval($_REQUEST['statusnet_enable']) : 0);
// if API is used, default to the chosen settings
if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'statusnet','post_by_default')))
$statusnet_enable = 1;
// if API is used, default to the chosen settings
if ($b['api_source'] && intval(get_pconfig(local_user(),'statusnet','post_by_default'))) {
$statusnet_enable = 1;
}
if(! $statusnet_enable)
return;
if (!$statusnet_enable) {
return;
}
if(strlen($b['postopts']))
$b['postopts'] .= ',';
$b['postopts'] .= 'statusnet';
if (strlen($b['postopts'])) {
$b['postopts'] .= ',';
}
$b['postopts'] .= 'statusnet';
}
function statusnet_action($a, $uid, $pid, $action) {

21
tumblr/tumblr.php

@ -273,31 +273,38 @@ function tumblr_settings_post(&$a,&$b) {
}
function tumblr_post_local(&$a,&$b) {
function tumblr_post_local(&$a, &$b) {
// This can probably be changed to allow editing by pointing to a different API endpoint
if($b['edit'])
if ($b['edit']) {
return;
}
if((! local_user()) || (local_user() != $b['uid']))
if (!local_user() || (local_user() != $b['uid'])) {
return;
}
if($b['private'] || $b['parent'])
if ($b['private'] || $b['parent']) {
return;
}
$tmbl_post = intval(get_pconfig(local_user(),'tumblr','post'));
$tmbl_enable = (($tmbl_post && x($_REQUEST,'tumblr_enable')) ? intval($_REQUEST['tumblr_enable']) : 0);
if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'tumblr','post_by_default')))
if ($b['api_source'] && intval(get_pconfig(local_user(),'tumblr','post_by_default'))) {
$tmbl_enable = 1;
}
if(! $tmbl_enable)
if (!$tmbl_enable) {
return;
}
if(strlen($b['postopts']))
if (strlen($b['postopts'])) {
$b['postopts'] .= ',';
}
$b['postopts'] .= 'tumblr';
}

28
twitter/twitter.php

@ -334,27 +334,33 @@ function twitter_settings(&$a,&$s) {
}
function twitter_post_local(&$a,&$b) {
function twitter_post_local(&$a, &$b) {
if($b['edit'])
if ($b['edit']) {
return;
}
if((local_user()) && (local_user() == $b['uid']) && (! $b['private']) && (! $b['parent']) ) {
if (!local_user() || (local_user() != $b['uid'])) {
return;
}
$twitter_post = intval(get_pconfig(local_user(),'twitter','post'));
$twitter_enable = (($twitter_post && x($_REQUEST,'twitter_enable')) ? intval($_REQUEST['twitter_enable']) : 0);
$twitter_post = intval(get_pconfig(local_user(), 'twitter', 'post'));
$twitter_enable = (($twitter_post && x($_REQUEST, 'twitter_enable')) ? intval($_REQUEST['twitter_enable']) : 0);
// if API is used, default to the chosen settings
if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'twitter','post_by_default')))
$twitter_enable = 1;
// if API is used, default to the chosen settings
if ($b['api_source'] && intval(get_pconfig(local_user(), 'twitter', 'post_by_default'))) {
$twitter_enable = 1;
}
if(! $twitter_enable)
if (!$twitter_enable) {
return;
}
if(strlen($b['postopts']))
if (strlen($b['postopts'])) {
$b['postopts'] .= ',';
$b['postopts'] .= 'twitter';
}
$b['postopts'] .= 'twitter';
}
function twitter_action($a, $uid, $pid, $action) {

2
unicode_smilies/unicode_smilies.php

@ -1,7 +1,7 @@
<?php
/*
* Name: Unicode Smilies
* Description: Smilies based on the unicode emojis
* Description: Smilies based on the unicode emojis - On Linux use https://github.com/eosrei/emojione-color-font to see them in color
* Version: 1.0
* Author: Michael Vogel <http://pirati.ca/profile/heluecht>
*/

27
wppost/wppost.php

@ -149,38 +149,39 @@ function wppost_settings_post(&$a,&$b) {
}
function wppost_post_local(&$a,&$b) {
function wppost_post_local(&$a, &$b) {
// This can probably be changed to allow editing by pointing to a different API endpoint
if($b['edit']) {
if ($b['edit']) {
return;
}
if((! local_user()) || (local_user() != $b['uid'])) {
if (!local_user() || (local_user() != $b['uid'])) {
return;
}
if($b['private'] || $b['parent']) {
if ($b['private'] || $b['parent']) {
return;
}
$wp_post = intval(get_pconfig(local_user(),'wppost','post'));
$wp_post = intval(get_pconfig(local_user(),'wppost','post'));
$wp_enable = (($wp_post && x($_REQUEST,'wppost_enable')) ? intval($_REQUEST['wppost_enable']) : 0);
if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'wppost','post_by_default'))) {
if ($b['api_source'] && intval(get_pconfig(local_user(),'wppost','post_by_default'))) {
$wp_enable = 1;
}
if(! $wp_enable) {
return;
}
if (!$wp_enable) {
return;
}
if(strlen($b['postopts'])) {
$b['postopts'] .= ',';
}
$b['postopts'] .= 'wppost';
if (strlen($b['postopts'])) {
$b['postopts'] .= ',';
}
$b['postopts'] .= 'wppost';
}

Loading…
Cancel
Save