# HG changeset patch # User Dan # Date 1260141722 18000 # Node ID 4a90e6e469373a71dac35123809feef68df92a07 # Parent 21ef2f8feb59a24822103e0223b4b8fa43ee7806 PostgreSQL: fixed Admin:SecurityLog database error diff -r 21ef2f8feb59 -r 4a90e6e46937 plugins/admin/SecurityLog.php --- a/plugins/admin/SecurityLog.php Tue Dec 01 11:15:45 2009 -0500 +++ b/plugins/admin/SecurityLog.php Sun Dec 06 18:22:02 2009 -0500 @@ -32,7 +32,7 @@ // Not calling the real fetcher because we have to paginate the results $offset = ( isset($_GET['offset']) ) ? intval($_GET['offset']) : 0; - $q = $db->sql_query('SELECT COUNT(time_id) as num FROM '.table_prefix.'logs WHERE log_type=\'security\' ORDER BY time_id DESC, action ASC;'); + $q = $db->sql_query('SELECT COUNT(time_id) as num FROM '.table_prefix.'logs WHERE log_type=\'security\' GROUP BY log_id, time_id, log_type, action ORDER BY time_id DESC, action ASC;'); if ( !$q ) $db->_die(); $row = $db->fetchrow();