Re-enabling a once stopped mirroring now doesn't flood the timeline with old posts anymore. #195

Merged
annando merged 1 commit from master into master 2014-06-01 14:54:28 +02:00
6 changed files with 20 additions and 2 deletions
Showing only changes of commit 2284e21c0a - Show all commits

View file

@ -140,6 +140,9 @@ function fbpost_post(&$a) {
$value = ((x($_POST,'mirror_posts')) ? intval($_POST['mirror_posts']) : 0); $value = ((x($_POST,'mirror_posts')) ? intval($_POST['mirror_posts']) : 0);
set_pconfig($uid,'facebook','mirror_posts', $value); set_pconfig($uid,'facebook','mirror_posts', $value);
if (!$value)
del_pconfig($uid,'facebook','last_created');
$value = ((x($_POST,'suppress_view_on_friendica')) ? intval($_POST['suppress_view_on_friendica']) : 0); $value = ((x($_POST,'suppress_view_on_friendica')) ? intval($_POST['suppress_view_on_friendica']) : 0);
set_pconfig($uid,'facebook','suppress_view_on_friendica', $value); set_pconfig($uid,'facebook','suppress_view_on_friendica', $value);

View file

@ -71,6 +71,10 @@ function fromgplus_addon_settings_post(&$a,&$b) {
set_pconfig(local_user(),'fromgplus','account',trim($_POST['fromgplus-account'])); set_pconfig(local_user(),'fromgplus','account',trim($_POST['fromgplus-account']));
$enable = ((x($_POST,'fromgplus-enable')) ? intval($_POST['fromgplus-enable']) : 0); $enable = ((x($_POST,'fromgplus-enable')) ? intval($_POST['fromgplus-enable']) : 0);
set_pconfig(local_user(),'fromgplus','enable', $enable); set_pconfig(local_user(),'fromgplus','enable', $enable);
if (!$enable)
del_pconfig(local_user(),'fromgplus','lastdate');
info( t('Google+ Import Settings saved.') . EOL); info( t('Google+ Import Settings saved.') . EOL);
} }
} }

View file

@ -182,6 +182,9 @@ function gpluspost_settings_post(&$a,&$b) {
set_pconfig(local_user(),'fromgplus','account',trim($_POST['fromgplus-account'])); set_pconfig(local_user(),'fromgplus','account',trim($_POST['fromgplus-account']));
$enable = ((x($_POST,'fromgplus-enable')) ? intval($_POST['fromgplus-enable']) : 0); $enable = ((x($_POST,'fromgplus-enable')) ? intval($_POST['fromgplus-enable']) : 0);
set_pconfig(local_user(),'fromgplus','enable', $enable); set_pconfig(local_user(),'fromgplus','enable', $enable);
if (!$enable)
del_pconfig(local_user(),'fromgplus','lastdate');
} }
} }
} }

View file

@ -326,7 +326,7 @@ function pumpio_settings_post(&$a,&$b) {
set_pconfig(local_user(),'pumpio','post_by_default',intval($_POST['pumpio_bydefault'])); set_pconfig(local_user(),'pumpio','post_by_default',intval($_POST['pumpio_bydefault']));
if (!$_POST['pumpio_mirror']) if (!$_POST['pumpio_mirror'])
set_pconfig(local_user(),'pumpio','lastdate', $lastdate); del_pconfig(local_user(),'pumpio','lastdate');
//header("Location: ".$a->get_baseurl()."/pumpio/connect"); //header("Location: ".$a->get_baseurl()."/pumpio/connect");
} }

View file

@ -250,6 +250,10 @@ function statusnet_settings_post ($a,$post) {
set_pconfig(local_user(), 'statusnet', 'mirror_posts', intval($_POST['statusnet-mirror'])); set_pconfig(local_user(), 'statusnet', 'mirror_posts', intval($_POST['statusnet-mirror']));
set_pconfig(local_user(), 'statusnet', 'import', intval($_POST['statusnet-import'])); set_pconfig(local_user(), 'statusnet', 'import', intval($_POST['statusnet-import']));
set_pconfig(local_user(), 'statusnet', 'create_user', intval($_POST['statusnet-create_user'])); set_pconfig(local_user(), 'statusnet', 'create_user', intval($_POST['statusnet-create_user']));
if (!intval($_POST['statusnet-mirror']))
del_pconfig(local_user(),'statusnet','lastid');
info( t('StatusNet settings updated.') . EOL); info( t('StatusNet settings updated.') . EOL);
}}}} }}}}
} }

View file

@ -194,7 +194,11 @@ function twitter_settings_post ($a,$post) {
set_pconfig(local_user(), 'twitter', 'mirror_posts', intval($_POST['twitter-mirror'])); set_pconfig(local_user(), 'twitter', 'mirror_posts', intval($_POST['twitter-mirror']));
set_pconfig(local_user(), 'twitter', 'import', intval($_POST['twitter-import'])); set_pconfig(local_user(), 'twitter', 'import', intval($_POST['twitter-import']));
set_pconfig(local_user(), 'twitter', 'create_user', intval($_POST['twitter-create_user'])); set_pconfig(local_user(), 'twitter', 'create_user', intval($_POST['twitter-create_user']));
info( t('Twitter settings updated.') . EOL);
if (!intval($_POST['twitter-mirror']))
del_pconfig(local_user(),'twitter','lastid');
info(t('Twitter settings updated.') . EOL);
}} }}
} }
function twitter_settings(&$a,&$s) { function twitter_settings(&$a,&$s) {