]> git.mxchange.org Git - friendica.git/commitdiff
Merge branch 'master' back into develop
authorFabrixxm <fabrix.xm@gmail.com>
Tue, 29 Sep 2015 08:00:13 +0000 (10:00 +0200)
committerFabrixxm <fabrix.xm@gmail.com>
Tue, 29 Sep 2015 08:00:13 +0000 (10:00 +0200)
1  2 
include/items.php

index 40409bb8974748b4fcd5e5775ac0b1ce33bd56b2,63782675704f213b98ccbdafa3c63faa7bd7d2dc..2d05488bcd1e8e4b7302e35fe690f1c368128c92
@@@ -1227,10 -1185,37 +1227,15 @@@ function item_store($arr,$force_parent 
        //if((strpos($arr['body'],'<') !== false) || (strpos($arr['body'],'>') !== false))
        //      $arr['body'] = strip_tags($arr['body']);
  
 -
 -      if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
 -              require_once('library/langdet/Text/LanguageDetect.php');
 -              $naked_body = preg_replace('/\[(.+?)\]/','',$arr['body']);
 -              $l = new Text_LanguageDetect;
 -              //$lng = $l->detectConfidence($naked_body);
 -              //$arr['postopts'] = (($lng['language']) ? 'lang=' . $lng['language'] . ';' . $lng['confidence'] : '');
 -              $lng = $l->detect($naked_body, 3);
 -
 -              if (sizeof($lng) > 0) {
 -                      $postopts = "";
 -
 -                      foreach ($lng as $language => $score) {
 -                              if ($postopts == "")
 -                                      $postopts = "lang=";
 -                              else
 -                                      $postopts .= ":";
 -
 -                              $postopts .= $language.";".$score;
 -                      }
 -                      $arr['postopts'] = $postopts;
 -              }
 -      }
 +      item_add_language_opt($arr);
  
+       if ($notify)
+               $guid_prefix = "";
+       else
+               $guid_prefix = $arr['network'];
        $arr['wall']          = ((x($arr,'wall'))          ? intval($arr['wall'])                : 0);
-       $arr['guid']          = ((x($arr,'guid'))          ? notags(trim($arr['guid']))          : get_guid(32, $arr['network']));
+       $arr['guid']          = ((x($arr,'guid'))          ? notags(trim($arr['guid']))          : get_guid(32, $guid_prefix));
        $arr['uri']           = ((x($arr,'uri'))           ? notags(trim($arr['uri']))           : $arr['guid']);
        $arr['extid']         = ((x($arr,'extid'))         ? notags(trim($arr['extid']))         : '');
        $arr['author-name']   = ((x($arr,'author-name'))   ? notags(trim($arr['author-name']))   : '');