aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-09-13 22:57:31 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-09-13 22:57:31 -0700
commitc5031139ebb46ce4994d3bd62059ae4eaba71359 (patch)
treeaadb065cbaf0fbf788b6f4fdd7a5e1a332ba7373 /include/items.php
parent38fde6672eb3d46b8b154ba2f22df99f91f64852 (diff)
downloadvolse-hubzilla-c5031139ebb46ce4994d3bd62059ae4eaba71359.tar.gz
volse-hubzilla-c5031139ebb46ce4994d3bd62059ae4eaba71359.tar.bz2
volse-hubzilla-c5031139ebb46ce4994d3bd62059ae4eaba71359.zip
abstractify items, check photos for birthday paradox
Diffstat (limited to 'include/items.php')
-rw-r--r--include/items.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/items.php b/include/items.php
index dbe6493d4..f85a0e64b 100644
--- a/include/items.php
+++ b/include/items.php
@@ -308,7 +308,7 @@ function get_atom_elements($item) {
return $res;
}
-function post_remote($a,$arr) {
+function item_store($arr) {
//print_r($arr);
@@ -330,14 +330,14 @@ function post_remote($a,$arr) {
$arr['owner-name'] = notags(trim($arr['owner-name']));
$arr['owner-link'] = notags(trim($arr['owner-link']));
$arr['owner-avatar'] = notags(trim($arr['owner-avatar']));
- $arr['created'] = datetime_convert('UTC','UTC',$arr['created'],'Y-m-d H:i:s');
- $arr['edited'] = datetime_convert('UTC','UTC',$arr['edited'],'Y-m-d H:i:s');
+ $arr['created'] = ((x($arr,'created') !== false) ? datetime_convert('UTC','UTC',$arr['created']) : datetime_convert());
+ $arr['edited'] = ((x($arr,'edited') !== false) ? datetime_convert('UTC','UTC',$arr['edited']) : datetime_convert());
$arr['changed'] = datetime_convert();
$arr['title'] = notags(trim($arr['title']));
$arr['location'] = notags(trim($arr['location']));
$arr['body'] = escape_tags(trim($arr['body']));
$arr['last-child'] = intval($arr['last-child']);
- $arr['visible'] = 1;
+ $arr['visible'] = ((x($arr,'visible') !== false) ? intval($arr['visible']) : 1);
$arr['deleted'] = 0;
$arr['parent-uri'] = notags(trim($arr['parent-uri']));
$arr['verb'] = notags(trim($arr['verb']));