aboutsummaryrefslogtreecommitdiffstats
path: root/mod/admin.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-06-29 15:30:45 -0700
committerFriendika <info@friendika.com>2011-06-29 15:30:45 -0700
commitf73bc7f010e98b078542869cf130dc2c6d7abb25 (patch)
tree96ff893d63dc6bfb151e271653ac7d3a79032d87 /mod/admin.php
parentbaead9f4c83564e9b6d8c87f62a377ee1226a149 (diff)
parentf4a1820110e6c85f91c7a3dbdada35f76be83f36 (diff)
downloadvolse-hubzilla-f73bc7f010e98b078542869cf130dc2c6d7abb25.tar.gz
volse-hubzilla-f73bc7f010e98b078542869cf130dc2c6d7abb25.tar.bz2
volse-hubzilla-f73bc7f010e98b078542869cf130dc2c6d7abb25.zip
Merge pull request #131 from fabrixxm/admin
re-added last item date in admin user page
Diffstat (limited to 'mod/admin.php')
-rw-r--r--mod/admin.php20
1 files changed, 14 insertions, 6 deletions
diff --git a/mod/admin.php b/mod/admin.php
index 9a92f4e15..8f0b2c93d 100644
--- a/mod/admin.php
+++ b/mod/admin.php
@@ -406,11 +406,18 @@ function admin_page_users(&$a){
$a->set_pager_itemspage(100);
}
- $users = q("SELECT `user` . * , `contact`.`name` , `contact`.`url` , `contact`.`micro`
- FROM `user`
- LEFT JOIN `contact` ON `user`.`uid` = `contact`.`uid`
- WHERE `user`.`verified` =1
- AND `contact`.`self` =1
+ $users = q("SELECT `user` . * , `contact`.`name` , `contact`.`url` , `contact`.`micro`, `lastitem`.`lastitem_date`
+ FROM
+ (SELECT MAX(`item`.`changed`) as `lastitem_date`, `item`.`uid`
+ FROM `item`
+ WHERE `item`.`type` = 'wall'
+ GROUP BY `item`.`uid`) AS `lastitem`
+ RIGHT OUTER JOIN `user` ON `user`.`uid` = `lastitem`.`uid`,
+ `contact`
+ WHERE
+ `user`.`uid` = `contact`.`uid`
+ AND `user`.`verified` =1
+ AND `contact`.`self` =1
ORDER BY `contact`.`name` LIMIT %d, %d
",
intval($a->pager['start']),
@@ -427,6 +434,7 @@ function admin_page_users(&$a){
$e['page-flags'] = $accounts[$e['page-flags']];
$e['register_date'] = relative_date($e['register_date']);
$e['login_date'] = relative_date($e['login_date']);
+ $e['lastitem_date'] = relative_date($e['lastitem_date']);
return $e;
}
$users = array_map("_setup_users", $users);
@@ -448,7 +456,7 @@ function admin_page_users(&$a){
'$unblock' => t('Unblock'),
'$h_users' => t('Users'),
- '$th_users' => array( t('Name'), t('Email'), t('Register date'), t('Last login'), t('Account') ),
+ '$th_users' => array( t('Name'), t('Email'), t('Register date'), t('Last login'), t('Last item'), t('Account') ),
'$confirm_delete_multi' => t('Selected users will be deleted!\n\nEverything these users had posted on this site will be permanently deleted!\n\nAre you sure?'),
'$confirm_delete' => t('The user {0} will be deleted!\n\nEverything this user has posted on this site will be permanently deleted!\n\nAre you sure?'),