From: Hypolite Petovan Date: Thu, 15 Feb 2018 03:01:14 +0000 (-0500) Subject: Remove references to include/bbcode.php X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9e3bae5caa6725737c2a1221a6c499e06ea0077c;p=friendica.git Remove references to include/bbcode.php --- diff --git a/include/acl_selectors.php b/include/acl_selectors.php index dd8864a631..e69ac36f68 100644 --- a/include/acl_selectors.php +++ b/include/acl_selectors.php @@ -186,9 +186,6 @@ function contact_selector($selname, $selclass, $options, $preselected = false) function contact_select($selname, $selclass, $preselected = false, $size = 4, $privmail = false, $celeb = false, $privatenet = false, $tabindex = null) { - - require_once "include/bbcode.php"; - $a = get_app(); $o = ''; diff --git a/include/api.php b/include/api.php index 013d47fe23..f7c04aaf88 100644 --- a/include/api.php +++ b/include/api.php @@ -40,7 +40,6 @@ use Friendica\Util\DateTimeFormat; use Friendica\Util\Network; use Friendica\Util\XML; -require_once 'include/bbcode.php'; require_once 'include/conversation.php'; require_once 'include/html2plain.php'; require_once 'mod/share.php'; diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php index 0a869ab383..bea15e3d4c 100644 --- a/include/bb2diaspora.php +++ b/include/bb2diaspora.php @@ -12,7 +12,6 @@ use League\HTMLToMarkdown\HtmlConverter; require_once 'include/event.php'; require_once 'include/html2bbcode.php'; -require_once 'include/bbcode.php'; /** * @brief Callback function to replace a Diaspora style mention in a mention for Friendica diff --git a/include/conversation.php b/include/conversation.php index 71770d31d6..1ff1dbf5f4 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -21,7 +21,6 @@ use Friendica\Util\DateTimeFormat; use Friendica\Util\Temporal; use Friendica\Util\XML; -require_once "include/bbcode.php"; require_once "include/acl_selectors.php"; function item_extract_images($body) { @@ -499,7 +498,6 @@ function item_condition() { * */ function conversation(App $a, $items, $mode, $update, $preview = false) { - require_once 'include/bbcode.php'; require_once 'mod/proxy.php'; $ssl_state = ((local_user()) ? true : false); diff --git a/include/enotify.php b/include/enotify.php index 2b6eec576c..c877540aba 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -12,7 +12,6 @@ use Friendica\Database\DBM; use Friendica\Util\DateTimeFormat; use Friendica\Util\Emailer; -require_once 'include/bbcode.php'; require_once 'include/html2bbcode.php'; /** diff --git a/include/event.php b/include/event.php index c86ba732b8..1c34e03cc6 100644 --- a/include/event.php +++ b/include/event.php @@ -16,7 +16,6 @@ use Friendica\Model\Profile; use Friendica\Util\DateTimeFormat; use Friendica\Util\Map; -require_once 'include/bbcode.php'; require_once 'include/conversation.php'; function format_event_html($ev, $simple = false) { @@ -239,7 +238,6 @@ function event_delete($event_id) { function event_store($arr) { require_once 'include/items.php'; - require_once 'include/bbcode.php'; $a = get_app(); diff --git a/include/items.php b/include/items.php index 456853d80d..31c8aaa799 100644 --- a/include/items.php +++ b/include/items.php @@ -19,7 +19,6 @@ use Friendica\Util\Network; use Friendica\Util\ParseUrl; use Friendica\Util\Temporal; -require_once 'include/bbcode.php'; require_once 'include/text.php'; require_once 'mod/share.php'; require_once 'include/enotify.php'; diff --git a/include/text.php b/include/text.php index ee5d4763ef..02f17fdb4b 100644 --- a/include/text.php +++ b/include/text.php @@ -1424,9 +1424,6 @@ function prepare_body(&$item, $attach = false, $preview = false) { * @return string Formattet HTML. */ function prepare_text($text) { - - require_once 'include/bbcode.php'; - if (stristr($text, '[nosmile]')) { $s = BBCode::convert($text); } else { diff --git a/mod/babel.php b/mod/babel.php index 683bc5fed1..43b5c4e807 100644 --- a/mod/babel.php +++ b/mod/babel.php @@ -7,7 +7,6 @@ use Friendica\Content\Text\BBCode; use Friendica\Content\Text\Markdown; use Friendica\Core\L10n; -require_once 'include/bbcode.php'; require_once 'include/bb2diaspora.php'; require_once 'include/html2bbcode.php'; @@ -43,7 +42,6 @@ function babel_content() $o .= '

' . L10n::t("bbcode \x28raw HTML\x28: ") . '

' . EOL . EOL; $o .= htmlspecialchars($html) . EOL . EOL; - //$html = bbcode($text); $o .= '

' . L10n::t('bbcode: ') . '

' . EOL . EOL; $o .= $html . EOL . EOL; diff --git a/mod/community.php b/mod/community.php index 5536a4934c..88fc6168bb 100644 --- a/mod/community.php +++ b/mod/community.php @@ -63,7 +63,6 @@ function community_content(App $a, $update = 0) } } - require_once 'include/bbcode.php'; require_once 'include/security.php'; require_once 'include/conversation.php'; diff --git a/mod/display.php b/mod/display.php index 1e1515f10f..42aad736cc 100644 --- a/mod/display.php +++ b/mod/display.php @@ -367,8 +367,8 @@ function display_content(App $a, $update = false, $update_uid = 0) { $o .= conversation($a, $items, 'display', $update_uid); // Preparing the meta header - require_once 'include/bbcode.php'; require_once 'include/html2plain.php'; + $description = trim(html2plain(BBCode::convert($s[0]["body"], false), 0, true)); $title = trim(html2plain(BBCode::convert($s[0]["title"], false), 0, true)); $author_name = $s[0]["author-name"]; diff --git a/mod/events.php b/mod/events.php index 5f6fb2c689..695dbb290f 100644 --- a/mod/events.php +++ b/mod/events.php @@ -15,7 +15,6 @@ use Friendica\Model\Profile; use Friendica\Util\DateTimeFormat; use Friendica\Util\Temporal; -require_once 'include/bbcode.php'; require_once 'include/event.php'; require_once 'include/items.php'; diff --git a/mod/filer.php b/mod/filer.php index 177b80acbe..190b6f78ac 100644 --- a/mod/filer.php +++ b/mod/filer.php @@ -7,7 +7,6 @@ use Friendica\Core\L10n; use Friendica\Core\PConfig; require_once 'include/security.php'; -require_once 'include/bbcode.php'; require_once 'include/items.php'; function filer_content(App $a) diff --git a/mod/like.php b/mod/like.php index 9371c30743..957fe5fc42 100644 --- a/mod/like.php +++ b/mod/like.php @@ -5,7 +5,6 @@ use Friendica\Core\System; use Friendica\Model\Item; require_once 'include/security.php'; -require_once 'include/bbcode.php'; require_once 'include/items.php'; function like_content(App $a) { diff --git a/mod/message.php b/mod/message.php index d51fe0a779..bb32b5a72d 100644 --- a/mod/message.php +++ b/mod/message.php @@ -336,8 +336,6 @@ function message_content(App $a) intval(local_user()) ); - require_once("include/bbcode.php"); - $tpl = get_markup_template('msg-header.tpl'); $a->page['htmlhead'] .= replace_macros($tpl, [ '$baseurl' => System::baseUrl(true), diff --git a/mod/notes.php b/mod/notes.php index b607c084ed..3b46df07da 100644 --- a/mod/notes.php +++ b/mod/notes.php @@ -31,7 +31,6 @@ function notes_content(App $a, $update = false) return; } - require_once 'include/bbcode.php'; require_once 'include/security.php'; require_once 'include/conversation.php'; require_once 'include/acl_selectors.php'; diff --git a/mod/notify.php b/mod/notify.php index a65e14debb..f22c1cf5b1 100644 --- a/mod/notify.php +++ b/mod/notify.php @@ -62,7 +62,6 @@ function notify_content(App $a) $notif_tpl = get_markup_template('notifications.tpl'); $not_tpl = get_markup_template('notify.tpl'); - require_once('include/bbcode.php'); $r = $nm->getAll(['seen'=>0]); if (DBM::is_result($r) > 0) { diff --git a/mod/photos.php b/mod/photos.php index 863a848d61..2b6998ae1d 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -27,7 +27,6 @@ use Friendica\Util\Temporal; require_once 'include/items.php'; require_once 'include/acl_selectors.php'; -require_once 'include/bbcode.php'; require_once 'include/security.php'; function photos_init(App $a) { @@ -934,7 +933,6 @@ function photos_content(App $a) return; } - require_once 'include/bbcode.php'; require_once 'include/security.php'; require_once 'include/conversation.php'; diff --git a/mod/ping.php b/mod/ping.php index e24168aa97..146411206f 100644 --- a/mod/ping.php +++ b/mod/ping.php @@ -19,7 +19,6 @@ use Friendica\Util\DateTimeFormat; use Friendica\Util\Temporal; use Friendica\Util\XML; -require_once 'include/bbcode.php'; require_once 'mod/proxy.php'; require_once 'include/enotify.php'; diff --git a/mod/poco.php b/mod/poco.php index d212bb5f9c..0728020ecc 100644 --- a/mod/poco.php +++ b/mod/poco.php @@ -246,7 +246,6 @@ function poco_init(App $a) { } $about = Cache::get("about:" . $contact['updated'] . ":" . $contact['nurl']); if (is_null($about)) { - require_once 'include/bbcode.php'; $about = BBCode::convert($contact['about'], false); Cache::set("about:" . $contact['updated'] . ":" . $contact['nurl'], $about); } diff --git a/mod/poke.php b/mod/poke.php index c120791739..3148896bc2 100644 --- a/mod/poke.php +++ b/mod/poke.php @@ -22,7 +22,6 @@ use Friendica\Database\DBM; use Friendica\Model\Item; require_once 'include/security.php'; -require_once 'include/bbcode.php'; require_once 'include/items.php'; function poke_init(App $a) { diff --git a/mod/profile.php b/mod/profile.php index a7c39ab33f..74ca06aad9 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -116,7 +116,6 @@ function profile_content(App $a, $update = 0) return Login::form(); } - require_once 'include/bbcode.php'; require_once 'include/security.php'; require_once 'include/conversation.php'; require_once 'include/acl_selectors.php'; diff --git a/mod/register.php b/mod/register.php index 76c5073d59..51ed57a9c5 100644 --- a/mod/register.php +++ b/mod/register.php @@ -15,7 +15,6 @@ use Friendica\Model\User; use Friendica\Util\DateTimeFormat; require_once 'include/enotify.php'; -require_once 'include/bbcode.php'; function register_post(App $a) { diff --git a/mod/search.php b/mod/search.php index afe94121db..1f93934658 100644 --- a/mod/search.php +++ b/mod/search.php @@ -11,7 +11,6 @@ use Friendica\Core\L10n; use Friendica\Core\System; use Friendica\Database\DBM; -require_once "include/bbcode.php"; require_once 'include/security.php'; require_once 'include/conversation.php'; require_once 'mod/dirfind.php'; diff --git a/mod/subthread.php b/mod/subthread.php index b4f2ca819c..c858f2d1fa 100644 --- a/mod/subthread.php +++ b/mod/subthread.php @@ -10,7 +10,6 @@ use Friendica\Database\DBM; use Friendica\Model\Item; require_once 'include/security.php'; -require_once 'include/bbcode.php'; require_once 'include/items.php'; function subthread_content(App $a) { diff --git a/mod/tagger.php b/mod/tagger.php index c602613f1f..16195cc339 100644 --- a/mod/tagger.php +++ b/mod/tagger.php @@ -11,7 +11,6 @@ use Friendica\Database\DBM; use Friendica\Model\Item; require_once 'include/security.php'; -require_once 'include/bbcode.php'; require_once 'include/items.php'; function tagger_content(App $a) { diff --git a/mod/tagrm.php b/mod/tagrm.php index b7e72b4da8..b9991d68da 100644 --- a/mod/tagrm.php +++ b/mod/tagrm.php @@ -10,8 +10,6 @@ use Friendica\Core\System; use Friendica\Database\DBM; use Friendica\Model\Item; -require_once 'include/bbcode.php'; - function tagrm_post(App $a) { if (!local_user()) { diff --git a/mod/videos.php b/mod/videos.php index 65dda1b498..75a4d031f3 100644 --- a/mod/videos.php +++ b/mod/videos.php @@ -20,7 +20,6 @@ use Friendica\Util\DateTimeFormat; require_once 'include/items.php'; require_once 'include/acl_selectors.php'; -require_once 'include/bbcode.php'; require_once 'include/security.php'; function videos_init(App $a) { @@ -202,8 +201,6 @@ function videos_content(App $a) { return; } - - require_once('include/bbcode.php'); require_once('include/security.php'); require_once('include/conversation.php'); diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index 064d5030ee..9f250e9bfa 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -23,7 +23,6 @@ use Friendica\Util\Map; use Friendica\Util\Network; use Friendica\Util\ParseUrl; -require_once "include/bbcode.php"; require_once "include/event.php"; require_once "include/html2plain.php"; require_once "mod/proxy.php"; diff --git a/src/Core/NotificationsManager.php b/src/Core/NotificationsManager.php index 3d11789e93..0e552d2e09 100644 --- a/src/Core/NotificationsManager.php +++ b/src/Core/NotificationsManager.php @@ -20,7 +20,6 @@ use Friendica\Util\XML; require_once 'include/dba.php'; require_once 'include/html2plain.php'; -require_once 'include/bbcode.php'; /** * @brief Methods for read and write notifications from/to database diff --git a/src/Model/Profile.php b/src/Model/Profile.php index d1a705fd7c..81f9963099 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -24,7 +24,6 @@ use Friendica\Util\Temporal; use dba; require_once 'include/dba.php'; -require_once 'include/bbcode.php'; require_once 'mod/proxy.php'; class Profile @@ -625,8 +624,6 @@ class Profile public static function getEvents() { - require_once 'include/bbcode.php'; - $a = get_app(); $o = ''; diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index 00064b7e86..6876d25418 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -43,7 +43,6 @@ require_once "include/items.php"; require_once "include/event.php"; require_once "include/text.php"; require_once "include/html2bbcode.php"; -require_once "include/bbcode.php"; /** * @brief This class contain functions to create and send DFRN XML files diff --git a/src/Protocol/OStatus.php b/src/Protocol/OStatus.php index ed3c5c0a07..7b06a2d68b 100644 --- a/src/Protocol/OStatus.php +++ b/src/Protocol/OStatus.php @@ -26,7 +26,6 @@ use DOMXPath; require_once 'include/dba.php'; require_once 'include/html2bbcode.php'; -require_once 'include/bbcode.php'; require_once 'include/items.php'; require_once 'mod/share.php'; require_once 'include/enotify.php'; diff --git a/src/Worker/Delivery.php b/src/Worker/Delivery.php index dbc0bdb5d0..b8eceb05bc 100644 --- a/src/Worker/Delivery.php +++ b/src/Worker/Delivery.php @@ -19,7 +19,6 @@ use dba; require_once 'include/html2plain.php'; require_once 'include/items.php'; -require_once 'include/bbcode.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 f22549c2b8..b43639b845 100644 --- a/src/Worker/Notifier.php +++ b/src/Worker/Notifier.php @@ -20,7 +20,6 @@ use dba; require_once 'include/dba.php'; require_once 'include/html2plain.php'; require_once 'include/items.php'; -require_once 'include/bbcode.php'; /* * This file was at one time responsible for doing all deliveries, but this caused diff --git a/src/Worker/Queue.php b/src/Worker/Queue.php index 29be22199f..3f4a764cee 100644 --- a/src/Worker/Queue.php +++ b/src/Worker/Queue.php @@ -18,7 +18,6 @@ use dba; require_once 'include/dba.php'; require_once 'include/items.php'; -require_once 'include/bbcode.php'; class Queue {