|
@@ -466,7 +466,7 @@ discard block |
|
|
block discarded – undo |
|
466
|
466
|
return; |
|
467
|
467
|
} |
|
468
|
468
|
|
|
469
|
|
- $cons_sort = function ($a, $b) { |
|
|
469
|
+ $cons_sort = function($a, $b) { |
|
470
|
470
|
if ($a['rep_name'] == $b['rep_name']) { |
|
471
|
471
|
if ($a['constituency'] == $b['constituency']) { |
|
472
|
472
|
if ($a['member']->family_name == $b['member']->family_name) { |
|
@@ -543,7 +543,7 @@ discard block |
|
|
block discarded – undo |
|
543
|
543
|
foreach ($this->data['member_constituencies'] as $pid) { |
|
544
|
544
|
try { |
|
545
|
545
|
$MEMBER = new \MySociety\TheyWorkForYou\Member(['person_id' => $pid]); |
|
546
|
|
- $cons[] = [ 'member' => $MEMBER, 'constituency' => $MEMBER->constituency, 'rep_name' => $MEMBER->getMostRecentMembership()['rep_name'] ]; |
|
|
546
|
+ $cons[] = ['member' => $MEMBER, 'constituency' => $MEMBER->constituency, 'rep_name' => $MEMBER->getMostRecentMembership()['rep_name']]; |
|
547
|
547
|
} catch (\MySociety\TheyWorkForYou\MemberException $e) { |
|
548
|
548
|
// do nothing |
|
549
|
549
|
} |
|
@@ -561,12 +561,12 @@ discard block |
|
|
block discarded – undo |
|
561
|
561
|
$q = $db->query("SELECT person_id FROM member WHERE constituency = :constituency AND house = :house and left_reason = 'still_in_office'", [':constituency' => $constituency, ':house' => $house]); |
|
562
|
562
|
foreach ($q as $row) { |
|
563
|
563
|
$MEMBER = new \MySociety\TheyWorkForYou\Member(['person_id' => $row['person_id'], 'house' => $house]); |
|
564
|
|
- $cons[] = [ 'member' => $MEMBER, 'constituency' => $constituency, 'rep_name' => $MEMBER->getMostRecentMembership()['rep_name'] ]; |
|
|
564
|
+ $cons[] = ['member' => $MEMBER, 'constituency' => $constituency, 'rep_name' => $MEMBER->getMostRecentMembership()['rep_name']]; |
|
565
|
565
|
} |
|
566
|
566
|
|
|
567
|
567
|
} else { |
|
568
|
568
|
$MEMBER = new \MySociety\TheyWorkForYou\Member(['constituency' => $constituency, 'house' => $house]); |
|
569
|
|
- $cons[] = [ 'member' => $MEMBER, 'constituency' => $constituency ]; |
|
|
569
|
+ $cons[] = ['member' => $MEMBER, 'constituency' => $constituency]; |
|
570
|
570
|
} |
|
571
|
571
|
} catch (\MySociety\TheyWorkForYou\MemberException $e) { |
|
572
|
572
|
// do nothing |
|
@@ -732,7 +732,7 @@ discard block |
|
|
block discarded – undo |
|
732
|
732
|
if ($this->data['pid']) { |
|
733
|
733
|
$criteria .= " speaker:" . $this->data['pid']; |
|
734
|
734
|
} |
|
735
|
|
- $this->data['search_results'] = $this->getRecentResults($criteria); |
|
|
735
|
+ $this->data['search_results'] = $this->getRecentResults($criteria); |
|
736
|
736
|
} |
|
737
|
737
|
|
|
738
|
738
|
$this->data['criteria'] = $criteria; |