X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Ftext.php;h=43b321e98a01f503ce960e8ae91e32b0eb3310c3;hb=091c3e75ca1303dda06d2b5434d4ca4623dc622b;hp=00cbc2b5926020614c053e406deb3003b2f332d5;hpb=9a0c37eb47cde20f532d7dcac583ca95a8cd4d24;p=friendica.git
diff --git a/include/text.php b/include/text.php
index 00cbc2b592..43b321e98a 100644
--- a/include/text.php
+++ b/include/text.php
@@ -2,6 +2,7 @@
require_once("include/template_processor.php");
require_once("include/friendica_smarty.php");
+require_once("mod/proxy.php");
if(! function_exists('replace_macros')) {
/**
@@ -275,17 +276,17 @@ function paginate_data(&$a, $count=null) {
$stripped = trim($stripped,'/');
$pagenum = $a->pager['page'];
- if (($a->page_offset != "") AND !strstr($stripped, "&offset="))
+ if (($a->page_offset != "") AND !preg_match('/[?&].offset=/', $stripped))
$stripped .= "&offset=".urlencode($a->page_offset);
- if (!strpos($stripped, "?")) {
- if ($pos = strpos($stripped, "&"))
- $stripped = substr($stripped, 0, $pos)."?".substr($stripped, $pos + 1);
- }
$url = $a->get_baseurl() . '/' . $stripped;
$data = array();
function _l(&$d, $name, $url, $text, $class="") {
+ if (!strpos($url, "?")) {
+ if ($pos = strpos($url, "&"))
+ $url = substr($url, 0, $pos)."?".substr($url, $pos + 1);
+ }
$d[$name] = array('url'=>$url, 'text'=>$text, 'class'=>$class);
}
@@ -928,7 +929,7 @@ function micropro($contact, $redirect = false, $class = '', $textmode = false) {
. (($click) ? ' fakelink' : '') . '" '
. (($redir) ? ' target="redir" ' : '')
. (($url) ? ' href="' . $url . '"' : '') . $click . ' >' . "\r\n";
}
}}
@@ -1109,7 +1110,8 @@ function smilies($s, $sample = false) {
':like',
':dislike',
'~friendica',
- 'red#'
+ 'red#',
+ 'red#matrix'
);
@@ -1147,7 +1149,8 @@ function smilies($s, $sample = false) {
'',
'',
'~friendica ',
- 'red '
+ 'redmatrix',
+ 'redmatrix'
);
$params = array('texts' => $texts, 'icons' => $icons, 'string' => $s);
@@ -1330,8 +1333,7 @@ function prepare_body(&$item,$attach = false, $preview = false) {
$item['mentions'] = $mentions;
- //$cachefile = get_cachefile($item["guid"]."-".strtotime($item["edited"])."-".hash("crc32", $item['body']));
- $cachefile = get_cachefile($item["guid"]."-".hash("md5", $item['body']));
+ $cachefile = get_cachefile(urlencode($item["guid"])."-".hash("md5", $item['body']));
if (($cachefile != '')) {
if (file_exists($cachefile)) {
@@ -1503,7 +1505,7 @@ function prepare_text($text) {
else
$s = smilies(bbcode($text));
- return $s;
+ return trim($s);
}}