Commit graph

21 commits

Author SHA1 Message Date
Bradley M. Kuhn
2e24b827c3 Revert: "Correct variable name" from 2014-02-09
During patch review by Tobias Mueller <muelli@cryptobitch.de>, Tobias
pointed out that the original commit referenced above seemed to make a
change that was inappropriate.  I reread my commit message and cannot
figure out why I made that change, at least, it doesn't make sense for
the reason I described, and Tobias is right that the escaped version
should be used here.

I've therefore corrected the problem and will test to see if any ill
effects occur.
2015-05-14 15:38:11 -07:00
Bradley M. Kuhn
61d0c39379 Assure $anon_token_id is integer.
The code that currently calls this only ever passes in a value that was
returned by elec_verify_voted_token() and as such no security issue
existed here.

However, assuming this function might be used for someone else in
future, we might as well case the value back to integer "just in case".

HT Tobias Mueller <muelli@cryptobitch.de> who pointed this out.
2015-05-14 15:25:28 -07:00
Bradley M. Kuhn
045b85b1ae Each election should only have one set of results; use UNIQUE to enforce. 2014-02-10 18:32:23 -05:00
Bradley M. Kuhn
54d0a4b5cb Actually, scrolling should be not necessary at all now, so I'm removing that text.
<mina86> it will never scroll  [18:09]
<mina86> or I should say, unless you have *very* narrow browser window
<bkuhn> :)
<mina86> the names of the licences will wrap if it's too narrow  [18:10]
<mina86> and horizontal scroll will appear only if individual words in license
         names are too long
2014-02-10 18:11:09 -05:00
Bradley M. Kuhn
2fb6769642 Since the box is now side-by-side, scrolling would be to the right. 2014-02-10 18:08:33 -05:00
Michal Nazarewicz
5667f10a3e [PATCH] Adjust step 2 page to use two-column layout. 2014-02-10 18:05:35 -05:00
Bradley M. Kuhn
ea2e2e9d9f Some users reported a problem of accidentally pasting in whitespace.
The right fix, of course, is have the code strip whitespace, but this note is
a useful thing in the meantime.
2014-02-10 18:01:31 -05:00
Bradley M. Kuhn
89126c6b38 Improve the text for Step 2/4.
I'm trying to get a version of this text that is clear.  This is another
attempt.
2014-02-10 17:41:31 -05:00
Bradley M. Kuhn
96683ddde9 Clearer instructions for how to handle the voting.
This was primarily based on feedback from Richard Fontana, who said the
previous instructions were unclear.

I also figured it's better to refer to third party documents on what STV is,
rather than the vague description that was here previously.
2014-02-10 17:14:18 -05:00
Bradley M. Kuhn
13de6b65da The election_results table should be in the schema.
I was unsure what field type to make the results, but reading this:
  http://dev.mysql.com/doc/refman/5.0/en/blob.html
convinced me that I should probably make it "text" type.
2014-02-10 17:03:53 -05:00
Bradley M. Kuhn
3ed4440b24 Add missing comma in SQL CREATE TABLE statement. 2014-02-10 12:27:07 -05:00
Bradley M. Kuhn
611142c18f Remove duplicate election_tmp_tokens CREATE:
I added this earlier not realizing it was elsewhere in the file.  However, my
comment is probably useful so I've left it.
2014-02-10 12:17:32 -05:00
Bradley M. Kuhn
f5872caf9d Choice lookup needs to happen here by the info we have,
which is anon_token_id.
This adds the functions and code necessary to do that.
This is probably a bit of a hack.
2014-02-09 19:04:33 -05:00
Bradley M. Kuhn
4e29b1d107 Correct variable name;
I suspect that a previous bad cut and paste caused this.
2014-02-09 18:46:54 -05:00
Bradley M. Kuhn
80c0efa2d9 Create a verification page,
so that voters can see how they voted online before the election actually
ends.
2014-02-09 17:24:32 -05:00
Bradley M. Kuhn
a4a320a6b6 election_tmp_tokens table should be created by schema.sql
This table, which is essential to the election, was not listed in the
schema.sql.  This adds a CREATE TABLE command for it.
2013-12-18 18:55:23 -05:00
Bradley M. Kuhn
dce402d2ad Create election_voters table & adapt code to use it instead of foundationmembers.
foundationmembers was a table specific to the GNOME Foundation.  This new
table, election_voters, allows creation of an electorate based on a list.

README is updated to explain how to use this table.
2013-12-18 18:53:50 -05:00
Bradley M. Kuhn
cf3f3e5180 preference field belongs in election_votes table.
It's clear from the PHP code that there should be an integer field called
'preference' in the election_votes table.  I suspect that at some point there
was an ALTER TABLE done that wasn't reflected in the schema.sql file.
2013-12-18 18:47:16 -05:00
Bradley M. Kuhn
f3fab42403 Make variables for name of committee running election and its email address.
GNOME's Election committee was previously hard-code here, but the code is
more reusable if it is no longer hard-coded.  The variables still default to
GNOME's details, but can be overridden with the configuration file.
2013-12-18 17:26:15 -05:00
Bradley M. Kuhn
6008db6237 Properly format schema.sql for MySQL & drop tables first.
With this change, schema.sql can be run directly from the mysql command line,
with a command such as:
$ mysql -u root -p -D dbname < .../vote/include/schema.sql
2013-12-18 15:38:02 -05:00
Bradley M. Kuhn
8dde472f6c foundation.gnome.org not needed in this case, as only using this for voting. 2013-12-17 13:14:33 -05:00