mirror of
https://github.com/friendica/friendica
synced 2025-04-27 18:30:12 +00:00
Refactor bbcode() into BBCode::convert()
This commit is contained in:
parent
29f5270313
commit
0c52866693
21 changed files with 89 additions and 73 deletions
|
@ -7,6 +7,7 @@ namespace Friendica\Model;
|
|||
use Friendica\App;
|
||||
use Friendica\Content\Feature;
|
||||
use Friendica\Content\ForumManager;
|
||||
use Friendica\Content\Text\BBCode;
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Cache;
|
||||
use Friendica\Core\Config;
|
||||
|
@ -487,13 +488,13 @@ class Profile
|
|||
}
|
||||
|
||||
if (isset($p['about'])) {
|
||||
$p['about'] = bbcode($p['about']);
|
||||
$p['about'] = BBCode::convert($p['about']);
|
||||
}
|
||||
|
||||
if (isset($p['address'])) {
|
||||
$p['address'] = bbcode($p['address']);
|
||||
$p['address'] = BBCode::convert($p['address']);
|
||||
} else {
|
||||
$p['address'] = bbcode($p['location']);
|
||||
$p['address'] = BBCode::convert($p['location']);
|
||||
}
|
||||
|
||||
if (isset($p['photo'])) {
|
||||
|
@ -667,13 +668,13 @@ class Profile
|
|||
$istoday = true;
|
||||
}
|
||||
|
||||
$title = strip_tags(html_entity_decode(bbcode($rr['summary']), ENT_QUOTES, 'UTF-8'));
|
||||
$title = strip_tags(html_entity_decode(BBCode::convert($rr['summary']), ENT_QUOTES, 'UTF-8'));
|
||||
|
||||
if (strlen($title) > 35) {
|
||||
$title = substr($title, 0, 32) . '... ';
|
||||
}
|
||||
|
||||
$description = substr(strip_tags(bbcode($rr['desc'])), 0, 32) . '... ';
|
||||
$description = substr(strip_tags(BBCode::convert($rr['desc'])), 0, 32) . '... ';
|
||||
if (!$description) {
|
||||
$description = L10n::t('[No description]');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue