From: Adam Magness Date: Fri, 9 Nov 2018 18:32:45 +0000 (-0500) Subject: Function renamed X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4a667f640f20dd54bd30ca8887eda7748d973a16;p=friendica-addons.git Function renamed update function calls --- diff --git a/buffer/buffer.php b/buffer/buffer.php index 686cfc90..d9378cb1 100644 --- a/buffer/buffer.php +++ b/buffer/buffer.php @@ -84,8 +84,8 @@ function buffer_addon_admin(App $a, &$o) function buffer_addon_admin_post(App $a) { - $client_id = ((!empty($_POST['client_id'])) ? Strings::removeTags(trim($_POST['client_id'])) : ''); - $client_secret = ((!empty($_POST['client_secret'])) ? Strings::removeTags(trim($_POST['client_secret'])) : ''); + $client_id = ((!empty($_POST['client_id'])) ? Strings::escapeTags(trim($_POST['client_id'])) : ''); + $client_secret = ((!empty($_POST['client_secret'])) ? Strings::escapeTags(trim($_POST['client_secret'])) : ''); Config::set('buffer', 'client_id' , $client_id); Config::set('buffer', 'client_secret', $client_secret); diff --git a/forumdirectory/forumdirectory.php b/forumdirectory/forumdirectory.php index 61f31f7e..a901015f 100644 --- a/forumdirectory/forumdirectory.php +++ b/forumdirectory/forumdirectory.php @@ -73,9 +73,9 @@ function forumdirectory_content(App $a) Nav::setSelected('directory'); if (!empty($a->data['search'])) { - $search = Strings::removeTags(trim($a->data['search'])); + $search = Strings::escapeTags(trim($a->data['search'])); } else { - $search = ((!empty($_GET['search'])) ? Strings::removeTags(trim(rawurldecode($_GET['search']))) : ''); + $search = ((!empty($_GET['search'])) ? Strings::escapeTags(trim(rawurldecode($_GET['search']))) : ''); } $tpl = Renderer::getMarkupTemplate('directory_header.tpl'); diff --git a/geocoordinates/geocoordinates.php b/geocoordinates/geocoordinates.php index 2e1b8e4a..58c5a30c 100644 --- a/geocoordinates/geocoordinates.php +++ b/geocoordinates/geocoordinates.php @@ -100,10 +100,10 @@ function geocoordinates_addon_admin(&$a, &$o) function geocoordinates_addon_admin_post(&$a) { - $api_key = ((x($_POST, 'api_key')) ? Strings::removeTags(trim($_POST['api_key'])) : ''); + $api_key = ((x($_POST, 'api_key')) ? Strings::escapeTags(trim($_POST['api_key'])) : ''); Config::set('geocoordinates', 'api_key', $api_key); - $language = ((x($_POST, 'language')) ? Strings::removeTags(trim($_POST['language'])) : ''); + $language = ((x($_POST, 'language')) ? Strings::escapeTags(trim($_POST['language'])) : ''); Config::set('geocoordinates', 'language', $language); info(L10n::t('Settings updated.'). EOL); } diff --git a/gravatar/gravatar.php b/gravatar/gravatar.php index 322849fe..49eec4a6 100644 --- a/gravatar/gravatar.php +++ b/gravatar/gravatar.php @@ -122,8 +122,8 @@ function gravatar_addon_admin (&$a, &$o) { function gravatar_addon_admin_post (&$a) { BaseModule::checkFormSecurityToken('gravatarsave'); - $default_avatar = ((x($_POST, 'avatar')) ? Strings::removeTags(trim($_POST['avatar'])) : 'identicon'); - $rating = ((x($_POST, 'rating')) ? Strings::removeTags(trim($_POST['rating'])) : 'g'); + $default_avatar = ((x($_POST, 'avatar')) ? Strings::escapeTags(trim($_POST['avatar'])) : 'identicon'); + $rating = ((x($_POST, 'rating')) ? Strings::escapeTags(trim($_POST['rating'])) : 'g'); Config::set('gravatar', 'default_avatar', $default_avatar); Config::set('gravatar', 'rating', $rating); info(L10n::t('Gravatar settings updated.') .EOL); diff --git a/impressum/impressum.php b/impressum/impressum.php index cf7787f9..3e04c64f 100644 --- a/impressum/impressum.php +++ b/impressum/impressum.php @@ -87,11 +87,11 @@ function impressum_show($a,&$b) { } function impressum_addon_admin_post (&$a) { - $owner = ((x($_POST, 'owner')) ? Strings::removeTags(trim($_POST['owner'])) : ''); - $ownerprofile = ((x($_POST, 'ownerprofile')) ? Strings::removeTags(trim($_POST['ownerprofile'])) : ''); + $owner = ((x($_POST, 'owner')) ? Strings::escapeTags(trim($_POST['owner'])) : ''); + $ownerprofile = ((x($_POST, 'ownerprofile')) ? Strings::escapeTags(trim($_POST['ownerprofile'])) : ''); $postal = ((x($_POST, 'postal')) ? (trim($_POST['postal'])) : ''); $notes = ((x($_POST, 'notes')) ? (trim($_POST['notes'])) : ''); - $email = ((x($_POST, 'email')) ? Strings::removeTags(trim($_POST['email'])) : ''); + $email = ((x($_POST, 'email')) ? Strings::escapeTags(trim($_POST['email'])) : ''); $footer_text = ((x($_POST, 'footer_text')) ? (trim($_POST['footer_text'])) : ''); Config::set('impressum','owner',strip_tags($owner)); Config::set('impressum','ownerprofile',strip_tags($ownerprofile)); diff --git a/libravatar/libravatar.php b/libravatar/libravatar.php index 918ad7ce..c711bf5e 100644 --- a/libravatar/libravatar.php +++ b/libravatar/libravatar.php @@ -125,7 +125,7 @@ function libravatar_addon_admin_post(&$a) { BaseModule::checkFormSecurityToken('libravatarrsave'); - $default_avatar = ((x($_POST, 'avatar')) ? Strings::removeTags(trim($_POST['avatar'])) : 'identicon'); + $default_avatar = ((x($_POST, 'avatar')) ? Strings::escapeTags(trim($_POST['avatar'])) : 'identicon'); Config::set('libravatar', 'default_avatar', $default_avatar); info(L10n::t('Libravatar settings updated.') .EOL); } diff --git a/newmemberwidget/newmemberwidget.php b/newmemberwidget/newmemberwidget.php index 9c39d55b..8ecbaaa9 100644 --- a/newmemberwidget/newmemberwidget.php +++ b/newmemberwidget/newmemberwidget.php @@ -55,7 +55,7 @@ function newmemberwidget_network_mod_init ($a, $b) function newmemberwidget_addon_admin_post(&$a) { $ft = ((x($_POST, 'freetext')) ? trim($_POST['freetext']) : ""); - $lsn = ((x($_POST, 'localsupportname')) ? Strings::removeTags(trim($_POST['localsupportname'])) : ""); + $lsn = ((x($_POST, 'localsupportname')) ? Strings::escapeTags(trim($_POST['localsupportname'])) : ""); $gs = intval($_POST['linkglobalsupport']); $ls = intval($_POST['linklocalsupport']); Config::set('newmemberwidget', 'freetext', trim($ft)); diff --git a/openstreetmap/openstreetmap.php b/openstreetmap/openstreetmap.php index 90dfaee2..0410931e 100644 --- a/openstreetmap/openstreetmap.php +++ b/openstreetmap/openstreetmap.php @@ -177,7 +177,7 @@ function openstreetmap_generate_map(&$a, &$b) $cardlink .= '?mlat=' . $lat . '&mlon=' . $lon; } - $cardlink .= '#map=' . $zoom . '/' . $lat . '/' . $lon . '">' . ($b['location'] ? Strings::escapeTags($b['location']) : L10n::t('View Larger')) . ''; + $cardlink .= '#map=' . $zoom . '/' . $lat . '/' . $lon . '">' . ($b['location'] ? Strings::escapeHtml($b['location']) : L10n::t('View Larger')) . ''; if (empty($b['mode'])) { $b['html'] = '