]> git.mxchange.org Git - friendica.git/blobdiff - include/items.php
Merge pull request #3976 from rabuzarus/20171126_-_acl_forum
[friendica.git] / include / items.php
index b2519153472dd6f008462954527010df040dc99d..cffa127288de60037a16d7bd790d1797f59d3861 100644 (file)
@@ -207,7 +207,8 @@ function add_page_info_data($data) {
                $preview = str_replace(array("[", "]"), array("[", "]"), htmlentities($data["images"][0]["src"], ENT_QUOTES, 'UTF-8', false));
                // if the preview picture is larger than 500 pixels then show it in a larger mode
                // But only, if the picture isn't higher than large (To prevent huge posts)
-               if (($data["images"][0]["width"] >= 500) && ($data["images"][0]["width"] >= $data["images"][0]["height"])) {
+               if (!Config::get('system', 'always_show_preview') && ($data["images"][0]["width"] >= 500)
+                       && ($data["images"][0]["width"] >= $data["images"][0]["height"])) {
                        $text .= " image='".$preview."'";
                } else {
                        $text .= " preview='".$preview."'";
@@ -426,7 +427,7 @@ function uri_to_guid($uri, $host = "") {
  * @return array Item array with removed conversation data
  */
 function store_conversation($arr) {
-       if (in_array($arr['network'], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS))) {
+       if (in_array($arr['network'], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS)) && !empty($arr['uri'])) {
                $conversation = array('item-uri' => $arr['uri'], 'received' => DBM::date());
 
                if (isset($arr['parent-uri']) && ($arr['parent-uri'] != $arr['uri'])) {