From 789561c7a2e53f374ec0c90eceb928ed66af68c7 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 7 Mar 2018 16:34:17 -0500 Subject: [PATCH] Remove/Update references to include/html2*.php --- doc/Addons.md | 2 +- doc/de/Addons.md | 2 +- include/api.php | 2 -- include/enotify.php | 2 -- mod/display.php | 2 -- mod/item.php | 1 - mod/oexchange.php | 2 -- src/Content/Text/BBCode.php | 1 - src/Content/Text/Markdown.php | 2 -- src/Core/NotificationsManager.php | 1 - src/Model/GContact.php | 1 - src/Protocol/DFRN.php | 1 - src/Protocol/Email.php | 2 -- src/Protocol/Feed.php | 1 - src/Protocol/OStatus.php | 1 - src/Protocol/PortableContact.php | 1 - src/Worker/Delivery.php | 1 - src/Worker/Notifier.php | 1 - 18 files changed, 2 insertions(+), 24 deletions(-) diff --git a/doc/Addons.md b/doc/Addons.md index dadf76abd..de0d9e496 100644 --- a/doc/Addons.md +++ b/doc/Addons.md @@ -372,7 +372,7 @@ include/cronhooks.php: Addon::callHooks('cron', $d); include/security.php: Addon::callHooks('logged_in', $a->user); -include/html2bbcode.php: Addon::callHooks('html2bbcode', $text); +src/Content/Text/HTML.php: Addon::callHooks('html2bbcode', $text); include/Contact.php: Addon::callHooks('remove_user',$r[0]); diff --git a/doc/de/Addons.md b/doc/de/Addons.md index f4c14bc61..5bbfde279 100644 --- a/doc/de/Addons.md +++ b/doc/de/Addons.md @@ -265,7 +265,7 @@ include/cronhooks.php: Addon::callHooks('cron', $d); include/security.php: Addon::callHooks('logged_in', $a->user); -include/html2bbcode.php: Addon::callHooks('html2bbcode', $text); +src/Content/Text/HTML.php: Addon::callHooks('html2bbcode', $text); include/Contact.php: Addon::callHooks('remove_user',$r[0]); diff --git a/include/api.php b/include/api.php index 2645d06f6..eec713c53 100644 --- a/include/api.php +++ b/include/api.php @@ -42,11 +42,9 @@ use Friendica\Util\Network; use Friendica\Util\XML; require_once 'include/conversation.php'; -require_once 'include/html2plain.php'; require_once 'mod/share.php'; require_once 'mod/item.php'; require_once 'include/security.php'; -require_once 'include/html2bbcode.php'; require_once 'mod/wall_upload.php'; require_once 'mod/proxy.php'; diff --git a/include/enotify.php b/include/enotify.php index c877540ab..1e2008392 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -12,8 +12,6 @@ use Friendica\Database\DBM; use Friendica\Util\DateTimeFormat; use Friendica\Util\Emailer; -require_once 'include/html2bbcode.php'; - /** * @brief Creates a notification entry and possibly sends a mail * diff --git a/mod/display.php b/mod/display.php index 7c74a93ca..dfa864030 100644 --- a/mod/display.php +++ b/mod/display.php @@ -368,8 +368,6 @@ function display_content(App $a, $update = false, $update_uid = 0) { $o .= conversation($a, $items, 'display', $update_uid); // Preparing the meta header - require_once 'include/html2plain.php'; - $description = trim(HTML::toPlaintext(BBCode::convert($s[0]["body"], false), 0, true)); $title = trim(HTML::toPlaintext(BBCode::convert($s[0]["title"], false), 0, true)); $author_name = $s[0]["author-name"]; diff --git a/mod/item.php b/mod/item.php index c05650cfa..1bbc08527 100644 --- a/mod/item.php +++ b/mod/item.php @@ -808,7 +808,6 @@ function item_post(App $a) { $link = '' . $a->user['username'] . '

'; $html = prepare_body($datarray); $message = '' . $link . $html . $disclaimer . ''; - include_once 'include/html2plain.php'; $params = [ 'fromName' => $a->user['username'], 'fromEmail' => $a->user['email'], diff --git a/mod/oexchange.php b/mod/oexchange.php index 2e1d7a2db..9f844e1db 100644 --- a/mod/oexchange.php +++ b/mod/oexchange.php @@ -46,8 +46,6 @@ function oexchange_content(App $a) { return; } - require_once('include/html2bbcode.php'); - $post = []; $post['profile_uid'] = local_user(); diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index c59d24330..114810305 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -28,7 +28,6 @@ use Friendica\Util\ParseUrl; use League\HTMLToMarkdown\HtmlConverter; require_once "include/event.php"; -require_once "include/html2plain.php"; require_once "mod/proxy.php"; class BBCode extends BaseObject diff --git a/src/Content/Text/Markdown.php b/src/Content/Text/Markdown.php index 6e982c7f0..ff6f890bb 100644 --- a/src/Content/Text/Markdown.php +++ b/src/Content/Text/Markdown.php @@ -10,8 +10,6 @@ use Friendica\BaseObject; use Friendica\Model\Contact; use Michelf\MarkdownExtra; -require_once 'include/html2bbcode.php'; - /** * Friendica-specific usage of Markdown * diff --git a/src/Core/NotificationsManager.php b/src/Core/NotificationsManager.php index aaf6933f0..95be5cded 100644 --- a/src/Core/NotificationsManager.php +++ b/src/Core/NotificationsManager.php @@ -19,7 +19,6 @@ use Friendica\Util\Temporal; use Friendica\Util\XML; require_once 'include/dba.php'; -require_once 'include/html2plain.php'; /** * @brief Methods for read and write notifications from/to database diff --git a/src/Model/GContact.php b/src/Model/GContact.php index 7b14b2cdc..7a64751d6 100644 --- a/src/Model/GContact.php +++ b/src/Model/GContact.php @@ -20,7 +20,6 @@ use dba; use Exception; require_once 'include/dba.php'; -require_once 'include/html2bbcode.php'; /** * @brief This class handles GlobalContact related functions diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index a82ae3d25..3def7d3a8 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -42,7 +42,6 @@ require_once "include/enotify.php"; require_once "include/items.php"; require_once "include/event.php"; require_once "include/text.php"; -require_once "include/html2bbcode.php"; /** * @brief This class contain functions to create and send DFRN XML files diff --git a/src/Protocol/Email.php b/src/Protocol/Email.php index 671e6a3ed..054a1f4ff 100644 --- a/src/Protocol/Email.php +++ b/src/Protocol/Email.php @@ -6,8 +6,6 @@ namespace Friendica\Protocol; use Friendica\Content\Text\HTML; -require_once 'include/html2plain.php'; - /** * @brief Email class */ diff --git a/src/Protocol/Feed.php b/src/Protocol/Feed.php index d54846fc3..c67df646b 100644 --- a/src/Protocol/Feed.php +++ b/src/Protocol/Feed.php @@ -15,7 +15,6 @@ use DOMDocument; use DOMXPath; require_once 'include/dba.php'; -require_once 'include/html2bbcode.php'; require_once 'include/items.php'; /** diff --git a/src/Protocol/OStatus.php b/src/Protocol/OStatus.php index 9eebc7f2e..fd53772fd 100644 --- a/src/Protocol/OStatus.php +++ b/src/Protocol/OStatus.php @@ -26,7 +26,6 @@ use DOMDocument; use DOMXPath; require_once 'include/dba.php'; -require_once 'include/html2bbcode.php'; require_once 'include/items.php'; require_once 'mod/share.php'; require_once 'include/enotify.php'; diff --git a/src/Protocol/PortableContact.php b/src/Protocol/PortableContact.php index f5513bddd..46862b406 100644 --- a/src/Protocol/PortableContact.php +++ b/src/Protocol/PortableContact.php @@ -24,7 +24,6 @@ use DOMXPath; use Exception; require_once 'include/dba.php'; -require_once 'include/html2bbcode.php'; class PortableContact { diff --git a/src/Worker/Delivery.php b/src/Worker/Delivery.php index fe6fad66b..dc6caab3d 100644 --- a/src/Worker/Delivery.php +++ b/src/Worker/Delivery.php @@ -17,7 +17,6 @@ use Friendica\Protocol\Diaspora; use Friendica\Protocol\Email; use dba; -require_once 'include/html2plain.php'; require_once 'include/items.php'; /// @todo This is some ugly code that needs to be split into several methods diff --git a/src/Worker/Notifier.php b/src/Worker/Notifier.php index b43639b84..edb0df33a 100644 --- a/src/Worker/Notifier.php +++ b/src/Worker/Notifier.php @@ -18,7 +18,6 @@ use Friendica\Protocol\Salmon; use dba; require_once 'include/dba.php'; -require_once 'include/html2plain.php'; require_once 'include/items.php'; /*