parent
c437b0c871
commit
177edd2b6e
|
@ -8,7 +8,7 @@
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\Content\ContactSelector;
|
use Friendica\Content\ContactSelector;
|
||||||
use Friendica\Content\Feature;
|
use Friendica\Content\Feature;
|
||||||
use Friendica\Content\Text\Plaintext;
|
use Friendica\Content\Text\BBCode;
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Addon;
|
||||||
use Friendica\Core\System;
|
use Friendica\Core\System;
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
@ -5196,7 +5196,7 @@ function api_clean_plain_items($Text)
|
||||||
*/
|
*/
|
||||||
function api_clean_attachments($body)
|
function api_clean_attachments($body)
|
||||||
{
|
{
|
||||||
$data = Plaintext::getAttachmentData($body);
|
$data = BBCode::getAttachmentData($body);
|
||||||
|
|
||||||
if (!$data) {
|
if (!$data) {
|
||||||
return $body;
|
return $body;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\Content\Smilies;
|
use Friendica\Content\Smilies;
|
||||||
use Friendica\Content\OEmbed;
|
use Friendica\Content\OEmbed;
|
||||||
use Friendica\Content\Text\Plaintext;
|
use Friendica\Content\Text\BBCode;
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Addon;
|
||||||
use Friendica\Core\Cache;
|
use Friendica\Core\Cache;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
|
@ -57,7 +57,7 @@ function bb_map_location($match) {
|
||||||
*/
|
*/
|
||||||
function bb_attachment($return, $simplehtml = false, $tryoembed = true)
|
function bb_attachment($return, $simplehtml = false, $tryoembed = true)
|
||||||
{
|
{
|
||||||
$data = Plaintext::getAttachmentData($return);
|
$data = BBCode::getAttachmentData($return);
|
||||||
if (!$data) {
|
if (!$data) {
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
@ -120,7 +120,7 @@ function bb_attachment($return, $simplehtml = false, $tryoembed = true)
|
||||||
|
|
||||||
function bb_remove_share_information($Text, $plaintext = false, $nolink = false) {
|
function bb_remove_share_information($Text, $plaintext = false, $nolink = false) {
|
||||||
|
|
||||||
$data = Plaintext::getAttachmentData($Text);
|
$data = BBCode::getAttachmentData($Text);
|
||||||
|
|
||||||
if (!$data) {
|
if (!$data) {
|
||||||
return $Text;
|
return $Text;
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
* information.
|
* information.
|
||||||
*/
|
*/
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\Content\Text\Plaintext;
|
use Friendica\Content\Text\BBCode;
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Addon;
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
|
@ -507,7 +507,7 @@ function item_post(App $a) {
|
||||||
// embedded bookmark or attachment in post? set bookmark flag
|
// embedded bookmark or attachment in post? set bookmark flag
|
||||||
|
|
||||||
$bookmark = 0;
|
$bookmark = 0;
|
||||||
$data = Plaintext::getAttachmentData($body);
|
$data = BBCode::getAttachmentData($body);
|
||||||
if (preg_match_all("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/ism", $body, $match, PREG_SET_ORDER) || isset($data["type"])) {
|
if (preg_match_all("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/ism", $body, $match, PREG_SET_ORDER) || isset($data["type"])) {
|
||||||
$objecttype = ACTIVITY_OBJ_BOOKMARK;
|
$objecttype = ACTIVITY_OBJ_BOOKMARK;
|
||||||
$bookmark = 1;
|
$bookmark = 1;
|
||||||
|
@ -524,7 +524,7 @@ function item_post(App $a) {
|
||||||
// Setting the object type if not defined before
|
// Setting the object type if not defined before
|
||||||
if (!$objecttype) {
|
if (!$objecttype) {
|
||||||
$objecttype = ACTIVITY_OBJ_NOTE; // Default value
|
$objecttype = ACTIVITY_OBJ_NOTE; // Default value
|
||||||
$objectdata = Plaintext::getAttachedData($body);
|
$objectdata = BBCode::getAttachedData($body);
|
||||||
|
|
||||||
if ($objectdata["type"] == "link") {
|
if ($objectdata["type"] == "link") {
|
||||||
$objecttype = ACTIVITY_OBJ_BOOKMARK;
|
$objecttype = ACTIVITY_OBJ_BOOKMARK;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* @file src/Content/Text/Plaintext.php
|
* @file src/Content/Text/BBCode.php
|
||||||
*/
|
*/
|
||||||
namespace Friendica\Content\Text;
|
namespace Friendica\Content\Text;
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ require_once "include/bbcode.php";
|
||||||
require_once "include/html2plain.php";
|
require_once "include/html2plain.php";
|
||||||
require_once "include/network.php";
|
require_once "include/network.php";
|
||||||
|
|
||||||
class Plaintext
|
class BBCode
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @brief Fetches attachment data that were generated the old way
|
* @brief Fetches attachment data that were generated the old way
|
|
@ -5,7 +5,7 @@
|
||||||
namespace Friendica\Protocol;
|
namespace Friendica\Protocol;
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\Content\Text\Plaintext;
|
use Friendica\Content\Text\BBCode;
|
||||||
use Friendica\Core\Cache;
|
use Friendica\Core\Cache;
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
|
@ -1206,7 +1206,7 @@ class OStatus
|
||||||
*/
|
*/
|
||||||
private static function formatPicturePost($body)
|
private static function formatPicturePost($body)
|
||||||
{
|
{
|
||||||
$siteinfo = Plaintext::getAttachedData($body);
|
$siteinfo = BBCode::getAttachedData($body);
|
||||||
|
|
||||||
if (($siteinfo["type"] == "photo")) {
|
if (($siteinfo["type"] == "photo")) {
|
||||||
if (isset($siteinfo["preview"])) {
|
if (isset($siteinfo["preview"])) {
|
||||||
|
@ -1328,7 +1328,7 @@ class OStatus
|
||||||
private static function getAttachment($doc, $root, $item)
|
private static function getAttachment($doc, $root, $item)
|
||||||
{
|
{
|
||||||
$o = "";
|
$o = "";
|
||||||
$siteinfo = Plaintext::getAttachedData($item["body"]);
|
$siteinfo = BBCode::getAttachedData($item["body"]);
|
||||||
|
|
||||||
switch ($siteinfo["type"]) {
|
switch ($siteinfo["type"]) {
|
||||||
case 'photo':
|
case 'photo':
|
||||||
|
|
Loading…
Reference in New Issue
Block a user