From: Fabrixxm Date: Tue, 29 Sep 2015 08:00:13 +0000 (+0200) Subject: Merge branch 'master' back into develop X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=880dda42571a4d1b7792f9ffb03d3a43331aabca;p=friendica.git Merge branch 'master' back into develop --- 880dda42571a4d1b7792f9ffb03d3a43331aabca diff --cc include/items.php index 40409bb897,6378267570..2d05488bcd --- a/include/items.php +++ b/include/items.php @@@ -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'])) : '');