Merge branch 'origin' into 'master'
Update 4.4.1 See merge request harukin/core!63
This commit is contained in:
@@ -1580,7 +1580,9 @@ function format_hashtags(&$item) {
|
||||
$term = htmlspecialchars($t['term'], ENT_COMPAT, 'UTF-8', false) ;
|
||||
if(! trim($term))
|
||||
continue;
|
||||
if($t['url'] && strpos($item['body'], $t['url']))
|
||||
if(empty($t['url']))
|
||||
continue;
|
||||
if(strpos($item['body'], $t['url']) || stripos($item['body'], '#' . $t['term']))
|
||||
continue;
|
||||
if($s)
|
||||
$s .= ' ';
|
||||
@@ -2464,8 +2466,8 @@ function magic_link($s) {
|
||||
* @param boolean $escape (optional) default false
|
||||
*/
|
||||
function stringify_array_elms(&$arr, $escape = false) {
|
||||
for($x = 0; $x < count($arr); $x ++)
|
||||
$arr[$x] = "'" . (($escape) ? dbesc($arr[$x]) : $arr[$x]) . "'";
|
||||
foreach($arr as $k => $v)
|
||||
$arr[$k] = "'" . (($escape) ? dbesc($v) : $v) . "'";
|
||||
}
|
||||
|
||||
|
||||
@@ -3113,6 +3115,15 @@ function item_url_replace($channel,&$item,$old,$new,$oldnick = '') {
|
||||
if($oldnick)
|
||||
$item['llink'] = str_replace('/' . $oldnick . '/' ,'/' . $channel['channel_address'] . '/' ,$item['llink']);
|
||||
|
||||
if($item['term']) {
|
||||
for($x = 0; $x < count($item['term']); $x ++) {
|
||||
$item['term'][$x]['url'] = str_replace($old,$new,$item['term'][$x]['url']);
|
||||
if ($oldnick) {
|
||||
$item['term'][$x]['url'] = str_replace('/' . $oldnick . '/' ,'/' . $channel['channel_address'] . '/' ,$item['term'][$x]['url']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user