//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'])) : '');