mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-10 18:38:49 +00:00
"remote self" should work now with the addons
This commit is contained in:
parent
63aa4bb7a7
commit
642ab7f76f
11 changed files with 129 additions and 87 deletions
|
@ -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']) ) {
|
||||
|
||||
$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(! $twitter_enable)
|
||||
return;
|
||||
|
||||
if(strlen($b['postopts']))
|
||||
$b['postopts'] .= ',';
|
||||
$b['postopts'] .= 'twitter';
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
// 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) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (strlen($b['postopts'])) {
|
||||
$b['postopts'] .= ',';
|
||||
}
|
||||
|
||||
$b['postopts'] .= 'twitter';
|
||||
}
|
||||
|
||||
function twitter_action($a, $uid, $pid, $action) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue