From f3fab4240314e0525c40d0ef5ccb8e89a9eef1cb Mon Sep 17 00:00:00 2001 From: "Bradley M. Kuhn" Date: Wed, 18 Dec 2013 17:26:15 -0500 Subject: [PATCH] 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. --- vote/blt.wml | 5 ++++- vote/include/election-sql.php | 2 ++ vote/results.wml | 5 ++++- vote/vote.wml | 5 ++++- vote/votes.wml | 5 ++++- 5 files changed, 18 insertions(+), 4 deletions(-) diff --git a/vote/blt.wml b/vote/blt.wml index 897cd22..e10b45a 100644 --- a/vote/blt.wml +++ b/vote/blt.wml @@ -123,9 +123,12 @@ if ($display) { } +global $committee_name; +global $committee_email; + if (isset ($error) && $error != "") { echo "".$error."\n"; - echo "

If you don't understand the error, you should probably contact the Membership and Elections Committee, which can be reached at elections@gnome.org.

\n"; + echo "

If you don't understand the error, you should probably contact the $committee_name, which can be reached at $committee_email.

\n"; } if (isset ($handle)) diff --git a/vote/include/election-sql.php b/vote/include/election-sql.php index 09991c3..7d2074c 100644 --- a/vote/include/election-sql.php +++ b/vote/include/election-sql.php @@ -14,6 +14,8 @@ $tmp_tokens_table = "election_tmp_tokens"; $votes_table = "election_votes"; $members_table = "foundationmembers"; $results_table = "election_results"; +$committee_email = "elections@gnome.org"; +$committee_name = "the Membership and Elections Committee"; if (is_readable ("include/localconfig.php")) { /* You can use such a file to have a local config for testing purpose. */ diff --git a/vote/results.wml b/vote/results.wml index ac5ad5e..8946089 100644 --- a/vote/results.wml +++ b/vote/results.wml @@ -63,9 +63,12 @@ if ($display) { echo "

Please look at the list of all votes and verify that your vote is correct.

\n"; } +global $committee_name; +global $committee_email; + if (isset ($error) && $error != "") { echo "
".$error."
\n";; - echo "

If you don't understand the error, you should probably contact the Membership and Elections Committee, which can be reached at elections@gnome.org.

\n"; + echo "

If you don't understand the error, you should probably contact the $committee_name, which can be reached at $committee_email.

\n"; } if (isset ($handle)) diff --git a/vote/vote.wml b/vote/vote.wml index 6b8b39a..89ceaf5 100644 --- a/vote/vote.wml +++ b/vote/vote.wml @@ -260,9 +260,12 @@ if ($step == 4) { if (isset ($handle)) elec_sql_close ($handle); +global $committee_name; +global $committee_email; + if (isset ($error) && $error != "") { echo "
".$error."
\n";; - echo "

If you don't understand the error, you should probably contact the Elections Committee, which can be reached at elections@sfconservancy.org.

\n"; + echo "

If you don't understand the error, you should probably contact the $committee_name, which can be reached at $committee_email.

\n"; } if ($step != $max_step && $step >= 1) { diff --git a/vote/votes.wml b/vote/votes.wml index 82e175a..fde34a5 100644 --- a/vote/votes.wml +++ b/vote/votes.wml @@ -113,9 +113,12 @@ if ($display) { echo "\n"; } +global $committee_name; +global $committee_email; + if (isset ($error) && $error != "") { echo "
".$error."
\n";; - echo "

If you don't understand the error, you should probably contact the Membership and Elections Committee, which can be reached at elections@gnome.org.

\n"; + echo "

If you don't understand the error, you should probably contact the $committee_name, which can be reached at $committee_email.

\n"; } if (isset ($handle))