X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Ftext.php;h=c4249f86c49acc47d245163f3eed9bd3787ff866;hb=a09c5b692c41067512022448d14875385a3aa142;hp=ee83345c09954bc3cb351441ac6a3ff03e561149;hpb=d4a02dc31408210ab9f67ecac1948dc22b95b8da;p=friendica.git diff --git a/include/text.php b/include/text.php index ee83345c09..c4249f86c4 100644 --- a/include/text.php +++ b/include/text.php @@ -4,33 +4,14 @@ */ use Friendica\App; -use Friendica\Content\ContactSelector; -use Friendica\Content\Feature; use Friendica\Content\Smilies; use Friendica\Content\Text\BBCode; -use Friendica\Core\Addon; -use Friendica\Core\Config; -use Friendica\Core\L10n; -use Friendica\Core\PConfig; use Friendica\Core\Protocol; -use Friendica\Core\System; -use Friendica\Database\DBA; use Friendica\Model\Contact; -use Friendica\Model\Event; -use Friendica\Model\Item; -use Friendica\Render\FriendicaSmarty; -use Friendica\Util\DateTimeFormat; -use Friendica\Util\Map; -use Friendica\Util\Proxy as ProxyUtils; -use Friendica\Core\Logger; -use Friendica\Core\Renderer; use Friendica\Model\FileTag; use Friendica\Util\Strings; use Friendica\Util\XML; -use Friendica\Content\Text\HTML; - -require_once "include/conversation.php"; /** * Turn user/group ACLs stored as angle bracketed text into arrays @@ -141,7 +122,7 @@ function qp($s) { */ function redir_private_images($a, &$item) { - $matches = false; + $matches = []; $cnt = preg_match_all('|\[img\](http[^\[]*?/photo/[a-fA-F0-9]+?(-[0-9]\.[\w]+?)?)\[\/img\]|', $item['body'], $matches, PREG_SET_ORDER); if ($cnt) { foreach ($matches as $mtch) { @@ -162,6 +143,7 @@ function redir_private_images($a, &$item) * * @param string $text String with bbcode. * @return string Formattet HTML. + * @throws \Friendica\Network\HTTPException\InternalServerErrorException */ function prepare_text($text) { if (stristr($text, '[nosmile]')) { @@ -205,7 +187,7 @@ function get_cats_and_terms($item) $categories = []; $folders = []; - $matches = false; + $matches = []; $first = true; $cnt = preg_match_all('/<(.*?)>/', $item['file'], $matches, PREG_SET_ORDER); if ($cnt) { @@ -226,7 +208,7 @@ function get_cats_and_terms($item) } if (local_user() == $item['uid']) { - $matches = false; + $matches = []; $first = true; $cnt = preg_match_all('/\[(.*?)\]/', $item['file'], $matches, PREG_SET_ORDER); if ($cnt) { @@ -253,7 +235,7 @@ function get_cats_and_terms($item) /** * return number of bytes in size (K, M, G) * @param string $size_str - * @return number + * @return int */ function return_bytes($size_str) { switch (substr ($size_str, -1)) {