diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/conversation.php | 10 | ||||
-rwxr-xr-x | include/items.php | 3 |
2 files changed, 13 insertions, 0 deletions
diff --git a/include/conversation.php b/include/conversation.php index ce8f5779c..25a2911e9 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -242,6 +242,16 @@ function localize_item(&$item){ } } + // add sparkle links to appropriate permalinks + + $x = stristr($item['plink'],'/display/'); + if($x) { + $sparkle = false; + $y = best_link_url($item,$sparkle,true); + if(strstr($y,'/redir/')) + $item['plink'] = $y . '?f=&url=' . $item['plink']; + } + } diff --git a/include/items.php b/include/items.php index 5094c60c2..bc1346e92 100755 --- a/include/items.php +++ b/include/items.php @@ -826,6 +826,9 @@ function item_store($arr,$force_parent = false) { if((strpos($arr['body'],'<') !== false) || (strpos($arr['body'],'>') !== false)) $arr['body'] = strip_tags($arr['body']); + require_once('include/language.php'); + $arr['lang'] = detect_language($arr['body']); + $arr['wall'] = ((x($arr,'wall')) ? intval($arr['wall']) : 0); $arr['uri'] = ((x($arr,'uri')) ? notags(trim($arr['uri'])) : random_string()); |