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 dadf76abd7..de0d9e4963 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 f4c14bc613..5bbfde2794 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 2645d06f65..eec713c537 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 c877540aba..1e2008392d 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 7c74a93ca0..dfa8640309 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 c05650cfaf..1bbc085279 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 2e1d7a2dbc..9f844e1db3 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 c59d243304..1148103054 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 6e982c7f04..ff6f890bb5 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 aaf6933f02..95be5cdede 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 7b14b2cdc4..7a64751d64 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 a82ae3d255..3def7d3a8c 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 671e6a3edd..054a1f4ff7 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 d54846fc34..c67df646b4 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 9eebc7f2e4..fd53772fd7 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 f5513bddd6..46862b4065 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 fe6fad66b0..dc6caab3db 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 b43639b845..edb0df33ad 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'; /* -- 2.39.5