From a4bf3a76b9d751e38c8dc33eb10a94b5ad3fc9e0 Mon Sep 17 00:00:00 2001 From: M Somerville Date: Fri, 18 Oct 2019 14:19:50 +0100 Subject: [PATCH] Parties are stored long-form, fix checks. --- www/docs/mp/index.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/www/docs/mp/index.php b/www/docs/mp/index.php index d6b0afcad9..73fcaf4508 100644 --- a/www/docs/mp/index.php +++ b/www/docs/mp/index.php @@ -896,7 +896,7 @@ function person_pbc_membership($member) { # Public Bill Committees if (count($extra_info['pbc'])) { - if ($member->party() == 'SNP') { + if ($member->party() == 'Scottish National Party') { $out['info'] = 'SNP MPs only attend sittings where the legislation pertains to Scotland.'; } foreach ($extra_info['pbc'] as $bill_id => $arr) { @@ -949,7 +949,7 @@ function person_numerology($member, $has_email_alerts, $wtt_stats_years) { $minister = 1; if (isset($extra_info['Lwrans_answered_inlastyear']) && $extra_info['Lwrans_answered_inlastyear'] > 0 && $extra_info['Lwrans_asked_inlastyear'] == 0) $Lminister = true; - if ($member->party() == 'SPK' || $member->party() == 'CWM' || $member->party() == 'DCWM') { + if ($member->party() == 'Speaker' || $member->party() == 'Deputy Speaker') { $minister = 2; } $wrans_answers = display_stats_line('wrans_asked_inlastyear', 'Has received answers to ', 'written question', ' ' . $since_text, '', $extra_info, $minister, $Lminister); @@ -967,9 +967,9 @@ function person_numerology($member, $has_email_alerts, $wtt_stats_years) { } $after_stuff = ' (From Public Whip)'; - if ($member->party() == 'SNP') { - $after_stuff .= '
Note SNP MPs do not vote on legislation not affecting Scotland.'; - } elseif ($member->party() == 'SPK' || $member->party() == 'CWM' || $member->party() == 'DCWM') { + if ($member->party() == 'Scottish National Party') { + $after_stuff .= '
Note SNP MPs do not generally vote on legislation not affecting Scotland, as these matters are devolved to the Scottish Parliament.'; + } elseif ($member->party() == 'Speaker' || $member->party() == 'Deputy Speaker') { $after_stuff .= '
Speakers and deputy speakers cannot vote except to break a tie.'; } if ($member->party() != 'Sinn Féin') {