forked from friendica/friendica-addons
Avoiding notices
This commit is contained in:
parent
0322445360
commit
ffe0ba9c5b
|
@ -148,19 +148,17 @@ function wppost_settings(&$a,&$s) {
|
||||||
function wppost_settings_post(&$a,&$b) {
|
function wppost_settings_post(&$a,&$b) {
|
||||||
|
|
||||||
if(!empty($_POST['wppost-submit'])) {
|
if(!empty($_POST['wppost-submit'])) {
|
||||||
|
|
||||||
PConfig::set(local_user(),'wppost','post',intval($_POST['wppost']));
|
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_username',trim($_POST['wp_username']));
|
||||||
PConfig::set(local_user(),'wppost','wp_password',trim($_POST['wp_password']));
|
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','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']));
|
PConfig::set(local_user(),'wppost','shortcheck',trim($_POST['wp_shortcheck']));
|
||||||
$wp_backlink_text = Strings::escapeTags(trim($_POST['wp_backlink_text']));
|
$wp_backlink_text = Strings::escapeTags(trim($_POST['wp_backlink_text']));
|
||||||
$wp_backlink_text = BBCode::convert($wp_backlink_text, false, 8);
|
$wp_backlink_text = BBCode::convert($wp_backlink_text, false, 8);
|
||||||
$wp_backlink_text = HTML::toPlaintext($wp_backlink_text, 0, true);
|
$wp_backlink_text = HTML::toPlaintext($wp_backlink_text, 0, true);
|
||||||
PConfig::set(local_user(),'wppost','wp_backlink_text', $wp_backlink_text);
|
PConfig::set(local_user(),'wppost','wp_backlink_text', $wp_backlink_text);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue