]> git.mxchange.org Git - friendica.git/commitdiff
Making the new reshare method optional
authorMichael Vogel <icarus@dabo.de>
Sat, 17 Nov 2012 15:27:49 +0000 (16:27 +0100)
committerMichael Vogel <icarus@dabo.de>
Sat, 17 Nov 2012 15:27:49 +0000 (16:27 +0100)
htconfig.php
include/diaspora.php

index ab9a7ca506e45d0a6d707a6e5903a4795066fef7..bb0f47727ab289aab61e6ddaeda97eb8e20f0482 100644 (file)
@@ -91,3 +91,6 @@ $a->config['system']['lockpath'] = "";
 
 // If enabled, the MyBB fulltext engine is used
 // $a->config['system']['use_fulltext_engine'] = true;
+
+// Let reshared messages look like wall-to-wall posts
+// $a->config['system']['diaspora_newreshare'] = true;
index 6a8d4a3581936fe6a3d8e9586eaabf09cbac0e62..c2b2fbcf4e1a71753b1a140ca1d48e5ba4e9678e 100755 (executable)
@@ -963,8 +963,8 @@ function diaspora_reshare($importer,$xml,$msg) {
                $details = '[url=' . $person['url'] . ']' . $person['name'] . '[/url]';
        else
                $details = $orig_author;
-       
-       $prefix = html_entity_decode("&#x2672; ", ENT_QUOTES, 'UTF-8') . $details . "\n"; 
+
+       $prefix = html_entity_decode("&#x2672; ", ENT_QUOTES, 'UTF-8') . $details . "\n";
 
 
        // allocate a guid on our system - we aren't fixing any collisions.
@@ -1023,12 +1023,21 @@ function diaspora_reshare($importer,$xml,$msg) {
        $datarray['owner-name'] = $contact['name'];
        $datarray['owner-link'] = $contact['url'];
        $datarray['owner-avatar'] = ((x($contact,'thumb')) ? $contact['thumb'] : $contact['photo']);
-       $datarray['author-name'] = $person['name']; // Let reshared messages look like wall-to-wall posts
-       $datarray['author-link'] = $person['url']; // we have to set an additional value in the item in the future
-       // $datarray['author-avatar'] = $person['thumb']; // to distinct the wall-to-wall-posts from reshared/repeated messages
-       $datarray['author-avatar'] = ((x($person,'thumb')) ? $person['thumb'] : $person['photo']);
-       // $datarray['body'] = $prefix . $body;
-       $datarray['body'] = $body;
+       if (intval(get_config('system','diaspora_newreshare'))) {
+               // Let reshared messages look like wall-to-wall posts
+               // we have to set an additional value in the item in the future
+               // to distinct the wall-to-wall-posts from reshared/repeated messages
+               $datarray['author-name'] = $person['name'];
+               $datarray['author-link'] = $person['url'];
+               $datarray['author-avatar'] = ((x($person,'thumb')) ? $person['thumb'] : $person['photo']);
+               $datarray['body'] = $body;
+       } else {
+               $datarray['author-name'] = $contact['name'];
+               $datarray['author-link'] = $contact['url'];
+               $datarray['author-avatar'] = $contact['thumb'];
+               $datarray['body'] = $prefix . $body;
+       }
+
        $datarray['tag'] = $str_tags;
        $datarray['app']  = 'Diaspora';