Making the new reshare method optional
This commit is contained in:
parent
c0376339e0
commit
5dbf89be88
2 changed files with 20 additions and 8 deletions
|
@ -91,3 +91,6 @@ $a->config['system']['lockpath'] = "";
|
||||||
|
|
||||||
// If enabled, the MyBB fulltext engine is used
|
// If enabled, the MyBB fulltext engine is used
|
||||||
// $a->config['system']['use_fulltext_engine'] = true;
|
// $a->config['system']['use_fulltext_engine'] = true;
|
||||||
|
|
||||||
|
// Let reshared messages look like wall-to-wall posts
|
||||||
|
// $a->config['system']['diaspora_newreshare'] = true;
|
||||||
|
|
|
@ -963,8 +963,8 @@ function diaspora_reshare($importer,$xml,$msg) {
|
||||||
$details = '[url=' . $person['url'] . ']' . $person['name'] . '[/url]';
|
$details = '[url=' . $person['url'] . ']' . $person['name'] . '[/url]';
|
||||||
else
|
else
|
||||||
$details = $orig_author;
|
$details = $orig_author;
|
||||||
|
|
||||||
$prefix = html_entity_decode("♲ ", ENT_QUOTES, 'UTF-8') . $details . "\n";
|
$prefix = html_entity_decode("♲ ", ENT_QUOTES, 'UTF-8') . $details . "\n";
|
||||||
|
|
||||||
|
|
||||||
// allocate a guid on our system - we aren't fixing any collisions.
|
// 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-name'] = $contact['name'];
|
||||||
$datarray['owner-link'] = $contact['url'];
|
$datarray['owner-link'] = $contact['url'];
|
||||||
$datarray['owner-avatar'] = ((x($contact,'thumb')) ? $contact['thumb'] : $contact['photo']);
|
$datarray['owner-avatar'] = ((x($contact,'thumb')) ? $contact['thumb'] : $contact['photo']);
|
||||||
$datarray['author-name'] = $person['name']; // Let reshared messages look like wall-to-wall posts
|
if (intval(get_config('system','diaspora_newreshare'))) {
|
||||||
$datarray['author-link'] = $person['url']; // we have to set an additional value in the item in the future
|
// Let reshared messages look like wall-to-wall posts
|
||||||
// $datarray['author-avatar'] = $person['thumb']; // to distinct the wall-to-wall-posts from reshared/repeated messages
|
// we have to set an additional value in the item in the future
|
||||||
$datarray['author-avatar'] = ((x($person,'thumb')) ? $person['thumb'] : $person['photo']);
|
// to distinct the wall-to-wall-posts from reshared/repeated messages
|
||||||
// $datarray['body'] = $prefix . $body;
|
$datarray['author-name'] = $person['name'];
|
||||||
$datarray['body'] = $body;
|
$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['tag'] = $str_tags;
|
||||||
$datarray['app'] = 'Diaspora';
|
$datarray['app'] = 'Diaspora';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue