log- and recommendation-related fixes and changes

- recommendation will not be lost if the cache is logged a second time
- RT406: recommendation will not be lost if other log of same user is deleted
* recommendation stars will only be displayed with found and attended logs
- recommendations cannot be logged with event notes
- multiple found logs of one user will be counted as 1 at top ratings list
* reversed event log type order: will attend / attended / note
This commit is contained in:
following
2012-08-23 22:36:23 +02:00
parent 45090f45ca
commit acb6f77ed5
5 changed files with 23 additions and 11 deletions

View File

@@ -114,7 +114,8 @@
$tpl->assign_rs('newcaches', $rs);
sql_free_result($rs);
$rs = sql_slave("SELECT COUNT(`cache_logs`.`cache_id`) AS `cRatings`,
// last 30 days' top ratings
$rs = sql_slave("SELECT COUNT(DISTINCT `cache_logs`.`user_id`) AS `cRatings`,
`cache_logs`.`cache_id`,
MAX(`cache_logs`.`date`) AS `dLastLog`,
`user`.`user_id` AS `user_id`,