From 6682495b2e973e4de072a71de7cd773639aa7448 Mon Sep 17 00:00:00 2001 From: "Matteo Nastasi (mop)" Date: Mon, 13 Jan 2014 19:24:25 +0100 Subject: [PATCH] statadm.php: check if users are enabled, add bidirectionality to sql column renaming, todo updated --- TODO.txt | 2 +- sql/sql.d/052-user-rename-tsusp.sql | 4 +++- web/briskin5/statadm.php | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/TODO.txt b/TODO.txt index a348846..107969d 100644 --- a/TODO.txt +++ b/TODO.txt @@ -4,7 +4,7 @@ FEATURES | ----------+ - AUTO-MAINTENANCE - . Terms Of Service acceptance + DONE . Terms Of Service acceptance DONE . print date of hard switch DONE . TOS version DONE . user TOS acceptance (db field) diff --git a/sql/sql.d/052-user-rename-tsusp.sql b/sql/sql.d/052-user-rename-tsusp.sql index e219983..25a8896 100644 --- a/sql/sql.d/052-user-rename-tsusp.sql +++ b/sql/sql.d/052-user-rename-tsusp.sql @@ -1 +1,3 @@ -ALTER TABLE #PFX#users RENAME COLUMN tsusp TO lintm; +ALTER TABLE #PFX#users RENAME COLUMN lintm TO tsusp; --MB +ALTER TABLE #PFX#users RENAME COLUMN tsusp TO lintm; --MF + diff --git a/web/briskin5/statadm.php b/web/briskin5/statadm.php index f6d40b3..f1c7bfc 100644 --- a/web/briskin5/statadm.php +++ b/web/briskin5/statadm.php @@ -339,6 +339,7 @@ function main_pgsql($curtime) $pla_sql = sprintf("SELECT (float4(sum(p.pts)) * 100.0 ) / float4(count(p.pts)) as score, sum(p.pts) as points, count(p.pts) as games, u.code as ucode, u.login as login FROM %sbin5_points as p, %sbin5_games as g, %sbin5_matches as m, %susers as u WHERE m.tcode = %d AND m.code = g.mcode AND + ( (u.type & (CAST (X'ff0000' as integer))) <> (CAST (X'800000' as integer)) ) AND g.tstamp > to_timestamp(%d) AND g.tstamp <= to_timestamp(%d) AND p.ucode = u.code AND p.gcode = g.code GROUP BY u.code, u.login -- 2.17.1