]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/ItemContent.php
Some more notices (#5526)
[friendica.git] / src / Model / ItemContent.php
index fe256d3e76f6b81f8f73f2dfc0e10c7b8d01fdcc..c17625a7565aeb84a03991f5a13023a102ed3085 100644 (file)
@@ -93,7 +93,7 @@ class ItemContent extends BaseObject
                        }
                }
 
-               $html = Text\BBCode::convert($post['text'] . $post['after'], false, $htmlmode);
+               $html = Text\BBCode::convert($post['text'] . defaults($post, 'after', ''), false, $htmlmode);
                $msg = Text\HTML::toPlaintext($html, 0, true);
                $msg = trim(html_entity_decode($msg, ENT_QUOTES, 'UTF-8'));
 
@@ -102,7 +102,7 @@ class ItemContent extends BaseObject
                        if ($post['type'] == 'link') {
                                $link = $post['url'];
                        } elseif ($post['type'] == 'text') {
-                               $link = $post['url'];
+                               $link = defaults($post, 'url', '');
                        } elseif ($post['type'] == 'video') {
                                $link = $post['url'];
                        } elseif ($post['type'] == 'photo') {
@@ -160,9 +160,8 @@ class ItemContent extends BaseObject
                                } elseif (!isset($post['url'])) {
                                        $limit = $limit - 23;
                                        $post['url'] = $item['plink'];
-                                       // Which purpose has this line? It is now uncommented, but left as a reminder
-                                       //} elseif (strpos($b['body'], '[share') !== false) {
-                                       //      $post['url'] = $b['plink'];
+                               } elseif (strpos($item['body'], '[share') !== false) {
+                                       $post['url'] = $item['plink'];
                                } elseif (PConfig::get($item['uid'], 'system', 'no_intelligent_shortening')) {
                                        $post['url'] = $item['plink'];
                                }