Mercurial > hg > fapweb
changeset 377:f7b53225d315
Add some more sanity checking.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 03 Dec 2013 16:23:27 +0200 |
parents | 55007fe09371 |
children | 5722c37aba2a |
files | admajax.php |
diffstat | 1 files changed, 16 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/admajax.php Tue Dec 03 16:23:03 2013 +0200 +++ b/admajax.php Tue Dec 03 16:23:27 2013 +0200 @@ -330,6 +330,7 @@ // // Perform systems check // + $errors = 0; echo "<h1>Competitions / voting</h1>\n". "<ul>\n"; @@ -344,9 +345,24 @@ { $nentries = stFetchSQLColumn("SELECT COUNT(*) FROM entries WHERE show_id=0 AND compo_id=".$compo["id"]); if ($nentries > 0) + { echo "<li>Compo <b>#".$compo["id"]." - ".$compo["name"]."</b> has NO show order set for some entries.</li>\n"; + $errors++; + } } } + + $nenabled = stFetchSQLColumn("SELECT COUNT(*) FROM compos WHERE visible<>0 AND voting<>0"); + if ($nenabled == 0) + echo "<li>No competitions that are visible and enabled for voting.</li>\n"; + + $nenabled = stFetchSQLColumn("SELECT COUNT(*) FROM compos WHERE visible=0 AND voting<>0"); + if ($nenabled > 0) + echo "<li>".$nenabled." competitions that are NOT visible, but are enabled for voting?</li>\n"; + + if ($errors == 0) + echo "<li>No errors/warnings detected.</li>\n"; + echo "</ul>\n"; break;