return $body;
}
-function add_guid($item) {
- $r = q("SELECT `guid` FROM `guid` WHERE `guid` = '%s' LIMIT 1", dbesc($item["guid"]));
- if ($r)
- return;
-
- q("INSERT INTO `guid` (`guid`,`plink`,`uri`,`network`) VALUES ('%s','%s','%s','%s')",
- dbesc($item["guid"]), dbesc($item["plink"]),
- dbesc($item["uri"]), dbesc($item["network"]));
-}
-
/**
* Adds a "lang" specification in a "postopts" element of given $arr,
* if possible and not already present.
$arr['inform'] = ((x($arr,'inform')) ? trim($arr['inform']) : '');
$arr['file'] = ((x($arr,'file')) ? trim($arr['file']) : '');
+
+ if (($arr['author-link'] == "") AND ($arr['owner-link'] == ""))
+ logger("Both author-link and owner-link are empty. Called by: ".App::callstack(), LOGGER_DEBUG);
+
if ($arr['plink'] == "") {
$a = get_app();
$arr['plink'] = $a->get_baseurl().'/display/'.urlencode($arr['guid']);
return 0;
} elseif(count($r)) {
- // Store the guid and other relevant data
- add_guid($arr);
-
$current_post = $r[0]['id'];
logger('item_store: created item ' . $current_post);
logger('item_store: new item not found in DB, id ' . $current_post);
}
- // Add every contact of the post to the global contact table
- poco_store($arr);
-
create_tags_from_item($current_post);
create_files_from_item($current_post);