From 0f62bbdf9f8c1be13ebae82f7f38b4152852442e Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Fri, 5 Jul 2024 10:39:39 +0100 Subject: [PATCH] [2024] Remove election-time specific code. --- classes/Homepage.php | 5 - www/docs/postcode/index.php | 5 - .../easyparliament/templates/html/index.php | 6 +- .../templates/html/postcode/ge2024.php | 140 ------------------ .../templates/html/postcode/index.php | 6 +- 5 files changed, 2 insertions(+), 160 deletions(-) delete mode 100644 www/includes/easyparliament/templates/html/postcode/ge2024.php diff --git a/classes/Homepage.php b/classes/Homepage.php index 7b83e5ce29..852e025b7d 100644 --- a/classes/Homepage.php +++ b/classes/Homepage.php @@ -34,16 +34,11 @@ public function display() { $common = new Common; $dissolution = Dissolution::dates(); - // temp for 2024 election - $now = new \DateTime(); - $election_date = new \DateTime('2024-07-04 22:00:00'); - $data['debates'] = $this->getDebatesData(); $user = new User(); $data['mp_data'] = $user->getRep($this->cons_type, $this->mp_house); $data["commons_dissolved"] = isset($dissolution[1]); - $data["after_election"] = $now > $election_date; $data['regional'] = $this->getRegionalList(); $data['popular_searches'] = $common->getPopularSearches(); diff --git a/www/docs/postcode/index.php b/www/docs/postcode/index.php index b7c83d6afa..fdecaab71b 100644 --- a/www/docs/postcode/index.php +++ b/www/docs/postcode/index.php @@ -10,11 +10,6 @@ // handling to switch the GE message based either on time or a query string -$now = new DateTime(); -$election_date = new DateTime('2024-07-04 22:00:00'); - -$data['post_election_message'] = (($now > $election_date) || (get_http_var("post_election") == 1)); - $pc = get_http_var('pc'); if (!$pc) { postcode_error('Please supply a postcode!'); diff --git a/www/includes/easyparliament/templates/html/index.php b/www/includes/easyparliament/templates/html/index.php index 89ea47485b..aa48984822 100644 --- a/www/includes/easyparliament/templates/html/index.php +++ b/www/includes/easyparliament/templates/html/index.php @@ -20,11 +20,7 @@ - -

Find out more about your new MP

- -

Find out more about your former MP, and election candidates

- +

Find out more about your former MP

diff --git a/www/includes/easyparliament/templates/html/postcode/ge2024.php b/www/includes/easyparliament/templates/html/postcode/ge2024.php deleted file mode 100644 index 5af0e87f6e..0000000000 --- a/www/includes/easyparliament/templates/html/postcode/ge2024.php +++ /dev/null @@ -1,140 +0,0 @@ - - - - -

General election

- - -

See your current

- -

There is a UK general election on 4th July 2024 - 1) { - echo "($datediff days away)"; -} elseif ($datediff > 0) { - echo '(tomorrow!)'; -} elseif ($datediff > -86400) { - echo '(today!)'; -} -?>. -

- - -

- To find out where to vote (your polling station), visit WhereDoIVote.co.uk. -

- -

- To understand more about how the election will work, you can read our 10-point guide. -

- -

For this election, you will be in the -post_name ?> -constituency. -You can see statistics and information for your new constituency at the -Local Intelligence Hub. - -

Candidates

-

- -The people standing in your constituency -candidates_verified) { echo '(not yet finalised or verified)'; } -?> are: - -

- -

- -For more information visit WhoCanIVoteFor. -Thanks to Democracy Club for providing this data. -

-

New constituencies

-

Many constituency boundaries have changed for this election. -Here's a map of your new constituency (pink) with your -existing constituency in grey:

- -
-
-
-
- -

-Get more datasets about the new constituencies. -

- - - - - diff --git a/www/includes/easyparliament/templates/html/postcode/index.php b/www/includes/easyparliament/templates/html/postcode/index.php index 299c259a17..7f8751d1ef 100644 --- a/www/includes/easyparliament/templates/html/postcode/index.php +++ b/www/includes/easyparliament/templates/html/postcode/index.php @@ -37,11 +37,7 @@ function member_image_box(string $person_id, string $person_url, string $person_ } } -if ($post_election_message) { - include "ge2024-post-election.php"; -} else { - include "ge2024.php"; -}; +include "ge2024-post-election.php"; # The below is normally the main column, but for now let us make it the sidebar...