Merge pull request #792 from annando/notices

Avoiding notices
This commit is contained in:
Tobias Diekershoff 2019-01-13 19:30:08 +01:00 committed by GitHub
commit 01bc547447
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -148,19 +148,17 @@ function wppost_settings(&$a,&$s) {
function wppost_settings_post(&$a,&$b) {
if(!empty($_POST['wppost-submit'])) {
PConfig::set(local_user(),'wppost','post',intval($_POST['wppost']));
PConfig::set(local_user(),'wppost','post_by_default',intval($_POST['wp_bydefault']));
PConfig::set(local_user(),'wppost','post_by_default',intval(defaults($_POST, 'wp_bydefault', false)));
PConfig::set(local_user(),'wppost','wp_username',trim($_POST['wp_username']));
PConfig::set(local_user(),'wppost','wp_password',trim($_POST['wp_password']));
PConfig::set(local_user(),'wppost','wp_blog',trim($_POST['wp_blog']));
PConfig::set(local_user(),'wppost','backlink',trim($_POST['wp_backlink']));
PConfig::set(local_user(),'wppost','backlink',trim(defaults($_POST, 'wp_backlink', '')));
PConfig::set(local_user(),'wppost','shortcheck',trim($_POST['wp_shortcheck']));
$wp_backlink_text = Strings::escapeTags(trim($_POST['wp_backlink_text']));
$wp_backlink_text = BBCode::convert($wp_backlink_text, false, 8);
$wp_backlink_text = HTML::toPlaintext($wp_backlink_text, 0, true);
PConfig::set(local_user(),'wppost','wp_backlink_text', $wp_backlink_text);
}
}