From 88ca2f5a1e83c2cd93c6b08863fdd361a3a9bd69 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 14 Feb 2018 22:04:06 -0500 Subject: [PATCH] Remove references to include/bbcode.php --- blogger/blogger.php | 2 -- dwpost/dwpost.php | 3 --- ijpost/ijpost.php | 3 --- impressum/impressum.php | 1 - ljpost/ljpost.php | 3 --- mailstream/mailstream.php | 2 +- newmemberwidget/newmemberwidget.php | 2 -- pumpio/pumpio.php | 3 --- statusnet/statusnet.php | 1 - tumblr/tumblr.php | 3 --- windowsphonepush/windowsphonepush.php | 2 +- wppost/wppost.php | 1 - 12 files changed, 2 insertions(+), 24 deletions(-) diff --git a/blogger/blogger.php b/blogger/blogger.php index 76c12bbb6..30c450bda 100644 --- a/blogger/blogger.php +++ b/blogger/blogger.php @@ -183,8 +183,6 @@ function blogger_send(&$a, &$b) $bl_blog = PConfig::get($b['uid'], 'blogger', 'bl_blog'); if ($bl_username && $bl_password && $bl_blog) { - require_once('include/bbcode.php'); - $title = '' . (($b['title']) ? $b['title'] : L10n::t('Post from Friendica')) . ''; $post = $title . BBCode::convert($b['body']); $post = xmlify($post); diff --git a/dwpost/dwpost.php b/dwpost/dwpost.php index 7e8488c37..a46f55b2a 100644 --- a/dwpost/dwpost.php +++ b/dwpost/dwpost.php @@ -179,9 +179,6 @@ function dwpost_send(&$a,&$b) { $dw_blog = 'http://www.dreamwidth.org/interface/xmlrpc'; if($dw_username && $dw_password && $dw_blog) { - - require_once('include/bbcode.php'); - $title = $b['title']; $post = BBCode::convert($b['body']); $post = xmlify($post); diff --git a/ijpost/ijpost.php b/ijpost/ijpost.php index 439018f41..8d5290855 100644 --- a/ijpost/ijpost.php +++ b/ijpost/ijpost.php @@ -178,9 +178,6 @@ function ijpost_send(&$a,&$b) { $ij_blog = 'http://www.insanejournal.com/interface/xmlrpc'; if($ij_username && $ij_password && $ij_blog) { - - require_once('include/bbcode.php'); - $title = $b['title']; $post = BBCode::convert($b['body']); $post = xmlify($post); diff --git a/impressum/impressum.php b/impressum/impressum.php index ae6ddf18d..50458ee5e 100644 --- a/impressum/impressum.php +++ b/impressum/impressum.php @@ -7,7 +7,6 @@ * License: 3-clause BSD license */ -require_once 'include/bbcode.php'; require_once 'mod/proxy.php'; use Friendica\Content\Text\BBCode; diff --git a/ljpost/ljpost.php b/ljpost/ljpost.php index 97daf519e..ec99f9ba9 100644 --- a/ljpost/ljpost.php +++ b/ljpost/ljpost.php @@ -179,9 +179,6 @@ function ljpost_send(&$a,&$b) { $lj_blog = xmlify('http://www.livejournal.com/interface/xmlrpc'); if($lj_username && $lj_password && $lj_blog) { - - require_once('include/bbcode.php'); - $title = xmlify($b['title']); $post = BBCode::convert($b['body']); $post = xmlify($post); diff --git a/mailstream/mailstream.php b/mailstream/mailstream.php index acab59145..6c057b21b 100644 --- a/mailstream/mailstream.php +++ b/mailstream/mailstream.php @@ -257,7 +257,7 @@ function mailstream_send($a, $message_id, $item, $user) { return; } require_once(dirname(__file__).'/phpmailer/class.phpmailer.php'); - require_once('include/bbcode.php'); + $attachments = []; mailstream_do_images($a, $item, $attachments); $frommail = Config::get('mailstream', 'frommail'); diff --git a/newmemberwidget/newmemberwidget.php b/newmemberwidget/newmemberwidget.php index 6ea833670..57b49230c 100644 --- a/newmemberwidget/newmemberwidget.php +++ b/newmemberwidget/newmemberwidget.php @@ -6,8 +6,6 @@ * Author: Tobias Diekershoff ***/ -require_once 'include/bbcode.php'; - use Friendica\Content\Text\BBCode; use Friendica\Core\Addon; use Friendica\Core\Config; diff --git a/pumpio/pumpio.php b/pumpio/pumpio.php index 129f2738d..a1ca2ade7 100644 --- a/pumpio/pumpio.php +++ b/pumpio/pumpio.php @@ -471,9 +471,6 @@ function pumpio_send(&$a,&$b) { $public = PConfig::get($b['uid'], "pumpio", "public"); if($oauth_token && $oauth_token_secret) { - - require_once('include/bbcode.php'); - $title = trim($b['title']); $content = BBCode::convert($b['body'], false, 4); diff --git a/statusnet/statusnet.php b/statusnet/statusnet.php index f1c080f49..c54ff55f6 100644 --- a/statusnet/statusnet.php +++ b/statusnet/statusnet.php @@ -544,7 +544,6 @@ function statusnet_post_hook(App $a, &$b) return; } - require_once 'include/bbcode.php'; $dent = new StatusNetOAuth($api, $ckey, $csecret, $otoken, $osecret); $max_char = $dent->get_maxlength(); // max. length for a dent diff --git a/tumblr/tumblr.php b/tumblr/tumblr.php index 831dd6156..b2dec5b54 100644 --- a/tumblr/tumblr.php +++ b/tumblr/tumblr.php @@ -342,9 +342,6 @@ function tumblr_send(&$a,&$b) { $tmbl_blog = 'blog/'.$page.'/post'; if($oauth_token && $oauth_token_secret && $tmbl_blog) { - - require_once('include/bbcode.php'); - $tag_arr = []; $tags = ''; $x = preg_match_all('/\#\[(.*?)\](.*?)\[/',$b['tag'],$matches,PREG_SET_ORDER); diff --git a/windowsphonepush/windowsphonepush.php b/windowsphonepush/windowsphonepush.php index 346f550f2..206b0883e 100644 --- a/windowsphonepush/windowsphonepush.php +++ b/windowsphonepush/windowsphonepush.php @@ -211,8 +211,8 @@ function windowsphonepush_cron() if (substr($body, 0, 4) == "[url") { $body = "URL/Image ..."; } else { - require_once('include/bbcode.php'); require_once("include/html2plain.php"); + $body = BBCode::convert($body, false, 2, true); $body = html2plain($body, 0); $body = ((strlen($body) > 137) ? substr($body, 0, 137) . "..." : $body); diff --git a/wppost/wppost.php b/wppost/wppost.php index 23f928bcc..8d14b1701 100644 --- a/wppost/wppost.php +++ b/wppost/wppost.php @@ -221,7 +221,6 @@ function wppost_send(&$a,&$b) { } if ($wp_username && $wp_password && $wp_blog) { - require_once 'include/bbcode.php'; require_once 'include/html2plain.php'; $wptitle = trim($b['title']);