aboutsummaryrefslogtreecommitdiffstats
path: root/mod/item.php
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 /mod/item.php
parente2e29b2deafffb98d156fb3f726a3968b3492522 (diff)
downloadvolse-hubzilla-8bf6a29d4e05af5d461da3f01999785dc12ee7da.tar.gz
volse-hubzilla-8bf6a29d4e05af5d461da3f01999785dc12ee7da.tar.bz2
volse-hubzilla-8bf6a29d4e05af5d461da3f01999785dc12ee7da.zip
optimise the commented date view
Diffstat (limited to 'mod/item.php')
-rw-r--r--mod/item.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/mod/item.php b/mod/item.php
index 38f4c2040..cad72122b 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -501,6 +501,7 @@ function item_post(&$a) {
$datarray['author-avatar'] = $author['thumb'];
$datarray['created'] = datetime_convert();
$datarray['edited'] = datetime_convert();
+ $datarray['commented'] = datetime_convert();
$datarray['received'] = datetime_convert();
$datarray['changed'] = datetime_convert();
$datarray['uri'] = $uri;
@@ -561,9 +562,9 @@ function item_post(&$a) {
$r = q("INSERT INTO `item` (`guid`, `uid`,`type`,`wall`,`gravity`,`contact-id`,`owner-name`,`owner-link`,`owner-avatar`,
- `author-name`, `author-link`, `author-avatar`, `created`, `edited`, `received`, `changed`, `uri`, `thr-parent`, `title`, `body`, `app`, `location`, `coord`,
+ `author-name`, `author-link`, `author-avatar`, `created`, `edited`, `commented`, `received`, `changed`, `uri`, `thr-parent`, `title`, `body`, `app`, `location`, `coord`,
`tag`, `inform`, `verb`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid`, `private`, `pubmail`, `attach`, `bookmark` )
- VALUES( '%s', %d, '%s', %d, %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', %d )",
+ VALUES( '%s', %d, '%s', %d, %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', %d )",
dbesc($datarray['guid']),
intval($datarray['uid']),
dbesc($datarray['type']),
@@ -578,6 +579,7 @@ function item_post(&$a) {
dbesc($datarray['author-avatar']),
dbesc($datarray['created']),
dbesc($datarray['edited']),
+ dbesc($datarray['commented']),
dbesc($datarray['received']),
dbesc($datarray['changed']),
dbesc($datarray['uri']),
@@ -803,9 +805,10 @@ function item_post(&$a) {
// NOTREACHED
}
- // 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)
);