X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Ftext.php;h=66d4f17ea66ac5b20ef9c486f207d23dfa65e68a;hb=5d0e7d24babf345431df73472fc0d1c7c80996f9;hp=1d1515c17777b88e6b83b5d07008637f62da1783;hpb=cdc41d6018e8e564b545e3c2eb6c77602c5ff2b4;p=friendica.git
diff --git a/include/text.php b/include/text.php
index 1d1515c177..66d4f17ea6 100644
--- a/include/text.php
+++ b/include/text.php
@@ -1,6 +1,7 @@
template_engine();
try {
@@ -747,7 +748,7 @@ function logger($msg, $level = 0) {
$callers = debug_backtrace();
$logline = sprintf("%s@%s\t[%s]:%s:%s:%s\t%s\n",
- datetime_convert(),
+ datetime_convert('UTC', 'UTC', 'now', 'Y-m-d\TH:i:s\Z'),
$process_id,
$LOGGER_LEVELS[$level],
basename($callers[0]['file']),
@@ -1311,7 +1312,7 @@ function prepare_body(&$item, $attach = false, $preview = false) {
$a = get_app();
call_hooks('prepare_body_init', $item);
- $searchpath = z_root() . "/search?tag=";
+ $searchpath = System::baseUrl() . "/search?tag=";
$tags = array();
$hashtags = array();
@@ -1326,7 +1327,14 @@ function prepare_body(&$item, $attach = false, $preview = false) {
$tag["url"] = $searchpath.strtolower($tag["term"]);
}
+ $orig_tag = $tag["url"];
+
+ $tag["url"] = best_link_url($item, $sp, $tag["url"]);
+
if ($tag["type"] == TERM_HASHTAG) {
+ if ($orig_tag != $tag["url"]) {
+ $item['body'] = str_replace($orig_tag, $tag["url"], $item['body']);
+ }
$hashtags[] = "#".$tag["term"]."";
$prefix = "#";
} elseif ($tag["type"] == TERM_MENTION) {
@@ -1386,10 +1394,10 @@ function prepare_body(&$item, $attach = false, $preview = false) {
if (!$vhead) {
$vhead = true;
$a->page['htmlhead'] .= replace_macros(get_markup_template('videos_head.tpl'), array(
- '$baseurl' => z_root(),
+ '$baseurl' => System::baseUrl(),
));
$a->page['end'] .= replace_macros(get_markup_template('videos_end.tpl'), array(
- '$baseurl' => z_root(),
+ '$baseurl' => System::baseUrl(),
));
}
@@ -1416,14 +1424,8 @@ function prepare_body(&$item, $attach = false, $preview = false) {
$title = ((strlen(trim($mtch[4]))) ? escape_tags(trim($mtch[4])) : escape_tags($mtch[1]));
$title .= ' ' . $mtch[2] . ' ' . t('bytes');
- if (($filetype == 'image') AND ($item['network'] == NETWORK_OSTATUS)) {
- $icon = '';
- $s .= '
' . $icon . '';
- } else {
- $icon = '