mirror of
https://github.com/friendica/friendica
synced 2024-11-17 23:03:41 +00:00
Rename class to BBCode
Rename Plaintext class to BBCode
This commit is contained in:
parent
c437b0c871
commit
177edd2b6e
5 changed files with 13 additions and 13 deletions
|
@ -8,7 +8,7 @@
|
|||
use Friendica\App;
|
||||
use Friendica\Content\ContactSelector;
|
||||
use Friendica\Content\Feature;
|
||||
use Friendica\Content\Text\Plaintext;
|
||||
use Friendica\Content\Text\BBCode;
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Core\Config;
|
||||
|
@ -5196,7 +5196,7 @@ function api_clean_plain_items($Text)
|
|||
*/
|
||||
function api_clean_attachments($body)
|
||||
{
|
||||
$data = Plaintext::getAttachmentData($body);
|
||||
$data = BBCode::getAttachmentData($body);
|
||||
|
||||
if (!$data) {
|
||||
return $body;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
use Friendica\App;
|
||||
use Friendica\Content\Smilies;
|
||||
use Friendica\Content\OEmbed;
|
||||
use Friendica\Content\Text\Plaintext;
|
||||
use Friendica\Content\Text\BBCode;
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Cache;
|
||||
use Friendica\Core\L10n;
|
||||
|
@ -57,7 +57,7 @@ function bb_map_location($match) {
|
|||
*/
|
||||
function bb_attachment($return, $simplehtml = false, $tryoembed = true)
|
||||
{
|
||||
$data = Plaintext::getAttachmentData($return);
|
||||
$data = BBCode::getAttachmentData($return);
|
||||
if (!$data) {
|
||||
return $return;
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ function bb_attachment($return, $simplehtml = false, $tryoembed = true)
|
|||
|
||||
function bb_remove_share_information($Text, $plaintext = false, $nolink = false) {
|
||||
|
||||
$data = Plaintext::getAttachmentData($Text);
|
||||
$data = BBCode::getAttachmentData($Text);
|
||||
|
||||
if (!$data) {
|
||||
return $Text;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* information.
|
||||
*/
|
||||
use Friendica\App;
|
||||
use Friendica\Content\Text\Plaintext;
|
||||
use Friendica\Content\Text\BBCode;
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
|
@ -507,7 +507,7 @@ function item_post(App $a) {
|
|||
// embedded bookmark or attachment in post? set bookmark flag
|
||||
|
||||
$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"])) {
|
||||
$objecttype = ACTIVITY_OBJ_BOOKMARK;
|
||||
$bookmark = 1;
|
||||
|
@ -524,7 +524,7 @@ function item_post(App $a) {
|
|||
// Setting the object type if not defined before
|
||||
if (!$objecttype) {
|
||||
$objecttype = ACTIVITY_OBJ_NOTE; // Default value
|
||||
$objectdata = Plaintext::getAttachedData($body);
|
||||
$objectdata = BBCode::getAttachedData($body);
|
||||
|
||||
if ($objectdata["type"] == "link") {
|
||||
$objecttype = ACTIVITY_OBJ_BOOKMARK;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @file src/Content/Text/Plaintext.php
|
||||
* @file src/Content/Text/BBCode.php
|
||||
*/
|
||||
namespace Friendica\Content\Text;
|
||||
|
||||
|
@ -13,7 +13,7 @@ require_once "include/bbcode.php";
|
|||
require_once "include/html2plain.php";
|
||||
require_once "include/network.php";
|
||||
|
||||
class Plaintext
|
||||
class BBCode
|
||||
{
|
||||
/**
|
||||
* @brief Fetches attachment data that were generated the old way
|
|
@ -5,7 +5,7 @@
|
|||
namespace Friendica\Protocol;
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Content\Text\Plaintext;
|
||||
use Friendica\Content\Text\BBCode;
|
||||
use Friendica\Core\Cache;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
|
@ -1206,7 +1206,7 @@ class OStatus
|
|||
*/
|
||||
private static function formatPicturePost($body)
|
||||
{
|
||||
$siteinfo = Plaintext::getAttachedData($body);
|
||||
$siteinfo = BBCode::getAttachedData($body);
|
||||
|
||||
if (($siteinfo["type"] == "photo")) {
|
||||
if (isset($siteinfo["preview"])) {
|
||||
|
@ -1328,7 +1328,7 @@ class OStatus
|
|||
private static function getAttachment($doc, $root, $item)
|
||||
{
|
||||
$o = "";
|
||||
$siteinfo = Plaintext::getAttachedData($item["body"]);
|
||||
$siteinfo = BBCode::getAttachedData($item["body"]);
|
||||
|
||||
switch ($siteinfo["type"]) {
|
||||
case 'photo':
|
||||
|
|
Loading…
Reference in a new issue