]> git.mxchange.org Git - friendica.git/blobdiff - include/items.php
New option to enable and disable the "share" element
[friendica.git] / include / items.php
index b5e6062b23f7c55eebf6ffdc1aab09a84b348eff..65c04f0a2f3ee238e7554c7475174c37d3a71d2a 100755 (executable)
@@ -808,20 +808,22 @@ function get_atom_elements($feed,$item) {
                if (($name != "") and ($uri != "") and ($avatar != "") and ($message != "")) {
                        logger('get_atom_elements: fixing sender of repeated message.');
 
-                       /*$res["owner-name"] = $res["author-name"];
-                       $res["owner-link"] = $res["author-link"];
-                       $res["owner-avatar"] = $res["author-avatar"];
-
-                       $res["author-name"] = $name;
-                       $res["author-link"] = $uri;
-                       $res["author-avatar"] = $avatar;*/
-
-                       $prefix = "[share author='".$name.
-                                       "' profile='".$uri.
-                                       "' avatar='".$avatar.
-                                       "' link='".$orig_uri."']";
-
-                       $res["body"] = $prefix.html2bbcode($message)."[/share]";
+                       if (intval(get_config('system','new_share'))) {
+                               $prefix = "[share author='".$name.
+                                               "' profile='".$uri.
+                                               "' avatar='".$avatar.
+                                               "' link='".$orig_uri."']";
+
+                               $res["body"] = $prefix.html2bbcode($message)."[/share]";
+                       } else {
+                               $res["owner-name"] = $res["author-name"];
+                               $res["owner-link"] = $res["author-link"];
+                               $res["owner-avatar"] = $res["author-avatar"];
+
+                               $res["author-name"] = $name;
+                               $res["author-link"] = $uri;
+                               $res["author-avatar"] = $avatar;
+                       }
                }
        }