$item['uri-hash'] = $existing['uri-hash'];
}
- self::addLanguageToItemArray($item);
-
$item['wall'] = intval(defaults($item, 'wall', 0));
$item['extid'] = trim(defaults($item, 'extid', ''));
$item['author-name'] = trim(defaults($item, 'author-name', ''));
return 0;
}
+ self::addLanguageToItemArray($item);
+
// Items cannot be stored before they happen ...
if ($item['created'] > DateTimeFormat::utcNow()) {
$item['created'] = DateTimeFormat::utcNow();
*/
private static function addLanguageToItemArray(&$item)
{
- // @TODO Find out why body can be empty here
- $item['body'] = defaults($item, 'body', '');
-
$naked_body = BBCode::toPlaintext($item['body'], false);
$ld = new Text_LanguageDetect();