aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-09-18 19:04:11 -0700
committerFriendika <info@friendika.com>2011-09-18 19:04:11 -0700
commit8bf6a29d4e05af5d461da3f01999785dc12ee7da (patch)
treee8d52eee1c8f60fda836edebd685726be930d946 /include
parente2e29b2deafffb98d156fb3f726a3968b3492522 (diff)
downloadvolse-hubzilla-8bf6a29d4e05af5d461da3f01999785dc12ee7da.tar.gz
volse-hubzilla-8bf6a29d4e05af5d461da3f01999785dc12ee7da.tar.bz2
volse-hubzilla-8bf6a29d4e05af5d461da3f01999785dc12ee7da.zip
optimise the commented date view
Diffstat (limited to 'include')
-rw-r--r--include/items.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/items.php b/include/items.php
index 735adc717..b433381a7 100644
--- a/include/items.php
+++ b/include/items.php
@@ -717,6 +717,7 @@ function item_store($arr,$force_parent = false) {
$arr['owner-avatar'] = ((x($arr,'owner-avatar')) ? notags(trim($arr['owner-avatar'])) : '');
$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['commented'] = datetime_convert();
$arr['received'] = datetime_convert();
$arr['changed'] = datetime_convert();
$arr['title'] = ((x($arr,'title')) ? notags(trim($arr['title'])) : '');
@@ -865,9 +866,10 @@ function item_store($arr,$force_parent = false) {
intval($current_post)
);
- // update the timestamp on the parent
+ // update the commented timestamp on the parent
- q("UPDATE `item` set `changed` = '%s' WHERE `id` = %d LIMIT 1",
+ q("UPDATE `item` set `commented` = '%s', `changed` = '%s' WHERE `id` = %d LIMIT 1",
+ dbesc(datetime_convert()),
dbesc(datetime_convert()),
intval($parent_id)
);