From 3eecd108c5e24c98b7392d9f48d18ab1f7e44e2f Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Tue, 6 Nov 2018 06:31:48 -0500 Subject: [PATCH] rename function rename function and update calls. --- include/api.php | 4 ++-- src/Content/Text/HTML.php | 2 +- src/Protocol/DFRN.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/api.php b/include/api.php index 10c0a5c91e..e4d059c1ea 100644 --- a/include/api.php +++ b/include/api.php @@ -1046,7 +1046,7 @@ function api_statuses_mediap($type) //$txt = urldecode(requestdata('status')); if ((strpos($txt, '<') !== false) || (strpos($txt, '>') !== false)) { - $txt = HTML::htmlToBBVideo($txt); + $txt = HTML::toBBVideo($txt); $config = HTMLPurifier_Config::createDefault(); $config->set('Cache.DefinitionImpl', null); $purifier = new HTMLPurifier($config); @@ -1092,7 +1092,7 @@ function api_statuses_update($type) if (requestdata('htmlstatus')) { $txt = requestdata('htmlstatus'); if ((strpos($txt, '<') !== false) || (strpos($txt, '>') !== false)) { - $txt = HTML::htmlToBBVideo($txt); + $txt = HTML::toBBVideo($txt); $config = HTMLPurifier_Config::createDefault(); $config->set('Cache.DefinitionImpl', null); diff --git a/src/Content/Text/HTML.php b/src/Content/Text/HTML.php index cc7ed41924..8b309e79a4 100644 --- a/src/Content/Text/HTML.php +++ b/src/Content/Text/HTML.php @@ -711,7 +711,7 @@ class HTML * * @param string $s */ - public static function htmlToBBVideo($s) + public static function toBBVideo($s) { $s = preg_replace( '#]+>(.*?)https?://www.youtube.com/((?:v|cp)/[A-Za-z0-9\-_=]+)(.*?)#ism', diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index 91910e96e3..4cf7c7b731 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -2502,7 +2502,7 @@ class DFRN $base_url = get_app()->getBaseURL(); $item['body'] = HTML::relToAbs($item['body'], $base_url); - $item['body'] = HTML::htmlToBBVideo($item['body']); + $item['body'] = HTML::toBBVideo($item['body']); $item['body'] = OEmbed::HTML2BBCode($item['body']);