# HG changeset patch # User Matti Hamalainen # Date 1415295322 -7200 # Node ID 4fdb61f40946a0b08116bfab0889e23343d81c7f # Parent 61a1575306d3af7fe987bbf2575f5c0ba310b0a1 Fixes to voting page. Some SQL fields had been left unrenamed, etc. diff -r 61a1575306d3 -r 4fdb61f40946 pages/vote.inc.php --- a/pages/vote.inc.php Thu Nov 06 19:23:43 2014 +0200 +++ b/pages/vote.inc.php Thu Nov 06 19:35:22 2014 +0200 @@ -119,22 +119,17 @@ foreach (stExecSQL("SELECT * FROM compos WHERE visible<>0 AND voting<>0") as $compo) { - $cid = $compo["id"]; - $esql = - "FROM entries " - "WHERE (flags & ".EFLAG_DISQUALIFIED.")=0 ". - "AND compo_id=".$cid; - + $esql = stPrepareSQL("FROM entries WHERE (flags & %d)=0 AND compo_id=%d", EFLAG_DISQUALIFIED, $compo["id"]); $nentries = stFetchSQLColumn("SELECT COUNT(*) ".$esql); if ($nentries > 0) { echo " \n". - " \n". + " \n". " \n". " \n". " \n". - ($compo["showAuthors"] ? " \n" : ""). + ($compo["show_authors"] ? " \n" : ""). " "; for ($i = stGetSetting("voteMax"); $i >= stGetSetting("voteMin"); $i--) @@ -152,7 +147,7 @@ " \n". " \n". " \n". - ($compo["showAuthors"] ? " \n" : ""). + ($compo["show_authors"] ? " \n" : ""). " "; $val = isset($votes[$eid]) ? $votes[$eid] : 0;
".chentities($compo["name"])."
".chentities($compo["name"])."
#TitleAuthorAuthor
".($entry["show_id"] > 0 ? $entry["show_id"] : "-")."".$entry["name"]."".$entry["author"]."".$entry["author"]."