And again removed notices (#700)

* And again removed notices

* Sometimes there doesn't seem to be a content, then we don't continue
This commit is contained in:
Michael Vogel 2018-08-12 07:52:21 +02:00 committed by Tobias Diekershoff
parent c8371bc521
commit 10086f940d

View file

@ -361,18 +361,19 @@ function pumpio_settings_post(App $a, array &$b)
$host = trim($host);
$host = str_replace(["https://", "http://"], ["", ""], $host);
PConfig::set(local_user(), 'pumpio', 'post' , intval($_POST['pumpio']));
PConfig::set(local_user(), 'pumpio', 'import' , $_POST['pumpio_import']);
PConfig::set(local_user(), 'pumpio', 'host' , $host);
PConfig::set(local_user(), 'pumpio', 'user' , $user);
PConfig::set(local_user(), 'pumpio', 'public' , $_POST['pumpio_public']);
PConfig::set(local_user(), 'pumpio', 'mirror' , $_POST['pumpio_mirror']);
PConfig::set(local_user(), 'pumpio', 'post_by_default', intval($_POST['pumpio_bydefault']));
if (isset($_POST['pumpio'])) {
PConfig::set(local_user(), 'pumpio', 'post' , intval($_POST['pumpio']));
PConfig::set(local_user(), 'pumpio', 'import' , $_POST['pumpio_import']);
PConfig::set(local_user(), 'pumpio', 'host' , $host);
PConfig::set(local_user(), 'pumpio', 'user' , $user);
PConfig::set(local_user(), 'pumpio', 'public' , $_POST['pumpio_public']);
PConfig::set(local_user(), 'pumpio', 'mirror' , $_POST['pumpio_mirror']);
PConfig::set(local_user(), 'pumpio', 'post_by_default', intval($_POST['pumpio_bydefault']));
if (!$_POST['pumpio_mirror']) {
PConfig::delete(local_user(), 'pumpio', 'lastdate');
if (!$_POST['pumpio_mirror']) {
PConfig::delete(local_user(), 'pumpio', 'lastdate');
}
}
//header("Location: ".$a->get_baseurl()."/pumpio/connect");
}
}
@ -1219,6 +1220,11 @@ function pumpio_dopost(App $a, $client, $uid, $self, $post, $own_id, $threadcomp
$postarray['parent-uri'] = $post->object->inReplyTo->id;
}
// When there is no content there is no need to continue
if (empty($post->object->content)) {
return false;
}
if (!empty($post->object->pump_io->proxyURL)) {
$postarray['extid'] = $post->object->pump_io->proxyURL;
}