]> git.mxchange.org Git - friendica.git/commitdiff
Merge remote-tracking branch 'upstream/develop' into 1506-tag-users
authorMichael Vogel <icarus@dabo.de>
Tue, 2 Jun 2015 21:19:00 +0000 (23:19 +0200)
committerMichael Vogel <icarus@dabo.de>
Tue, 2 Jun 2015 21:19:00 +0000 (23:19 +0200)
1  2 
mod/item.php

diff --combined mod/item.php
index 3b08fb3f93310fac8537017cd6ed7cb966d6d709,b104663e9e34448be70e5ab30408688db4aab424..45b86c31001f5083f25e019c0f5ec13d19ee695f
@@@ -565,23 -565,21 +565,23 @@@ function item_post(&$a) 
  
        $tags = get_tags($body);
  
 -      /**
 -       * add a statusnet style reply tag if the original post was from there
 -       * and we are replying, and there isn't one already
 -       */
 +      if($parent) {
 +              /**
 +               * add a statusnet style reply tag if the original post was from there
 +               * and we are replying, and there isn't one already
 +               */
 +
 +              if ($parent_contact['id'] != "")
 +                      $contact = '@'.$parent_contact['nick'].'+'.$parent_contact['id'];
 +              //elseif ($parent_contact['addr'] != "")
 +              //      $contact = '@'.$parent_contact['addr'];
 +              else
 +                      $contact = '@[url='.$parent_contact['url'].']'.$parent_contact['nick'].'[/url]';
  
 -      if ($parent_contact['id'] != "")
 -              $contact = '@'.$parent_contact['nick'].'+'.$parent_contact['id'];
 -      //elseif ($parent_contact['addr'] != "")
 -      //      $contact = '@'.$parent_contact['addr'];
 -      else
 -              $contact = '@[url='.$parent_contact['url'].']'.$parent_contact['nick'].'[/url]';
 +              if (!in_array($contact,$tags)) {
 +                      if ($parent_contact['network'] === NETWORK_OSTATUS)
 +                              $body = $contact.' '.$body;
  
 -      if ($parent_contact && ($parent_contact['network'] === NETWORK_OSTATUS)) {
 -              if (($parent_contact['nick']) && (!in_array($contact,$tags))) {
 -                      $body = $contact.' '.$body;
                        $tags[] = $contact;
                }
  
                        $toplevel_contact = '@[url='.$toplevel_parent[0]['author-link'].']'.$toplevel_parent[0]['author-name'].'[/url]';
                }
  
 -              if ($toplevel_contact != "")
 -                      if (!in_array($toplevel_contact,$tags))
 -                              $tags[] = $toplevel_contact;
 +              if (!in_array($toplevel_contact,$tags))
 +                      $tags[] = $toplevel_contact;
        }
  
        $tagged = array();
                // NOTREACHED
        }
  
+       // Store the guid and other relevant data
+       add_guid($datarray);
        $post_id = $r[0]['id'];
        logger('mod_item: saved item ' . $post_id);