@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | $now = new \DateTime(); |
77 | 77 | |
78 | 78 | $diff = $date_entered->diff($now); |
79 | - if ( $diff->y == 0 && $diff->m <= 6 ) { |
|
79 | + if ($diff->y == 0 && $diff->m <= 6) { |
|
80 | 80 | return TRUE; |
81 | 81 | } |
82 | 82 | } |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | |
98 | 98 | $entered_house = $this->entered_house($house); |
99 | 99 | |
100 | - if ( $entered_house ) { |
|
100 | + if ($entered_house) { |
|
101 | 101 | $date_entered = $entered_house['date']; |
102 | 102 | } |
103 | 103 | |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | |
118 | 118 | $left_house = $this->left_house($house); |
119 | 119 | |
120 | - if ( $left_house ) { |
|
120 | + if ($left_house) { |
|
121 | 121 | $date_left = $left_house['date']; |
122 | 122 | } |
123 | 123 | |
@@ -145,9 +145,9 @@ discard block |
||
145 | 145 | |
146 | 146 | $is_lord = $this->house(HOUSE_TYPE_LORDS); |
147 | 147 | if ($is_lord) { |
148 | - list($image,$size) = Utility\Member::findMemberImage($this->person_id(), false, 'lord'); |
|
148 | + list($image, $size) = Utility\Member::findMemberImage($this->person_id(), false, 'lord'); |
|
149 | 149 | } else { |
150 | - list($image,$size) = Utility\Member::findMemberImage($this->person_id(), false, true); |
|
150 | + list($image, $size) = Utility\Member::findMemberImage($this->person_id(), false, true); |
|
151 | 151 | } |
152 | 152 | |
153 | 153 | // We can determine if the image exists or not by testing if size is set |
@@ -170,10 +170,10 @@ discard block |
||
170 | 170 | |
171 | 171 | usort( |
172 | 172 | $departures, |
173 | - function ($a, $b) { |
|
174 | - if ( $a['date'] == $b['date'] ) { |
|
173 | + function($a, $b) { |
|
174 | + if ($a['date'] == $b['date']) { |
|
175 | 175 | return 0; |
176 | - } else if ( $a['date'] < $b['date'] ) { |
|
176 | + } else if ($a['date'] < $b['date']) { |
|
177 | 177 | return -1; |
178 | 178 | } else { |
179 | 179 | return 1; |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | $office = $office['office']; |
212 | 212 | |
213 | 213 | foreach ($office as $row) { |
214 | - if ( $officeObject = $this->getOfficeObject($include_only, $ignore_committees, $row) ) { |
|
214 | + if ($officeObject = $this->getOfficeObject($include_only, $ignore_committees, $row)) { |
|
215 | 215 | $out[] = $officeObject; |
216 | 216 | } |
217 | 217 | } |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | private function entered_house_line($house, $house_name) { |
349 | 349 | if (isset($this->entered_house[$house]['date'])) { |
350 | 350 | $string = "<strong>Entered the $house_name "; |
351 | - $string .= strlen($this->entered_house[$house]['date_pretty'])==HOUSE_TYPE_SCOTLAND ? 'in ' : 'on '; |
|
351 | + $string .= strlen($this->entered_house[$house]['date_pretty']) == HOUSE_TYPE_SCOTLAND ? 'in ' : 'on '; |
|
352 | 352 | $string .= $this->entered_house[$house]['date_pretty'] . '</strong>'; |
353 | 353 | if ($this->entered_house[$house]['reason']) { |
354 | 354 | $string .= ' — ' . $this->entered_house[$house]['reason']; |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | private function left_house_line($house, $house_name) { |
361 | 361 | if ($this->house($house) && !$this->current_member($house)) { |
362 | 362 | $string = "<strong>Left the $house_name "; |
363 | - $string .= strlen($this->left_house[$house]['date_pretty'])==4 ? 'in ' : 'on '; |
|
363 | + $string .= strlen($this->left_house[$house]['date_pretty']) == 4 ? 'in ' : 'on '; |
|
364 | 364 | $string .= $this->left_house[$house]['date_pretty'] . '</strong>'; |
365 | 365 | if ($this->left_house[$house]['reason']) { |
366 | 366 | $string .= ' — ' . $this->left_house[$house]['reason']; |
@@ -373,19 +373,19 @@ discard block |
||
373 | 373 | $policy_diffs = array(); |
374 | 374 | $party_positions = $party->getAllPolicyPositions($policiesList); |
375 | 375 | |
376 | - if ( !$party_positions ) { |
|
376 | + if (!$party_positions) { |
|
377 | 377 | return $policy_diffs; |
378 | 378 | } |
379 | 379 | |
380 | - foreach ( $positions->positionsById as $policy_id => $details ) { |
|
381 | - if ( $details['has_strong'] && $details['score'] != -1 && isset($party_positions[$policy_id])) { |
|
380 | + foreach ($positions->positionsById as $policy_id => $details) { |
|
381 | + if ($details['has_strong'] && $details['score'] != -1 && isset($party_positions[$policy_id])) { |
|
382 | 382 | $mp_score = $details['score']; |
383 | 383 | $party_score = $party_positions[$policy_id]['score']; |
384 | 384 | |
385 | 385 | $score_diff = $this->calculatePolicyDiffScore($mp_score, $party_score); |
386 | 386 | |
387 | 387 | // skip anything that isn't a yes vs no diff |
388 | - if ( $only_diffs && $score_diff < 2 ) { |
|
388 | + if ($only_diffs && $score_diff < 2) { |
|
389 | 389 | continue; |
390 | 390 | } |
391 | 391 | $policy_diffs[$policy_id] = $score_diff; |
@@ -397,18 +397,18 @@ discard block |
||
397 | 397 | return $policy_diffs; |
398 | 398 | } |
399 | 399 | |
400 | - private function calculatePolicyDiffScore( $mp_score, $party_score ) { |
|
400 | + private function calculatePolicyDiffScore($mp_score, $party_score) { |
|
401 | 401 | $score_diff = abs($mp_score - $party_score); |
402 | 402 | // if they are on opposite sides of mixture of for and against |
403 | 403 | if ( |
404 | - ( $mp_score < 0.4 && $party_score > 0.6 ) || |
|
405 | - ( $mp_score > 0.6 && $party_score < 0.4 ) |
|
404 | + ($mp_score < 0.4 && $party_score > 0.6) || |
|
405 | + ($mp_score > 0.6 && $party_score < 0.4) |
|
406 | 406 | ) { |
407 | 407 | $score_diff += 2; |
408 | 408 | // if on is mixture of for and against and one is for/against |
409 | 409 | } else if ( |
410 | - ( $mp_score > 0.4 && $mp_score < 0.6 && ( $party_score > 0.6 || $party_score < 0.4 ) ) || |
|
411 | - ( $party_score > 0.4 && $party_score < 0.6 && ( $mp_score > 0.6 || $mp_score < 0.4 ) ) |
|
410 | + ($mp_score > 0.4 && $mp_score < 0.6 && ($party_score > 0.6 || $party_score < 0.4)) || |
|
411 | + ($party_score > 0.4 && $party_score < 0.6 && ($mp_score > 0.6 || $mp_score < 0.4)) |
|
412 | 412 | ) { |
413 | 413 | $score_diff += 1; |
414 | 414 | } |
@@ -421,7 +421,7 @@ discard block |
||
421 | 421 | |
422 | 422 | $mreg = array(); |
423 | 423 | $constituencies = \MySociety\TheyWorkForYou\Utility\Postcode::postcodeToConstituencies($postcode); |
424 | - if ( isset($constituencies[$type]) ) { |
|
424 | + if (isset($constituencies[$type])) { |
|
425 | 425 | $cons_name = $constituencies[$type]; |
426 | 426 | $query_base = "SELECT member.person_id, title, lordofname, given_name, family_name, constituency, house |
427 | 427 | FROM member, person_names |
@@ -438,7 +438,7 @@ discard block |
||
438 | 438 | ':cons_name' => $cons_name |
439 | 439 | ) |
440 | 440 | ); |
441 | - if ( !$q->rows() && ($dissolution = Dissolution::db()) ) { |
|
441 | + if (!$q->rows() && ($dissolution = Dissolution::db())) { |
|
442 | 442 | $q = $db->query("$query_base AND $dissolution[query]", |
443 | 443 | array( |
444 | 444 | ':house' => $house, |
@@ -462,7 +462,7 @@ discard block |
||
462 | 462 | } |
463 | 463 | |
464 | 464 | public static function getRepNameForHouse($house) { |
465 | - switch ( $house ) { |
|
465 | + switch ($house) { |
|
466 | 466 | case HOUSE_TYPE_COMMONS: |
467 | 467 | $name = 'MP'; |
468 | 468 | break; |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | */ |
12 | 12 | public function getDataSet() |
13 | 13 | { |
14 | - return $this->createMySQLXMLDataSet(dirname(__FILE__).'/_fixtures/member.xml'); |
|
14 | + return $this->createMySQLXMLDataSet(dirname(__FILE__) . '/_fixtures/member.xml'); |
|
15 | 15 | } |
16 | 16 | |
17 | 17 | private function fetch_page($vars) |
@@ -21,14 +21,14 @@ discard block |
||
21 | 21 | |
22 | 22 | public function testQueenie() |
23 | 23 | { |
24 | - $page = $this->fetch_page( array( 'representative_type' => 'royal', 'n' => 'elizabeth_the_second' ) ); |
|
24 | + $page = $this->fetch_page(array('representative_type' => 'royal', 'n' => 'elizabeth_the_second')); |
|
25 | 25 | $this->assertContains('Elizabeth the Second', $page); |
26 | 26 | $this->assertContains('Coronated on 2 June 1953', $page); |
27 | 27 | } |
28 | 28 | |
29 | 29 | public function testSittingMP() |
30 | 30 | { |
31 | - $page = $this->fetch_page( array( 'pid' => 2, 'url' => '/mp/2/test_current-mp/test_westminster_constituency' ) ); |
|
31 | + $page = $this->fetch_page(array('pid' => 2, 'url' => '/mp/2/test_current-mp/test_westminster_constituency')); |
|
32 | 32 | $this->assertContains('Test Current-MP', $page); |
33 | 33 | $this->assertRegexp('#<span class="person-header__about__position__constituency">\s*Test Westminster Constituency\s*</span>#', $page); |
34 | 34 | $this->assertRegexp('#<span class="person-header__about__position__role">\s*Labour\s*MP\s*</span>#', $page); |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | public function testSittingMLA() |
38 | 38 | { |
39 | - $page = $this->fetch_page( array( 'pid' => 4, 'representative_type' => 'mla', 'url' => '/mp/4/test_current-mla' ) ); |
|
39 | + $page = $this->fetch_page(array('pid' => 4, 'representative_type' => 'mla', 'url' => '/mp/4/test_current-mla')); |
|
40 | 40 | $this->assertContains('Test Current-MLA', $page); |
41 | 41 | $this->assertRegexp('#<span class="person-header__about__position__constituency">\s*Test Northern Ireland Constituency\s*</span>#', $page); |
42 | 42 | $this->assertRegexp('#<span class="person-header__about__position__role">\s*Sinn Féin\s*MLA\s*</span>#', $page); |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | */ |
48 | 48 | public function testSittingSinnFeinMP() |
49 | 49 | { |
50 | - $page = $this->fetch_page( array( 'pid' => 15, 'url' => '/mp/15/test_current-sf-mp/test_westminster_constituency' ) ); |
|
50 | + $page = $this->fetch_page(array('pid' => 15, 'url' => '/mp/15/test_current-sf-mp/test_westminster_constituency')); |
|
51 | 51 | $this->assertContains('Sinn Féin MPs do not take their seats in Parliament.', $page); |
52 | 52 | } |
53 | 53 | |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | */ |
57 | 57 | public function testSittingNonSinnFeinMP() |
58 | 58 | { |
59 | - $page = $this->fetch_page( array( 'pid' => 2, 'url' => '/mp/2/test_current-mp/test_westminster_constituency' ) ); |
|
59 | + $page = $this->fetch_page(array('pid' => 2, 'url' => '/mp/2/test_current-mp/test_westminster_constituency')); |
|
60 | 60 | $this->assertNotContains('Sinn Féin MPs do not take their seats in Parliament.', $page); |
61 | 61 | } |
62 | 62 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | */ |
66 | 66 | public function testSpeaker() |
67 | 67 | { |
68 | - $page = $this->fetch_page( array( 'pid' => 13, 'url' => '/mp/13/test_speaker/buckingham' ) ); |
|
68 | + $page = $this->fetch_page(array('pid' => 13, 'url' => '/mp/13/test_speaker/buckingham')); |
|
69 | 69 | $this->assertRegexp('#<span class="person-header__about__position__role">\s*Speaker\s*MP\s*</span>#', $page); |
70 | 70 | } |
71 | 71 | |
@@ -75,25 +75,25 @@ discard block |
||
75 | 75 | # makes sure it is empty in case there's something hanging |
76 | 76 | # about in memcached |
77 | 77 | $banner->set_text(''); |
78 | - $page = $this->fetch_page( array( 'url' => '/' ) ); |
|
78 | + $page = $this->fetch_page(array('url' => '/')); |
|
79 | 79 | $this->assertNotContains('<div class="banner">', $page); |
80 | 80 | $this->assertNotContains('This is a banner', $page); |
81 | 81 | |
82 | 82 | $banner->set_text('This is a banner'); |
83 | - $page = $this->fetch_page( array( 'url' => '/' ) ); |
|
83 | + $page = $this->fetch_page(array('url' => '/')); |
|
84 | 84 | $this->assertContains('This is a banner', $page); |
85 | 85 | |
86 | 86 | $banner->set_text(''); |
87 | - $page = $this->fetch_page( array( 'url' => '/' ) ); |
|
87 | + $page = $this->fetch_page(array('url' => '/')); |
|
88 | 88 | $this->assertNotContains('<div class="banner">', $page); |
89 | 89 | $this->assertNotContains('This is a banner', $page); |
90 | 90 | } |
91 | 91 | |
92 | 92 | public function testNewMPMessage() { |
93 | - $page = $this->fetch_page( array( 'pid' => 17, 'url' => '/mp/17/recent_mp/test_westminster_constituency' ) ); |
|
93 | + $page = $this->fetch_page(array('pid' => 17, 'url' => '/mp/17/recent_mp/test_westminster_constituency')); |
|
94 | 94 | $this->assertNotContains('is a recently elected MP', $page); |
95 | 95 | $this->db->query('UPDATE member SET entered_house = NOW() WHERE person_id = 17'); |
96 | - $page = $this->fetch_page( array( 'pid' => 17, 'url' => '/mp/17/recent_mp/test_westminster_constituency' ) ); |
|
96 | + $page = $this->fetch_page(array('pid' => 17, 'url' => '/mp/17/recent_mp/test_westminster_constituency')); |
|
97 | 97 | $this->assertContains('is a recently elected MP', $page); |
98 | 98 | } |
99 | 99 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once INCLUDESPATH."easyparliament/glossary.php"; |
|
3 | +include_once INCLUDESPATH . "easyparliament/glossary.php"; |
|
4 | 4 | |
5 | 5 | class MEMBER { |
6 | 6 | |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | |
82 | 82 | # All the following only happen if the house to display isn't yet set. |
83 | 83 | # TODO: This relies on interpreting the default value of 0 as a false, which may be error-prone. |
84 | - if (! (bool) $this->house_disp) { |
|
84 | + if (!(bool) $this->house_disp) { |
|
85 | 85 | if ($house == HOUSE_TYPE_LONDON_ASSEMBLY # London Assembly |
86 | 86 | || $house == HOUSE_TYPE_SCOTLAND # MSPs and |
87 | 87 | || $house == HOUSE_TYPE_NI # MLAs have lowest priority |
@@ -240,13 +240,13 @@ discard block |
||
240 | 240 | } |
241 | 241 | } |
242 | 242 | |
243 | - public function postcode_to_person_id($postcode, $house=null) { |
|
244 | - twfy_debug ('MP', "postcode_to_person_id converting postcode to person"); |
|
243 | + public function postcode_to_person_id($postcode, $house = null) { |
|
244 | + twfy_debug('MP', "postcode_to_person_id converting postcode to person"); |
|
245 | 245 | $constituency = strtolower(MySociety\TheyWorkForYou\Utility\Postcode::postcodeToConstituency($postcode)); |
246 | 246 | return $this->constituency_to_person_id($constituency, $house); |
247 | 247 | } |
248 | 248 | |
249 | - public function constituency_to_person_id($constituency, $house=null) { |
|
249 | + public function constituency_to_person_id($constituency, $house = null) { |
|
250 | 250 | if ($constituency == '') { |
251 | 251 | throw new MySociety\TheyWorkForYou\MemberException('Sorry, no constituency was found.'); |
252 | 252 | } |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | } |
286 | 286 | } |
287 | 287 | |
288 | - public function name_to_person_id($name, $const='') { |
|
288 | + public function name_to_person_id($name, $const = '') { |
|
289 | 289 | global $this_page; |
290 | 290 | if ($name == '') { |
291 | 291 | throw new MySociety\TheyWorkForYou\MemberException('Sorry, no name was found.'); |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | global $THEUSER; |
386 | 386 | if (is_object($THEUSER) && $THEUSER->postcode_is_set() && $this->current_member(1)) { |
387 | 387 | $pc = $THEUSER->postcode(); |
388 | - twfy_debug ('MP', "set_users_mp converting postcode to person"); |
|
388 | + twfy_debug('MP', "set_users_mp converting postcode to person"); |
|
389 | 389 | $constituency = strtolower(MySociety\TheyWorkForYou\Utility\Postcode::postcodeToConstituency($pc)); |
390 | 390 | if ($constituency == strtolower($this->constituency())) { |
391 | 391 | $this->the_users_mp = true; |
@@ -459,9 +459,9 @@ discard block |
||
459 | 459 | |
460 | 460 | if (isset($this->extra_info['public_whip_attendrank'])) { |
461 | 461 | $prefix = ($this->house(HOUSE_TYPE_LORDS) ? 'L' : ''); |
462 | - $this->extra_info[$prefix.'public_whip_division_attendance_rank'] = $this->extra_info['public_whip_attendrank']; |
|
463 | - $this->extra_info[$prefix.'public_whip_division_attendance_rank_outof'] = $this->extra_info['public_whip_attendrank_outof']; |
|
464 | - $this->extra_info[$prefix.'public_whip_division_attendance_quintile'] = floor($this->extra_info['public_whip_attendrank'] / ($this->extra_info['public_whip_attendrank_outof']+1) * 5); |
|
462 | + $this->extra_info[$prefix . 'public_whip_division_attendance_rank'] = $this->extra_info['public_whip_attendrank']; |
|
463 | + $this->extra_info[$prefix . 'public_whip_division_attendance_rank_outof'] = $this->extra_info['public_whip_attendrank_outof']; |
|
464 | + $this->extra_info[$prefix . 'public_whip_division_attendance_quintile'] = floor($this->extra_info['public_whip_attendrank'] / ($this->extra_info['public_whip_attendrank_outof'] + 1) * 5); |
|
465 | 465 | } |
466 | 466 | if ($this->house(HOUSE_TYPE_LORDS) && isset($this->extra_info['public_whip_division_attendance'])) { |
467 | 467 | $this->extra_info['Lpublic_whip_division_attendance'] = $this->extra_info['public_whip_division_attendance']; |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | } |
470 | 470 | |
471 | 471 | if ($display && array_key_exists('register_member_interests_html', $this->extra_info) && ($this->extra_info['register_member_interests_html'] != '')) { |
472 | - $args = array ( |
|
472 | + $args = array( |
|
473 | 473 | "sort" => "regexp_replace" |
474 | 474 | ); |
475 | 475 | $GLOSSARY = new GLOSSARY($args); |
@@ -477,7 +477,7 @@ discard block |
||
477 | 477 | $GLOSSARY->glossarise($this->extra_info['register_member_interests_html']); |
478 | 478 | } |
479 | 479 | |
480 | - $q = $this->db->query('select count(*) as c from alerts where criteria like "%speaker:'.$this->person_id.'%" and confirmed and not deleted')->first(); |
|
480 | + $q = $this->db->query('select count(*) as c from alerts where criteria like "%speaker:' . $this->person_id . '%" and confirmed and not deleted')->first(); |
|
481 | 481 | $this->extra_info['number_of_alerts'] = $q['c']; |
482 | 482 | |
483 | 483 | if (isset($this->extra_info['reading_ease'])) { |
@@ -508,7 +508,7 @@ discard block |
||
508 | 508 | $chairman = $row['c']; |
509 | 509 | $this->extra_info['pbc'][$bill_id] = array( |
510 | 510 | 'title' => $title, 'session' => $row['session'], |
511 | - 'attending'=>$attending, 'chairman'=>($chairman>0), 'outof' => $c |
|
511 | + 'attending'=>$attending, 'chairman'=>($chairman > 0), 'outof' => $c |
|
512 | 512 | ); |
513 | 513 | } |
514 | 514 | |
@@ -523,7 +523,7 @@ discard block |
||
523 | 523 | public function family_name() { return $this->family_name; } |
524 | 524 | public function full_name($no_mp_title = false) { |
525 | 525 | $title = $this->title; |
526 | - if ($no_mp_title && ($this->house_disp==HOUSE_TYPE_COMMONS || $this->house_disp==HOUSE_TYPE_NI || $this->house_disp==HOUSE_TYPE_SCOTLAND)) |
|
526 | + if ($no_mp_title && ($this->house_disp == HOUSE_TYPE_COMMONS || $this->house_disp == HOUSE_TYPE_NI || $this->house_disp == HOUSE_TYPE_SCOTLAND)) |
|
527 | 527 | $title = ''; |
528 | 528 | return member_full_name($this->house_disp, $title, $this->given_name, $this->family_name, $this->lordofname); |
529 | 529 | } |
@@ -550,8 +550,8 @@ discard block |
||
550 | 550 | } |
551 | 551 | |
552 | 552 | public function entered_house($house = null) { |
553 | - if ( isset($house) ) { |
|
554 | - if ( array_key_exists($house, $this->entered_house) ) { |
|
553 | + if (isset($house)) { |
|
554 | + if (array_key_exists($house, $this->entered_house)) { |
|
555 | 555 | return $this->entered_house[$house]; |
556 | 556 | } else { |
557 | 557 | return null; |
@@ -563,9 +563,9 @@ discard block |
||
563 | 563 | public function entered_house_text($entered_house) { |
564 | 564 | if (!$entered_house) return ''; |
565 | 565 | list($year, $month, $day) = explode('-', $entered_house); |
566 | - if ($month==1 && $day==1 && $this->house(HOUSE_TYPE_LORDS)) { |
|
566 | + if ($month == 1 && $day == 1 && $this->house(HOUSE_TYPE_LORDS)) { |
|
567 | 567 | return $year; |
568 | - } elseif ($month==0 && $day==0) { |
|
568 | + } elseif ($month == 0 && $day == 0) { |
|
569 | 569 | return $year; |
570 | 570 | } elseif (checkdate($month, $day, $year) && $year != '9999') { |
571 | 571 | return format_date($entered_house, LONGDATEFORMAT); |
@@ -575,8 +575,8 @@ discard block |
||
575 | 575 | } |
576 | 576 | |
577 | 577 | public function left_house($house = null) { |
578 | - if ( isset($house) ) { |
|
579 | - if ( array_key_exists($house, $this->left_house) ) { |
|
578 | + if (isset($house)) { |
|
579 | + if (array_key_exists($house, $this->left_house)) { |
|
580 | 580 | return $this->left_house[$house]; |
581 | 581 | } else { |
582 | 582 | return null; |
@@ -590,7 +590,7 @@ discard block |
||
590 | 590 | list($year, $month, $day) = explode('-', $left_house); |
591 | 591 | if (checkdate($month, $day, $year) && $year != '9999') { |
592 | 592 | return format_date($left_house, LONGDATEFORMAT); |
593 | - } elseif ($month==0 && $day==0) { |
|
593 | + } elseif ($month == 0 && $day == 0) { |
|
594 | 594 | # Left house date is stored as 1942-00-00 to mean "at some point in 1941" |
595 | 595 | return $year - 1; |
596 | 596 | } else { |
@@ -708,7 +708,7 @@ discard block |
||
708 | 708 | $name = $row['given_name'] . ' ' . $row['family_name']; |
709 | 709 | if ($last_pid != $pid) { |
710 | 710 | $mships[] = array( |
711 | - 'href' => WEBPATH . 'mp/?pid='.$pid, |
|
711 | + 'href' => WEBPATH . 'mp/?pid=' . $pid, |
|
712 | 712 | 'text' => $name |
713 | 713 | ); |
714 | 714 | $last_pid = $pid; |
@@ -65,10 +65,10 @@ discard block |
||
65 | 65 | |
66 | 66 | */ |
67 | 67 | |
68 | -$this->page = array ( |
|
68 | +$this->page = array( |
|
69 | 69 | |
70 | 70 | // Things used on EVERY page, unless overridden for a page: |
71 | - 'default' => array ( |
|
71 | + 'default' => array( |
|
72 | 72 | 'parent' => '', |
73 | 73 | 'session_vars' => array('super_debug'), |
74 | 74 | 'sitetitle' => 'TheyWorkForYou', |
@@ -78,122 +78,122 @@ discard block |
||
78 | 78 | |
79 | 79 | // KEEP THE PAGES IN ALPHABETICAL ORDER! TA. |
80 | 80 | |
81 | - 'about' => array ( |
|
81 | + 'about' => array( |
|
82 | 82 | 'title' => 'About us', |
83 | 83 | 'url' => 'about/' |
84 | 84 | ), |
85 | - 'parliaments' => array ( |
|
85 | + 'parliaments' => array( |
|
86 | 86 | 'title' => 'Parliaments and assemblies', |
87 | 87 | 'url' => 'parliaments/' |
88 | 88 | ), |
89 | 89 | |
90 | - 'alert_stats' => array ( |
|
90 | + 'alert_stats' => array( |
|
91 | 91 | 'title' => 'Email alerts statistics', |
92 | 92 | 'parent' => 'admin', |
93 | 93 | 'url' => 'admin/alert_stats.php', |
94 | 94 | ), |
95 | - 'admin_badusers' => array ( |
|
95 | + 'admin_badusers' => array( |
|
96 | 96 | 'title' => 'Bad users', |
97 | 97 | 'parent' => 'admin', |
98 | 98 | 'url' => 'admin/badusers.php' |
99 | 99 | ), |
100 | - 'admin_home' => array ( |
|
100 | + 'admin_home' => array( |
|
101 | 101 | 'title' => 'Home', |
102 | 102 | 'parent' => 'admin', |
103 | 103 | 'url' => 'admin/' |
104 | 104 | ), |
105 | - 'admin_comments' => array ( |
|
105 | + 'admin_comments' => array( |
|
106 | 106 | 'title' => 'Recent comments', |
107 | 107 | 'parent' => 'admin', |
108 | 108 | 'url' => 'admin/comments.php' |
109 | 109 | ), |
110 | - 'admin_commentreport' => array ( |
|
110 | + 'admin_commentreport' => array( |
|
111 | 111 | 'title' => 'Processing a comment report', |
112 | 112 | 'parent' => 'admin', |
113 | 113 | 'url' => 'admin/report.php', |
114 | - 'session_vars' => array ('rid', 'cid') |
|
114 | + 'session_vars' => array('rid', 'cid') |
|
115 | 115 | ), |
116 | - 'admin_commentreports' => array ( |
|
116 | + 'admin_commentreports' => array( |
|
117 | 117 | 'title' => 'Outstanding comment reports', |
118 | 118 | 'parent' => 'admin', |
119 | 119 | 'url' => 'admin/reports.php' |
120 | 120 | ), |
121 | - 'admin_failedsearches' => array ( |
|
121 | + 'admin_failedsearches' => array( |
|
122 | 122 | 'title' => 'Failed searches', |
123 | 123 | 'parent' => 'admin', |
124 | 124 | 'url' => 'admin/failedsearches.php' |
125 | 125 | ), |
126 | - 'admin_glossary' => array ( |
|
126 | + 'admin_glossary' => array( |
|
127 | 127 | 'title' => 'Manage glossary entries', |
128 | 128 | 'parent' => 'admin', |
129 | 129 | 'url' => 'admin/glossary.php' |
130 | 130 | ), |
131 | - 'admin_glossary_pending' => array ( |
|
131 | + 'admin_glossary_pending' => array( |
|
132 | 132 | 'title' => 'Review pending glossary entries', |
133 | 133 | 'parent' => 'admin', |
134 | 134 | 'url' => 'admin/glossary_pending.php' |
135 | 135 | ), |
136 | - 'admin_searchlogs' => array ( |
|
136 | + 'admin_searchlogs' => array( |
|
137 | 137 | 'title' => 'Recent searches', |
138 | 138 | 'parent' => 'admin', |
139 | 139 | 'url' => 'admin/searchlogs.php' |
140 | 140 | ), |
141 | - 'admin_popularsearches' => array ( |
|
141 | + 'admin_popularsearches' => array( |
|
142 | 142 | 'title' => 'Popular searches in last 30 days (first 1000)', |
143 | 143 | 'parent' => 'admin', |
144 | 144 | 'url' => 'admin/popularsearches.php' |
145 | 145 | ), |
146 | - 'admin_statistics' => array ( |
|
146 | + 'admin_statistics' => array( |
|
147 | 147 | 'title' => 'General statistics', |
148 | 148 | 'parent' => 'admin', |
149 | 149 | 'url' => 'admin/statistics.php' |
150 | 150 | ), |
151 | - 'admin_reportstats' => array ( |
|
151 | + 'admin_reportstats' => array( |
|
152 | 152 | 'title' => 'Reporting statistics', |
153 | 153 | 'parent' => 'admin', |
154 | 154 | 'url' => 'admin/reporting_stats.php' |
155 | 155 | ), |
156 | - 'admin_photos' => array ( |
|
156 | + 'admin_photos' => array( |
|
157 | 157 | 'title' => 'Photo upload/attribution', |
158 | 158 | 'parent' => 'admin', |
159 | 159 | 'url' => 'admin/photos.php', |
160 | 160 | ), |
161 | - 'admin_profile_message' => array ( |
|
161 | + 'admin_profile_message' => array( |
|
162 | 162 | 'title' => 'Profile message banner', |
163 | 163 | 'parent' => 'admin', |
164 | 164 | 'url' => 'admin/profile-message.php', |
165 | 165 | ), |
166 | - 'admin_mpurls' => array ( |
|
166 | + 'admin_mpurls' => array( |
|
167 | 167 | 'title' => 'MP Websites', |
168 | 168 | 'parent' => 'admin', |
169 | 169 | 'url' => 'admin/websites.php', |
170 | 170 | ), |
171 | - 'admin_policies' => array ( |
|
171 | + 'admin_policies' => array( |
|
172 | 172 | 'title' => 'MP Policy details', |
173 | 173 | 'parent' => 'admin', |
174 | 174 | 'url' => 'admin/policies.php', |
175 | 175 | ), |
176 | - 'admin_banner' => array ( |
|
176 | + 'admin_banner' => array( |
|
177 | 177 | 'title' => 'Edit Banner', |
178 | 178 | 'parent' => 'admin', |
179 | 179 | 'url' => 'admin/banner.php', |
180 | 180 | ), |
181 | - 'admin_featured' => array ( |
|
181 | + 'admin_featured' => array( |
|
182 | 182 | 'title' => 'Featured debates', |
183 | 183 | 'parent' => 'admin', |
184 | 184 | 'url' => 'admin/featured.php', |
185 | 185 | ), |
186 | - 'admin_topics' => array ( |
|
186 | + 'admin_topics' => array( |
|
187 | 187 | 'title' => 'Topics', |
188 | 188 | 'parent' => 'admin', |
189 | 189 | 'url' => 'admin/topics.php', |
190 | 190 | ), |
191 | - 'admin_edittopics' => array ( |
|
191 | + 'admin_edittopics' => array( |
|
192 | 192 | 'title' => 'Edit Topic', |
193 | 193 | 'parent' => 'admin_topics', |
194 | 194 | 'url' => 'admin/edittopic.php', |
195 | 195 | ), |
196 | - 'admin_wikipedia' => array ( |
|
196 | + 'admin_wikipedia' => array( |
|
197 | 197 | 'title' => 'Wikipedia links', |
198 | 198 | 'parent' => 'admin', |
199 | 199 | 'url' => 'admin/wikipedia.php', |
@@ -201,8 +201,8 @@ discard block |
||
201 | 201 | |
202 | 202 | // Added by Richard Allan for email alert functions |
203 | 203 | |
204 | - 'alert' => array ( |
|
205 | - 'menu' => array ( |
|
204 | + 'alert' => array( |
|
205 | + 'menu' => array( |
|
206 | 206 | 'text' => 'Email Alerts', |
207 | 207 | 'title' => "Set up alerts for updates on an MP or Peer by email", |
208 | 208 | 'sidebar' => 'alert' |
@@ -211,30 +211,30 @@ discard block |
||
211 | 211 | 'title' => 'TheyWorkForYou Email Alerts', |
212 | 212 | 'url' => 'alert/', |
213 | 213 | ), |
214 | - 'alertwelcome' => array ( |
|
214 | + 'alertwelcome' => array( |
|
215 | 215 | 'title' => 'Email Alerts', |
216 | 216 | 'url' => 'alert/', |
217 | 217 | ), |
218 | 218 | |
219 | 219 | // End of ALERTS additions |
220 | 220 | |
221 | - 'api_front' => array ( |
|
222 | - 'menu' => array ( |
|
221 | + 'api_front' => array( |
|
222 | + 'menu' => array( |
|
223 | 223 | 'text' => 'API', |
224 | 224 | 'title' => 'Access our data' |
225 | 225 | ), |
226 | 226 | 'title' => 'TheyWorkForYou API', |
227 | 227 | 'url' => 'api/' |
228 | 228 | ), |
229 | - 'api_doc_front' => array ( |
|
230 | - 'menu' => array ( |
|
229 | + 'api_doc_front' => array( |
|
230 | + 'menu' => array( |
|
231 | 231 | 'text' => 'API', |
232 | 232 | 'title' => 'Access our data' |
233 | 233 | ), |
234 | 234 | 'parent' => 'api_front', |
235 | 235 | 'url' => 'api/' |
236 | 236 | ), |
237 | - 'api_key' => array ( |
|
237 | + 'api_key' => array( |
|
238 | 238 | 'title' => 'Plan and keys', |
239 | 239 | 'parent' => 'api_front', |
240 | 240 | 'url' => 'api/key' |
@@ -245,69 +245,69 @@ discard block |
||
245 | 245 | 'url' => 'boundaries/', |
246 | 246 | ), |
247 | 247 | |
248 | - 'calendar_summary' => array ( |
|
249 | - 'menu' => array ( |
|
248 | + 'calendar_summary' => array( |
|
249 | + 'menu' => array( |
|
250 | 250 | 'text' => 'Upcoming', |
251 | 251 | 'title' => '', |
252 | 252 | ), |
253 | 253 | 'parent' => 'hansard', |
254 | 254 | 'url' => 'calendar/' |
255 | 255 | ), |
256 | - 'calendar_future_head' => array ( |
|
256 | + 'calendar_future_head' => array( |
|
257 | 257 | 'parent' => 'calendar_summary', |
258 | 258 | 'title' => 'Upcoming business', |
259 | 259 | 'url' => 'calendar/' |
260 | 260 | ), |
261 | - 'calendar_future' => array ( |
|
261 | + 'calendar_future' => array( |
|
262 | 262 | 'parent' => 'calendar_future_head', |
263 | 263 | 'url' => 'calendar/' |
264 | 264 | ), |
265 | - 'calendar_today_head' => array ( |
|
265 | + 'calendar_today_head' => array( |
|
266 | 266 | 'parent' => 'calendar_summary', |
267 | 267 | 'title' => 'Today’s business', |
268 | 268 | 'url' => 'calendar/' |
269 | 269 | ), |
270 | - 'calendar_today' => array ( |
|
270 | + 'calendar_today' => array( |
|
271 | 271 | 'parent' => 'calendar_today_head', |
272 | 272 | 'url' => 'calendar/' |
273 | 273 | ), |
274 | - 'calendar_past_head' => array ( |
|
274 | + 'calendar_past_head' => array( |
|
275 | 275 | 'parent' => 'calendar_summary', |
276 | 276 | 'title' => 'Previous business', |
277 | 277 | 'url' => 'calendar/' |
278 | 278 | ), |
279 | - 'calendar_past' => array ( |
|
279 | + 'calendar_past' => array( |
|
280 | 280 | 'parent' => 'calendar_past_head', |
281 | 281 | 'url' => 'calendar/' |
282 | 282 | ), |
283 | 283 | |
284 | - 'cards' => array ( |
|
284 | + 'cards' => array( |
|
285 | 285 | 'title' => 'MP Stats Cards', |
286 | 286 | 'url' => 'cards/' |
287 | 287 | ), |
288 | 288 | |
289 | - 'campaign_foi' => array ( |
|
289 | + 'campaign_foi' => array( |
|
290 | 290 | 'title' => 'Freedom of Information (Parliament) Order 2009', |
291 | 291 | 'url' => 'foiorder2009/' |
292 | 292 | ), |
293 | - 'campaign' => array ( |
|
293 | + 'campaign' => array( |
|
294 | 294 | 'title' => '', #Free Our Bills!', |
295 | 295 | 'url' => 'freeourbills/' |
296 | 296 | ), |
297 | - 'campaign_edm' => array ( |
|
297 | + 'campaign_edm' => array( |
|
298 | 298 | 'title' => 'Early Day Motion', |
299 | 299 | 'parent' => 'campaign', |
300 | 300 | 'url' => 'freeourbills/' |
301 | 301 | ), |
302 | 302 | |
303 | - 'commentreport' => array ( |
|
303 | + 'commentreport' => array( |
|
304 | 304 | 'title' => 'Reporting a comment', |
305 | 305 | 'url' => 'report/', |
306 | - 'session_vars' => array ('id') |
|
306 | + 'session_vars' => array('id') |
|
307 | 307 | ), |
308 | 308 | |
309 | - 'comments_recent' => array ( |
|
310 | - 'menu' => array ( |
|
309 | + 'comments_recent' => array( |
|
310 | + 'menu' => array( |
|
311 | 311 | 'text' => 'Recent comments', |
312 | 312 | 'title' => "Recently posted comments" |
313 | 313 | ), |
@@ -316,8 +316,8 @@ discard block |
||
316 | 316 | 'url' => 'comments/recent/' |
317 | 317 | ), |
318 | 318 | |
319 | - 'contact' => array ( |
|
320 | - 'menu' => array ( |
|
319 | + 'contact' => array( |
|
320 | + 'menu' => array( |
|
321 | 321 | 'text' => 'Contact', |
322 | 322 | 'title' => '', |
323 | 323 | ), |
@@ -328,23 +328,23 @@ discard block |
||
328 | 328 | 'title' => 'News', |
329 | 329 | 'url' => 'https://www.mysociety.org/category/projects/theyworkforyou/' |
330 | 330 | ), |
331 | - 'debate' => array ( |
|
331 | + 'debate' => array( |
|
332 | 332 | 'parent' => 'debatesfront', |
333 | 333 | 'url' => 'debates/', |
334 | - 'session_vars' => array ('id'), |
|
334 | + 'session_vars' => array('id'), |
|
335 | 335 | ), |
336 | - 'debates' => array ( |
|
336 | + 'debates' => array( |
|
337 | 337 | 'parent' => 'debatesfront', |
338 | 338 | 'url' => 'debates/', |
339 | - 'session_vars' => array ('id'), |
|
339 | + 'session_vars' => array('id'), |
|
340 | 340 | ), |
341 | - 'debatesday' => array ( |
|
341 | + 'debatesday' => array( |
|
342 | 342 | 'parent' => 'debatesfront', |
343 | - 'session_vars' => array ('d'), |
|
343 | + 'session_vars' => array('d'), |
|
344 | 344 | 'url' => 'debates/', |
345 | 345 | ), |
346 | - 'alldebatesfront' => array ( |
|
347 | - 'menu' => array ( |
|
346 | + 'alldebatesfront' => array( |
|
347 | + 'menu' => array( |
|
348 | 348 | 'text' => 'Debates', |
349 | 349 | 'title' => "Debates in the House of Commons, Westminster Hall, and the House of Lords" |
350 | 350 | ), |
@@ -353,8 +353,8 @@ discard block |
||
353 | 353 | 'rss' => 'rss/debates.rss', |
354 | 354 | 'url' => 'debates/' |
355 | 355 | ), |
356 | - 'debatesfront' => array ( |
|
357 | - 'menu' => array ( |
|
356 | + 'debatesfront' => array( |
|
357 | + 'menu' => array( |
|
358 | 358 | 'text' => 'Commons debates', |
359 | 359 | 'title' => "Debates in the House of Commons" |
360 | 360 | ), |
@@ -363,12 +363,12 @@ discard block |
||
363 | 363 | 'rss' => 'rss/debates.rss', |
364 | 364 | 'url' => 'debates/' |
365 | 365 | ), |
366 | - 'debatesyear' => array ( |
|
366 | + 'debatesyear' => array( |
|
367 | 367 | 'parent' => 'debatesfront', |
368 | 368 | 'url' => 'debates/' |
369 | 369 | ), |
370 | - 'divisions_recent' => array ( |
|
371 | - 'menu' => array ( |
|
370 | + 'divisions_recent' => array( |
|
371 | + 'menu' => array( |
|
372 | 372 | 'text' => 'Recent Votes', |
373 | 373 | 'title' => '' |
374 | 374 | ), |
@@ -376,13 +376,13 @@ discard block |
||
376 | 376 | 'title' => 'Recent Votes', |
377 | 377 | 'url' => 'divisions/' |
378 | 378 | ), |
379 | - 'divisions_vote' => array ( |
|
379 | + 'divisions_vote' => array( |
|
380 | 380 | 'parent' => 'divisions_recent', |
381 | 381 | 'title' => 'Vote', |
382 | 382 | 'url' => 'divisions/division.php', |
383 | 383 | 'session_vars' => array('vote'), |
384 | 384 | ), |
385 | - 'epvote' => array ( |
|
385 | + 'epvote' => array( |
|
386 | 386 | 'url' => 'vote/' |
387 | 387 | ), |
388 | 388 | |
@@ -391,19 +391,19 @@ discard block |
||
391 | 391 | 'title' => 'TheyWorkForYou Google gadget', |
392 | 392 | ), |
393 | 393 | |
394 | - 'glossary' => array ( |
|
394 | + 'glossary' => array( |
|
395 | 395 | 'heading' => 'Glossary', |
396 | 396 | 'parent' => 'help_us_out', |
397 | 397 | 'url' => 'glossary/' |
398 | 398 | ), |
399 | - 'glossary_item' => array ( |
|
399 | + 'glossary_item' => array( |
|
400 | 400 | 'heading' => 'Glossary heading', |
401 | 401 | 'parent' => 'help_us_out', |
402 | 402 | 'url' => 'glossary/', |
403 | - 'session_vars' => array ('g') |
|
403 | + 'session_vars' => array('g') |
|
404 | 404 | ), |
405 | - 'hansard' => array ( |
|
406 | - 'menu' => array ( |
|
405 | + 'hansard' => array( |
|
406 | + 'menu' => array( |
|
407 | 407 | 'text' => 'UK Parliament', |
408 | 408 | 'title' => "Houses of Parliament debates, Written Answers, Statements, Westminster Hall debates, and Bill Committees" |
409 | 409 | ), |
@@ -411,16 +411,16 @@ discard block |
||
411 | 411 | 'url' => '' |
412 | 412 | ), |
413 | 413 | // Hansard landing page |
414 | - 'hansard_landing' => array ( |
|
414 | + 'hansard_landing' => array( |
|
415 | 415 | 'title' => 'Hansard', |
416 | 416 | 'url' => 'search-hansard/', |
417 | 417 | ), |
418 | - 'help' => array ( |
|
418 | + 'help' => array( |
|
419 | 419 | 'title' => 'Help - Frequently Asked Questions', |
420 | 420 | 'url' => 'help/' |
421 | 421 | ), |
422 | - 'help_us_out' => array ( |
|
423 | - 'menu' => array ( |
|
422 | + 'help_us_out' => array( |
|
423 | + 'menu' => array( |
|
424 | 424 | 'text' => 'Glossary', |
425 | 425 | 'title' => "Parliament's jargon explained" |
426 | 426 | ), |
@@ -429,88 +429,88 @@ discard block |
||
429 | 429 | 'url' => 'addterm/', |
430 | 430 | 'sidebar' => 'glossary_add' |
431 | 431 | ), |
432 | - 'home' => array ( |
|
432 | + 'home' => array( |
|
433 | 433 | 'title' => "UK Parliament", |
434 | 434 | 'rss' => 'news/index.rdf', |
435 | 435 | 'url' => '' |
436 | 436 | ), |
437 | - 'houserules' => array ( |
|
437 | + 'houserules' => array( |
|
438 | 438 | 'title' => 'House rules', |
439 | 439 | 'url' => 'houserules/' |
440 | 440 | ), |
441 | 441 | |
442 | - 'linktous' => array ( |
|
442 | + 'linktous' => array( |
|
443 | 443 | 'title' => 'Link to us', |
444 | 444 | 'heading' => 'How to link to us', |
445 | 445 | 'url' => 'help/linktous/' |
446 | 446 | ), |
447 | - 'api' => array ( |
|
447 | + 'api' => array( |
|
448 | 448 | 'title' => 'API', |
449 | 449 | 'heading' => 'API - Query the TheyWorkForYou database', |
450 | 450 | 'url' => 'api/' |
451 | 451 | ), |
452 | - 'data' => array ( |
|
452 | + 'data' => array( |
|
453 | 453 | 'title' => 'Raw Data', |
454 | 454 | 'heading' => 'Raw data (XML) - the data behind TheyWorkForYou and Public Whip', |
455 | 455 | 'url' => 'http://parser.theyworkforyou.com' |
456 | 456 | ), |
457 | - 'pombola' => array ( |
|
457 | + 'pombola' => array( |
|
458 | 458 | 'title' => 'Pombola', |
459 | 459 | 'heading' => 'mySociety\'s platform for running a Parliamentary monitoring site like this', |
460 | 460 | 'url' => 'https://www.mysociety.org/projects/parliamentarymonitoring/pombola' |
461 | 461 | ), |
462 | - 'devmailinglist' => array ( |
|
462 | + 'devmailinglist' => array( |
|
463 | 463 | 'title' => 'Developer mailing list', |
464 | 464 | 'heading' => 'Developer mailing list', |
465 | 465 | 'url' => 'https://groups.google.com/a/mysociety.org/forum/#!forum/theyworkforyou' |
466 | 466 | ), |
467 | - 'code' => array ( |
|
467 | + 'code' => array( |
|
468 | 468 | 'title' => 'Source code', |
469 | 469 | 'heading' => 'TheyWorkForYou Source code', |
470 | 470 | 'url' => 'https://github.com/mysociety/theyworkforyou' |
471 | 471 | ), |
472 | - 'irc' => array ( |
|
472 | + 'irc' => array( |
|
473 | 473 | 'title' => 'IRC chat channel', |
474 | 474 | 'heading' => 'IRC chat channel', |
475 | 475 | 'url' => 'http://www.irc.mysociety.org/' |
476 | 476 | ), |
477 | - 'newzealand' => array ( |
|
477 | + 'newzealand' => array( |
|
478 | 478 | 'title' => 'New Zealand', |
479 | 479 | 'heading' => 'They Work For You - New Zealand', |
480 | 480 | 'url' => 'http://www.theyworkforyou.co.nz/' |
481 | 481 | ), |
482 | - 'australia' => array ( |
|
482 | + 'australia' => array( |
|
483 | 483 | 'title' => 'Australia', |
484 | 484 | 'heading' => 'Open Australia', |
485 | 485 | 'url' => 'http://www.openaustralia.org/' |
486 | 486 | ), |
487 | - 'ireland' => array ( |
|
487 | + 'ireland' => array( |
|
488 | 488 | 'title' => 'Ireland', |
489 | 489 | 'heading' => 'TheyWorkForYou for the Houses of the Oireachtas', |
490 | 490 | 'url' => 'http://www.kildarestreet.com/' |
491 | 491 | ), |
492 | - 'mzalendo' => array ( |
|
492 | + 'mzalendo' => array( |
|
493 | 493 | 'title' => 'Mzalendo', |
494 | 494 | 'heading' => 'Keeping an eye on the Kenyan Parliament', |
495 | 495 | 'url' => 'http://info.mzalendo.com/' |
496 | 496 | ), |
497 | - 'lordsdebate' => array ( |
|
497 | + 'lordsdebate' => array( |
|
498 | 498 | 'parent' => 'lordsdebatesfront', |
499 | 499 | 'url' => 'lords/', |
500 | - 'session_vars' => array ('id'), |
|
500 | + 'session_vars' => array('id'), |
|
501 | 501 | ), |
502 | - 'lordsdebates' => array ( |
|
502 | + 'lordsdebates' => array( |
|
503 | 503 | 'parent' => 'lordsdebatesfront', |
504 | 504 | 'url' => 'lords/', |
505 | - 'session_vars' => array ('id'), |
|
505 | + 'session_vars' => array('id'), |
|
506 | 506 | ), |
507 | - 'lordsdebatesday' => array ( |
|
507 | + 'lordsdebatesday' => array( |
|
508 | 508 | 'parent' => 'lordsdebatesfront', |
509 | - 'session_vars' => array ('d'), |
|
509 | + 'session_vars' => array('d'), |
|
510 | 510 | 'url' => 'lords/', |
511 | 511 | ), |
512 | - 'lordsdebatesfront' => array ( |
|
513 | - 'menu' => array ( |
|
512 | + 'lordsdebatesfront' => array( |
|
513 | + 'menu' => array( |
|
514 | 514 | 'text' => 'Lords debates', |
515 | 515 | 'title' => "House of Lords debates" |
516 | 516 | ), |
@@ -519,24 +519,24 @@ discard block |
||
519 | 519 | 'rss' => 'rss/lords.rss', |
520 | 520 | 'url' => 'lords/' |
521 | 521 | ), |
522 | - 'lordsdebatesyear' => array ( |
|
522 | + 'lordsdebatesyear' => array( |
|
523 | 523 | 'parent' => 'lordsdebatesfront', |
524 | 524 | 'url' => 'lords/' |
525 | 525 | ), |
526 | 526 | |
527 | 527 | // Parliament landing page |
528 | - 'parliament_landing' => array ( |
|
528 | + 'parliament_landing' => array( |
|
529 | 529 | 'title' => 'Parliament', |
530 | 530 | 'url' => 'parliament/', |
531 | 531 | ), |
532 | 532 | |
533 | - 'peer' => array ( |
|
533 | + 'peer' => array( |
|
534 | 534 | 'parent' => 'peers', |
535 | 535 | 'title' => 'Peer', |
536 | 536 | 'url' => 'peer/' |
537 | 537 | ), |
538 | - 'peers' => array ( |
|
539 | - 'menu' => array ( |
|
538 | + 'peers' => array( |
|
539 | + 'menu' => array( |
|
540 | 540 | 'text' => 'Lords', |
541 | 541 | 'title' => "List of all Lords" |
542 | 542 | ), |
@@ -544,8 +544,8 @@ discard block |
||
544 | 544 | 'title' => '', |
545 | 545 | 'url' => 'peers/' |
546 | 546 | ), |
547 | -'overview' => array ( |
|
548 | - 'menu' => array ( |
|
547 | +'overview' => array( |
|
548 | + 'menu' => array( |
|
549 | 549 | 'text' => 'Overview', |
550 | 550 | 'title' => "Overview of the UK Parliament" |
551 | 551 | ), |
@@ -554,50 +554,50 @@ discard block |
||
554 | 554 | 'rss' => 'news/index.rdf', |
555 | 555 | 'url' => '' |
556 | 556 | ), |
557 | - 'mla' => array ( |
|
557 | + 'mla' => array( |
|
558 | 558 | 'parent' => 'mlas', |
559 | 559 | 'title' => 'Find your MLA', |
560 | 560 | 'url' => 'mla/' |
561 | 561 | ), |
562 | - 'mlas' => array ( |
|
562 | + 'mlas' => array( |
|
563 | 563 | 'parent' => 'ni_home', |
564 | - 'menu' => array ( |
|
564 | + 'menu' => array( |
|
565 | 565 | 'text' => 'MLAs', |
566 | 566 | 'title' => "List of all Members of the Northern Ireland Assembly (MLAs)" |
567 | 567 | ), |
568 | 568 | 'title' => '', |
569 | 569 | 'url' => 'mlas/' |
570 | 570 | ), |
571 | - 'msps' => array ( |
|
571 | + 'msps' => array( |
|
572 | 572 | 'parent' => 'sp_home', |
573 | - 'menu' => array ( |
|
573 | + 'menu' => array( |
|
574 | 574 | 'text' => 'MSPs', |
575 | 575 | 'title' => "List of Members of the Scottish Parliament (MSPs)" |
576 | 576 | ), |
577 | 577 | 'title' => '', |
578 | 578 | 'url' => 'msps/' |
579 | 579 | ), |
580 | - 'msp' => array ( |
|
580 | + 'msp' => array( |
|
581 | 581 | 'parent' => 'msps', |
582 | 582 | 'title' => 'Find your MSP', |
583 | 583 | 'url' => 'msp/' |
584 | 584 | ), |
585 | 585 | /* Not 'Your MP', whose name is 'yourmp'... */ |
586 | - 'mp' => array ( |
|
586 | + 'mp' => array( |
|
587 | 587 | 'parent' => 'mps', |
588 | 588 | 'title' => 'Find your MP', |
589 | 589 | 'url' => 'mp/' |
590 | 590 | ), |
591 | - 'emailfriend' => array ( |
|
591 | + 'emailfriend' => array( |
|
592 | 592 | 'title' => 'Send this page to a friend', |
593 | 593 | 'url' => 'email/' |
594 | 594 | ), |
595 | 595 | // The directory MPs' RSS feeds are stored in. |
596 | - 'mp_rss' => array ( |
|
596 | + 'mp_rss' => array( |
|
597 | 597 | 'url' => 'rss/mp/' |
598 | 598 | ), |
599 | - 'mps' => array ( |
|
600 | - 'menu' => array ( |
|
599 | + 'mps' => array( |
|
600 | + 'menu' => array( |
|
601 | 601 | 'text' => 'MPs', |
602 | 602 | 'title' => "List of all Members of Parliament (MPs)" |
603 | 603 | ), |
@@ -608,16 +608,16 @@ discard block |
||
608 | 608 | |
609 | 609 | /* Northern Ireland Assembly */ |
610 | 610 | 'ni_home' => array( |
611 | - 'menu' => array ( |
|
611 | + 'menu' => array( |
|
612 | 612 | 'text' => 'Northern Ireland Assembly', |
613 | 613 | 'title' => 'Full authority over <em>transferred matters</em>, which include agriculture, education, employment, the environment and health' |
614 | 614 | ), |
615 | 615 | 'title' => 'Northern Ireland Assembly', |
616 | 616 | 'url' => 'ni/' |
617 | 617 | ), |
618 | - 'nioverview' => array ( |
|
618 | + 'nioverview' => array( |
|
619 | 619 | 'parent' => 'ni_home', |
620 | - 'menu' => array ( |
|
620 | + 'menu' => array( |
|
621 | 621 | 'text' => 'Debates', |
622 | 622 | 'title' => "Overview of the Northern Ireland Assembly debates" |
623 | 623 | ), |
@@ -625,23 +625,23 @@ discard block |
||
625 | 625 | 'rss' => 'rss/ni.rss', |
626 | 626 | 'url' => 'ni/' |
627 | 627 | ), |
628 | - 'nidebate' => array ( |
|
628 | + 'nidebate' => array( |
|
629 | 629 | 'parent' => 'nidebatesfront', |
630 | 630 | 'url' => 'ni/', |
631 | - 'session_vars' => array ('id'), |
|
631 | + 'session_vars' => array('id'), |
|
632 | 632 | ), |
633 | - 'nidebates' => array ( |
|
633 | + 'nidebates' => array( |
|
634 | 634 | 'parent' => 'nidebatesfront', |
635 | 635 | 'url' => 'ni/', |
636 | - 'session_vars' => array ('id'), |
|
636 | + 'session_vars' => array('id'), |
|
637 | 637 | ), |
638 | - 'nidebatesday' => array ( |
|
638 | + 'nidebatesday' => array( |
|
639 | 639 | 'parent' => 'nidebatesfront', |
640 | - 'session_vars' => array ('d'), |
|
640 | + 'session_vars' => array('d'), |
|
641 | 641 | 'url' => 'ni/', |
642 | 642 | ), |
643 | - 'nidebatesfront' => array ( |
|
644 | - 'menu' => array ( |
|
643 | + 'nidebatesfront' => array( |
|
644 | + 'menu' => array( |
|
645 | 645 | 'text' => 'Debates', |
646 | 646 | 'title' => "Northern Ireland Assembly debates" |
647 | 647 | ), |
@@ -650,7 +650,7 @@ discard block |
||
650 | 650 | 'rss' => 'rss/ni.rss', |
651 | 651 | 'url' => 'ni/' |
652 | 652 | ), |
653 | - 'nidebatesyear' => array ( |
|
653 | + 'nidebatesyear' => array( |
|
654 | 654 | 'parent' => 'nidebatesfront', |
655 | 655 | 'url' => 'ni/' |
656 | 656 | ), |
@@ -658,7 +658,7 @@ discard block |
||
658 | 658 | /* London Assembly */ |
659 | 659 | |
660 | 660 | 'london_home' => array( |
661 | - 'menu' => array ( |
|
661 | + 'menu' => array( |
|
662 | 662 | 'text' => 'London Assembly', |
663 | 663 | 'title' => 'Members of the London Assembly, answers from the Mayor of London' |
664 | 664 | ), |
@@ -666,9 +666,9 @@ discard block |
||
666 | 666 | 'url' => 'london/' |
667 | 667 | ), |
668 | 668 | |
669 | - 'lmqoverview' => array ( |
|
669 | + 'lmqoverview' => array( |
|
670 | 670 | 'parent' => 'london_home', |
671 | - 'menu' => array ( |
|
671 | + 'menu' => array( |
|
672 | 672 | 'text' => 'Questions to the Mayor of London', |
673 | 673 | 'title' => "Questions to the Mayor of London" |
674 | 674 | ), |
@@ -677,9 +677,9 @@ discard block |
||
677 | 677 | 'url' => 'london/' |
678 | 678 | ), |
679 | 679 | |
680 | - 'london_assembly_members' => array ( |
|
680 | + 'london_assembly_members' => array( |
|
681 | 681 | 'parent' => 'london_home', |
682 | - 'menu' => array ( |
|
682 | + 'menu' => array( |
|
683 | 683 | 'text' => 'London Assembly Members', |
684 | 684 | 'title' => "List of Members of the London Assembly)" |
685 | 685 | ), |
@@ -687,25 +687,25 @@ discard block |
||
687 | 687 | 'url' => 'london-assembly-members/' |
688 | 688 | ), |
689 | 689 | |
690 | - 'london_assembly_member' => array ( |
|
690 | + 'london_assembly_member' => array( |
|
691 | 691 | 'parent' => 'london_assembly_members', |
692 | 692 | 'title' => 'Find your London Assembly Member', |
693 | 693 | 'url' => 'london-assembly-member/' |
694 | 694 | ), |
695 | 695 | |
696 | - 'otheruseredit' => array ( |
|
696 | + 'otheruseredit' => array( |
|
697 | 697 | 'pg' => 'editother', |
698 | 698 | 'title' => "Editing a user's data", |
699 | 699 | 'url' => 'user/' |
700 | 700 | ), |
701 | - 'privacy' => array ( |
|
701 | + 'privacy' => array( |
|
702 | 702 | 'title' => 'Privacy Policy', |
703 | 703 | 'url' => 'privacy/' |
704 | 704 | ), |
705 | 705 | |
706 | 706 | /* Public bill committees */ |
707 | - 'pbc_front' => array ( |
|
708 | - 'menu' => array ( |
|
707 | + 'pbc_front' => array( |
|
708 | + 'menu' => array( |
|
709 | 709 | 'text' => 'Bill Committees', |
710 | 710 | 'title' => "Public Bill Committees (formerly Standing Committees) debates" |
711 | 711 | ), |
@@ -723,17 +723,17 @@ discard block |
||
723 | 723 | 'title' => '', |
724 | 724 | 'url' => 'pbc/', |
725 | 725 | 'parent' => 'pbc_front', |
726 | - 'session_vars' => array ('bill'), |
|
726 | + 'session_vars' => array('bill'), |
|
727 | 727 | ), |
728 | 728 | 'pbc_clause' => array( |
729 | 729 | 'parent' => 'pbc_front', |
730 | 730 | 'url' => 'pbc/', |
731 | - 'session_vars' => array ('id'), |
|
731 | + 'session_vars' => array('id'), |
|
732 | 732 | ), |
733 | 733 | 'pbc_speech' => array( |
734 | 734 | 'parent' => 'pbc_front', |
735 | 735 | 'url' => 'pbc/', |
736 | - 'session_vars' => array ('id'), |
|
736 | + 'session_vars' => array('id'), |
|
737 | 737 | ), |
738 | 738 | |
739 | 739 | 'people' => array( |
@@ -745,62 +745,62 @@ discard block |
||
745 | 745 | 'url' => '', |
746 | 746 | ), |
747 | 747 | |
748 | - 'raw' => array ( |
|
748 | + 'raw' => array( |
|
749 | 749 | 'title' => 'Raw data', |
750 | 750 | 'url' => 'raw/' |
751 | 751 | ), |
752 | 752 | |
753 | - 'regmem' => array ( |
|
753 | + 'regmem' => array( |
|
754 | 754 | 'title' => 'Changes to the Register of Members\' Interests', |
755 | 755 | 'url' => 'regmem/' |
756 | 756 | ), |
757 | 757 | |
758 | - 'regmem_date' => array ( |
|
758 | + 'regmem_date' => array( |
|
759 | 759 | 'url' => 'regmem/', |
760 | 760 | 'parent' => 'regmem' |
761 | 761 | ), |
762 | 762 | |
763 | - 'regmem_mp' => array ( |
|
763 | + 'regmem_mp' => array( |
|
764 | 764 | 'url' => 'regmem/', |
765 | 765 | 'parent' => 'regmem' |
766 | 766 | ), |
767 | 767 | |
768 | - 'regmem_diff' => array ( |
|
768 | + 'regmem_diff' => array( |
|
769 | 769 | 'url' => 'regmem/', |
770 | 770 | 'parent' => 'regmem' |
771 | 771 | ), |
772 | 772 | |
773 | - 'royal' => array ( |
|
773 | + 'royal' => array( |
|
774 | 774 | 'parent' => 'hansard', |
775 | 775 | 'title' => 'Royal', |
776 | 776 | 'url' => 'royal/', |
777 | 777 | ), |
778 | 778 | |
779 | - 'topic' => array ( |
|
779 | + 'topic' => array( |
|
780 | 780 | 'parent' => 'topics', |
781 | 781 | 'url' => 'topic/topic.php', |
782 | 782 | ), |
783 | 783 | |
784 | - 'topics' => array ( |
|
784 | + 'topics' => array( |
|
785 | 785 | 'title' => 'Topics', |
786 | 786 | 'url' => 'topic/', |
787 | 787 | ), |
788 | 788 | |
789 | - 'search' => array ( |
|
789 | + 'search' => array( |
|
790 | 790 | 'sidebar' => 'search', |
791 | 791 | 'url' => 'search/', |
792 | 792 | 'robots' => 'noindex, nofollow', |
793 | 793 | 'heading' => '', |
794 | - 'session_vars' => array ('q', 's', 'pid', 'o', 'pop') |
|
794 | + 'session_vars' => array('q', 's', 'pid', 'o', 'pop') |
|
795 | 795 | ), |
796 | - 'search_help' => array ( |
|
796 | + 'search_help' => array( |
|
797 | 797 | 'sidebar' => 'search', |
798 | 798 | 'title' => 'Help with searching', |
799 | 799 | 'url' => 'search/' |
800 | 800 | ), |
801 | 801 | |
802 | - 'sitenews' => array ( |
|
803 | - 'menu' => array ( |
|
802 | + 'sitenews' => array( |
|
803 | + 'menu' => array( |
|
804 | 804 | 'text' => 'TheyWorkForYou news', |
805 | 805 | 'title' => "News about changes to this website" |
806 | 806 | ), |
@@ -810,68 +810,68 @@ discard block |
||
810 | 810 | 'title' => 'TheyWorkForYou news', |
811 | 811 | 'url' => 'news/' |
812 | 812 | ), |
813 | - 'sitenews_archive' => array ( |
|
813 | + 'sitenews_archive' => array( |
|
814 | 814 | 'parent' => 'sitenews', |
815 | 815 | 'rss' => 'news/index.rdf', |
816 | 816 | 'sidebar' => 'sitenews', |
817 | 817 | 'title' => 'Archive', |
818 | 818 | 'url' => 'news/archives/' |
819 | 819 | ), |
820 | - 'sitenews_atom' => array ( |
|
820 | + 'sitenews_atom' => array( |
|
821 | 821 | 'url' => 'news/atom.xml' |
822 | 822 | ), |
823 | - 'sitenews_date' => array ( |
|
823 | + 'sitenews_date' => array( |
|
824 | 824 | 'parent' => 'sitenews', |
825 | 825 | 'rss' => 'news/index.rdf', |
826 | 826 | 'sidebar' => 'sitenews' |
827 | 827 | ), |
828 | - 'sitenews_individual' => array ( |
|
828 | + 'sitenews_individual' => array( |
|
829 | 829 | 'parent' => 'sitenews', |
830 | 830 | 'rss' => 'news/index.rdf', |
831 | 831 | 'sidebar' => 'sitenews', |
832 | 832 | ), |
833 | - 'sitenews_rss1' => array ( |
|
833 | + 'sitenews_rss1' => array( |
|
834 | 834 | 'url' => 'news/index.rdf' |
835 | 835 | ), |
836 | - 'sitenews_rss2' => array ( |
|
836 | + 'sitenews_rss2' => array( |
|
837 | 837 | 'url' => 'news/index.xml' |
838 | 838 | ), |
839 | 839 | |
840 | 840 | /* Scottish Parliament */ |
841 | 841 | 'sp_home' => array( |
842 | - 'menu' => array ( |
|
842 | + 'menu' => array( |
|
843 | 843 | 'text' => 'Scottish Parliament', |
844 | 844 | 'title' => 'Scottish education, health, agriculture, justice, prisons and other devolved areas. Some tax-varying powers' |
845 | 845 | ), |
846 | 846 | 'title' => 'Scottish Parliament', |
847 | 847 | 'url' => 'scotland/' |
848 | 848 | ), |
849 | - 'spoverview' => array ( |
|
849 | + 'spoverview' => array( |
|
850 | 850 | 'parent' => 'sp_home', |
851 | - 'menu' => array ( |
|
851 | + 'menu' => array( |
|
852 | 852 | 'text' => 'Overview', |
853 | 853 | 'title' => "Overview of the Scottish Parliament" |
854 | 854 | ), |
855 | 855 | 'title' => '', |
856 | 856 | 'url' => 'scotland/' |
857 | 857 | ), |
858 | - 'spdebate' => array ( |
|
858 | + 'spdebate' => array( |
|
859 | 859 | 'parent' => 'spdebatesfront', |
860 | 860 | 'url' => 'sp/', |
861 | - 'session_vars' => array ('id'), |
|
861 | + 'session_vars' => array('id'), |
|
862 | 862 | ), |
863 | - 'spdebates' => array ( |
|
863 | + 'spdebates' => array( |
|
864 | 864 | 'parent' => 'spdebatesfront', |
865 | 865 | 'url' => 'sp/', |
866 | - 'session_vars' => array ('id'), |
|
866 | + 'session_vars' => array('id'), |
|
867 | 867 | ), |
868 | - 'spdebatesday' => array ( |
|
868 | + 'spdebatesday' => array( |
|
869 | 869 | 'parent' => 'spdebatesfront', |
870 | - 'session_vars' => array ('d'), |
|
870 | + 'session_vars' => array('d'), |
|
871 | 871 | 'url' => 'sp/', |
872 | 872 | ), |
873 | - 'spdebatesfront' => array ( |
|
874 | - 'menu' => array ( |
|
873 | + 'spdebatesfront' => array( |
|
874 | + 'menu' => array( |
|
875 | 875 | 'text' => 'Debates', |
876 | 876 | 'title' => '' |
877 | 877 | ), |
@@ -880,21 +880,21 @@ discard block |
||
880 | 880 | 'url' => 'sp/' |
881 | 881 | ), |
882 | 882 | |
883 | - 'spdebatesyear' => array ( |
|
883 | + 'spdebatesyear' => array( |
|
884 | 884 | 'parent' => 'spdebatesfront', |
885 | 885 | 'url' => 'sp/' |
886 | 886 | ), |
887 | - 'spwrans' => array ( |
|
887 | + 'spwrans' => array( |
|
888 | 888 | 'parent' => 'spwransfront', |
889 | 889 | 'url' => 'spwrans/', |
890 | 890 | #'session_vars' => array ('id'), |
891 | 891 | ), |
892 | - 'spwransday' => array ( |
|
892 | + 'spwransday' => array( |
|
893 | 893 | 'parent' => 'spwransfront', |
894 | 894 | 'url' => 'spwrans/' |
895 | 895 | ), |
896 | - 'spwransfront' => array ( |
|
897 | - 'menu' => array ( |
|
896 | + 'spwransfront' => array( |
|
897 | + 'menu' => array( |
|
898 | 898 | 'text' => 'Written Answers', |
899 | 899 | 'title' => '' |
900 | 900 | ), |
@@ -907,31 +907,31 @@ discard block |
||
907 | 907 | 'title' => 'For questions asked by ', |
908 | 908 | 'url' => 'spwrans/' |
909 | 909 | ), |
910 | - 'spwransyear' => array ( |
|
910 | + 'spwransyear' => array( |
|
911 | 911 | 'parent' => 'spwransfront', |
912 | 912 | 'url' => 'spwrans/' |
913 | 913 | ), |
914 | 914 | |
915 | 915 | // Topic pages |
916 | 916 | |
917 | - 'topic' => array ( |
|
917 | + 'topic' => array( |
|
918 | 918 | 'url' => 'topic/', |
919 | 919 | 'title' => 'Topics' |
920 | 920 | ), |
921 | 921 | |
922 | - 'topicbenefits' => array ( |
|
922 | + 'topicbenefits' => array( |
|
923 | 923 | 'url' => 'topic/benefits', |
924 | 924 | 'parent' => 'topic', |
925 | 925 | 'title' => 'Benefits' |
926 | 926 | ), |
927 | 927 | |
928 | - 'topiccrimestats' => array ( |
|
928 | + 'topiccrimestats' => array( |
|
929 | 929 | 'url' => 'topic/crime-stats', |
930 | 930 | 'parent' => 'topic', |
931 | 931 | 'title' => 'Crime Statistics' |
932 | 932 | ), |
933 | 933 | |
934 | - 'topicnhs' => array ( |
|
934 | + 'topicnhs' => array( |
|
935 | 935 | 'url' => 'topic/nhs', |
936 | 936 | 'parent' => 'topic', |
937 | 937 | 'title' => 'NHS' |
@@ -946,29 +946,29 @@ discard block |
||
946 | 946 | 'url' => 'user/alerts/', |
947 | 947 | 'parent' => 'userviewself' |
948 | 948 | ), |
949 | - 'userchangepc' => array ( |
|
949 | + 'userchangepc' => array( |
|
950 | 950 | 'title' => 'Change your postcode', |
951 | 951 | 'url' => 'user/changepc/' |
952 | 952 | ), |
953 | - 'userconfirm' => array ( |
|
953 | + 'userconfirm' => array( |
|
954 | 954 | 'url' => 'user/confirm/' |
955 | 955 | ), |
956 | - 'userconfirmed' => array ( |
|
956 | + 'userconfirmed' => array( |
|
957 | 957 | 'sidebar' => 'userconfirmed', |
958 | 958 | 'title' => 'Welcome to TheyWorkForYou!', |
959 | 959 | 'url' => 'user/confirm/' |
960 | 960 | ), |
961 | - 'userconfirmfailed' => array ( |
|
961 | + 'userconfirmfailed' => array( |
|
962 | 962 | 'title' => 'Oops!', |
963 | 963 | 'url' => 'user/confirm/' |
964 | 964 | ), |
965 | - 'useredit' => array ( |
|
965 | + 'useredit' => array( |
|
966 | 966 | 'pg' => 'edit', |
967 | 967 | 'title' => 'Edit your details', |
968 | 968 | 'url' => 'user/' |
969 | 969 | ), |
970 | - 'userjoin' => array ( |
|
971 | - 'menu' => array ( |
|
970 | + 'userjoin' => array( |
|
971 | + 'menu' => array( |
|
972 | 972 | 'text' => 'Join', |
973 | 973 | 'title' => "Joining is free and allows you to annotate speeches" |
974 | 974 | ), |
@@ -977,8 +977,8 @@ discard block |
||
977 | 977 | 'title' => 'Join TheyWorkForYou', |
978 | 978 | 'url' => 'user/' |
979 | 979 | ), |
980 | - 'getinvolved' => array ( |
|
981 | - 'menu' => array ( |
|
980 | + 'getinvolved' => array( |
|
981 | + 'menu' => array( |
|
982 | 982 | 'text' => 'Get involved', |
983 | 983 | 'title' => "Contribute to TheyWorkForYou" |
984 | 984 | ), |
@@ -987,8 +987,8 @@ discard block |
||
987 | 987 | 'title' => 'Contribute to TheyWorkForYou', |
988 | 988 | 'url' => 'getinvolved/' |
989 | 989 | ), |
990 | - 'userlogin' => array ( |
|
991 | - 'menu' => array ( |
|
990 | + 'userlogin' => array( |
|
991 | + 'menu' => array( |
|
992 | 992 | 'text' => 'Sign in', |
993 | 993 | 'title' => "If you've already joined , sign in to add annotations" |
994 | 994 | ), |
@@ -997,33 +997,33 @@ discard block |
||
997 | 997 | 'url' => 'user/login/' |
998 | 998 | ), |
999 | 999 | |
1000 | - 'userlogout' => array ( |
|
1001 | - 'menu' => array ( |
|
1000 | + 'userlogout' => array( |
|
1001 | + 'menu' => array( |
|
1002 | 1002 | 'text' => 'Sign out', |
1003 | 1003 | 'title' => "Sign out" |
1004 | 1004 | ), |
1005 | 1005 | 'url' => 'user/logout/' |
1006 | 1006 | ), |
1007 | - 'userpassword' => array ( |
|
1007 | + 'userpassword' => array( |
|
1008 | 1008 | 'title' => 'Change password', |
1009 | 1009 | 'url' => 'user/password/' |
1010 | 1010 | ), |
1011 | - 'userprompt' => array ( |
|
1011 | + 'userprompt' => array( |
|
1012 | 1012 | 'title' => 'Please sign in', |
1013 | 1013 | 'url' => 'user/prompt/' |
1014 | 1014 | ), |
1015 | - 'userview' => array ( |
|
1015 | + 'userview' => array( |
|
1016 | 1016 | 'session_vars' => array('u'), |
1017 | 1017 | 'url' => 'user/' |
1018 | 1018 | ), |
1019 | - 'userviewself' => array ( |
|
1020 | - 'menu' => array ( |
|
1019 | + 'userviewself' => array( |
|
1020 | + 'menu' => array( |
|
1021 | 1021 | 'text' => 'Your details', |
1022 | 1022 | 'title' => "View and edit your details" |
1023 | 1023 | ), |
1024 | 1024 | 'url' => 'user/' |
1025 | 1025 | ), |
1026 | - 'userwelcome' => array ( |
|
1026 | + 'userwelcome' => array( |
|
1027 | 1027 | 'title' => 'Welcome!', |
1028 | 1028 | 'url' => 'user/' |
1029 | 1029 | ), |
@@ -1051,23 +1051,23 @@ discard block |
||
1051 | 1051 | ), |
1052 | 1052 | |
1053 | 1053 | /* Westminster Hall */ |
1054 | - 'whall' => array ( |
|
1054 | + 'whall' => array( |
|
1055 | 1055 | 'parent' => 'whallfront', |
1056 | 1056 | 'url' => 'whall/', |
1057 | - 'session_vars' => array ('id'), |
|
1057 | + 'session_vars' => array('id'), |
|
1058 | 1058 | ), |
1059 | - 'whalls' => array ( |
|
1059 | + 'whalls' => array( |
|
1060 | 1060 | 'parent' => 'whallfront', |
1061 | 1061 | 'url' => 'whall/', |
1062 | - 'session_vars' => array ('id'), |
|
1062 | + 'session_vars' => array('id'), |
|
1063 | 1063 | ), |
1064 | - 'whallday' => array ( |
|
1064 | + 'whallday' => array( |
|
1065 | 1065 | 'parent' => 'whallfront', |
1066 | - 'session_vars' => array ('d'), |
|
1066 | + 'session_vars' => array('d'), |
|
1067 | 1067 | 'url' => 'whall/', |
1068 | 1068 | ), |
1069 | - 'whallfront' => array ( |
|
1070 | - 'menu' => array ( |
|
1069 | + 'whallfront' => array( |
|
1070 | + 'menu' => array( |
|
1071 | 1071 | 'text' => 'Westminster Hall', |
1072 | 1072 | 'title' => "Westminster Hall debates" |
1073 | 1073 | ), |
@@ -1076,23 +1076,23 @@ discard block |
||
1076 | 1076 | 'rss' => 'rss/whall.rss', |
1077 | 1077 | 'url' => 'whall/' |
1078 | 1078 | ), |
1079 | - 'whallyear' => array ( |
|
1079 | + 'whallyear' => array( |
|
1080 | 1080 | 'parent' => 'whallfront', |
1081 | 1081 | 'url' => 'whall/' |
1082 | 1082 | ), |
1083 | 1083 | |
1084 | - 'wms' => array ( |
|
1084 | + 'wms' => array( |
|
1085 | 1085 | 'parent' => 'wranswmsfront', |
1086 | 1086 | 'url' => 'wms/', |
1087 | 1087 | 'session_vars' => array('id') |
1088 | 1088 | ), |
1089 | - 'wmsday' => array ( |
|
1089 | + 'wmsday' => array( |
|
1090 | 1090 | 'parent' => 'wmsfront', |
1091 | 1091 | 'session_vars' => array('d'), |
1092 | 1092 | 'url' => 'wms/' |
1093 | 1093 | ), |
1094 | - 'wmsfront' => array ( |
|
1095 | - 'menu' => array ( |
|
1094 | + 'wmsfront' => array( |
|
1095 | + 'menu' => array( |
|
1096 | 1096 | 'text' => 'Written Ministerial Statements', |
1097 | 1097 | 'title' => '' |
1098 | 1098 | ), |
@@ -1101,22 +1101,22 @@ discard block |
||
1101 | 1101 | 'rss' => 'rss/wms.rss', |
1102 | 1102 | 'url' => 'wms/' |
1103 | 1103 | ), |
1104 | - 'wmsyear' => array ( |
|
1104 | + 'wmsyear' => array( |
|
1105 | 1105 | 'parent' => 'wmsfront', |
1106 | 1106 | 'url' => 'wms/' |
1107 | 1107 | ), |
1108 | 1108 | |
1109 | - 'wrans' => array ( |
|
1109 | + 'wrans' => array( |
|
1110 | 1110 | 'parent' => 'wranswmsfront', |
1111 | 1111 | 'url' => 'wrans/', |
1112 | - 'session_vars' => array ('id') |
|
1112 | + 'session_vars' => array('id') |
|
1113 | 1113 | ), |
1114 | - 'wransday' => array ( |
|
1114 | + 'wransday' => array( |
|
1115 | 1115 | 'parent' => 'wransfront', |
1116 | 1116 | 'url' => 'wrans/' |
1117 | 1117 | ), |
1118 | - 'wransfront' => array ( |
|
1119 | - 'menu' => array ( |
|
1118 | + 'wransfront' => array( |
|
1119 | + 'menu' => array( |
|
1120 | 1120 | 'text' => 'Written Answers', |
1121 | 1121 | 'title' => "Written Answers" |
1122 | 1122 | ), |
@@ -1129,13 +1129,13 @@ discard block |
||
1129 | 1129 | 'title' => 'For questions asked by ', |
1130 | 1130 | 'url' => 'wrans/' |
1131 | 1131 | ), |
1132 | - 'wransyear' => array ( |
|
1132 | + 'wransyear' => array( |
|
1133 | 1133 | 'parent' => 'wransfront', |
1134 | 1134 | 'url' => 'wrans/' |
1135 | 1135 | ), |
1136 | 1136 | |
1137 | - 'wranswmsfront' => array ( |
|
1138 | - 'menu' => array ( |
|
1137 | + 'wranswmsfront' => array( |
|
1138 | + 'menu' => array( |
|
1139 | 1139 | 'text' => 'Written Answers', |
1140 | 1140 | 'title' => 'Written Answers and Statements', |
1141 | 1141 | ), |
@@ -1152,8 +1152,8 @@ discard block |
||
1152 | 1152 | 'title' => 'Your representative', |
1153 | 1153 | 'url' => 'your/', |
1154 | 1154 | ), |
1155 | - 'yourmp' => array ( |
|
1156 | - 'menu' => array ( |
|
1155 | + 'yourmp' => array( |
|
1156 | + 'menu' => array( |
|
1157 | 1157 | 'text' => 'Your MP', |
1158 | 1158 | 'title' => "Find out about your Member of Parliament" |
1159 | 1159 | ), |
@@ -1162,8 +1162,8 @@ discard block |
||
1162 | 1162 | 'url' => 'mp/', |
1163 | 1163 | 'parent' => 'mps', |
1164 | 1164 | ), |
1165 | - 'yourmp_recent' => array ( |
|
1166 | - 'menu' => array ( |
|
1165 | + 'yourmp_recent' => array( |
|
1166 | + 'menu' => array( |
|
1167 | 1167 | 'text' => 'Recent appearances', |
1168 | 1168 | 'title' => "Recent speeches and written answers by this MP" |
1169 | 1169 | ), |
@@ -1171,8 +1171,8 @@ discard block |
||
1171 | 1171 | 'title' => "Your MP's recent appearances in parliament", |
1172 | 1172 | 'url' => 'mp/?recent=1' |
1173 | 1173 | ), |
1174 | - 'yourmsp' => array ( |
|
1175 | - 'menu' => array ( |
|
1174 | + 'yourmsp' => array( |
|
1175 | + 'menu' => array( |
|
1176 | 1176 | 'text' => 'Your MSPs', |
1177 | 1177 | 'title' => "Find out about your Members of the Scottish Parliament" |
1178 | 1178 | ), |
@@ -1181,8 +1181,8 @@ discard block |
||
1181 | 1181 | 'title' => 'Your MSPs', |
1182 | 1182 | 'url' => 'msp/' |
1183 | 1183 | ), |
1184 | - 'yourmla' => array ( |
|
1185 | - 'menu' => array ( |
|
1184 | + 'yourmla' => array( |
|
1185 | + 'menu' => array( |
|
1186 | 1186 | 'text' => 'Your MLAs', |
1187 | 1187 | 'title' => "Find out about your Members of the Legislative Assembly" |
1188 | 1188 | ), |
@@ -1198,38 +1198,38 @@ discard block |
||
1198 | 1198 | // The text displayed on the page itself will also be this, |
1199 | 1199 | // UNLESS the section has a 'heading', in which case that's used instead. |
1200 | 1200 | |
1201 | -$this->section = array ( |
|
1201 | +$this->section = array( |
|
1202 | 1202 | |
1203 | 1203 | |
1204 | - 'about' => array ( |
|
1204 | + 'about' => array( |
|
1205 | 1205 | 'title' => 'About Us' |
1206 | 1206 | ), |
1207 | - 'admin' => array ( |
|
1207 | + 'admin' => array( |
|
1208 | 1208 | 'title' => 'Admin' |
1209 | 1209 | ), |
1210 | - 'debates' => array ( |
|
1210 | + 'debates' => array( |
|
1211 | 1211 | 'title' => 'Debates', |
1212 | 1212 | 'heading' => 'House of Commons Debates' |
1213 | 1213 | ), |
1214 | - 'help_us_out' => array ( |
|
1214 | + 'help_us_out' => array( |
|
1215 | 1215 | 'title' => 'Help Us Out' |
1216 | 1216 | ), |
1217 | - 'hansard' => array ( |
|
1217 | + 'hansard' => array( |
|
1218 | 1218 | 'title' => 'Hansard' |
1219 | 1219 | ), |
1220 | - 'home' => array ( |
|
1220 | + 'home' => array( |
|
1221 | 1221 | 'title' => 'Home' |
1222 | 1222 | ), |
1223 | - 'mp' => array ( |
|
1223 | + 'mp' => array( |
|
1224 | 1224 | 'title' => 'Your MP' |
1225 | 1225 | ), |
1226 | - 'search' => array ( |
|
1226 | + 'search' => array( |
|
1227 | 1227 | 'title' => 'Search' |
1228 | 1228 | ), |
1229 | - 'sitenews' => array ( |
|
1229 | + 'sitenews' => array( |
|
1230 | 1230 | 'title' => 'TheyWorkForYou news' |
1231 | 1231 | ), |
1232 | - 'wrans' => array ( |
|
1232 | + 'wrans' => array( |
|
1233 | 1233 | 'title' => 'Written Answers' |
1234 | 1234 | ) |
1235 | 1235 |
@@ -4,10 +4,10 @@ discard block |
||
4 | 4 | <div class="hero__mp-search__wrap"> |
5 | 5 | <h1>Do your Assembly Members represent you?</h1> |
6 | 6 | <div class="row collapse"> |
7 | - <?php if ( count($data['regional']) > 0 ) { ?> |
|
7 | + <?php if (count($data['regional']) > 0) { ?> |
|
8 | 8 | <ul class="homepage-rep-list"> |
9 | 9 | <li>Your Assembly Memberss: </li> |
10 | - <?php foreach ( $data['regional'] as $member ) { ?> |
|
10 | + <?php foreach ($data['regional'] as $member) { ?> |
|
11 | 11 | <li class="homepage-rep-list__rep"><a href="/london-assembly-member/?p=<?= $member['person_id'] ?>"><?= $member['name'] ?></a></li> |
12 | 12 | <?php } ?> |
13 | 13 | </ul> |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | <div class="panel panel--flushtop clearfix"> |
41 | 41 | <div class="row nested-row"> |
42 | 42 | <div class="homepage-in-the-news homepage-content-section"> |
43 | - <?php if ( $featured ) { |
|
43 | + <?php if ($featured) { |
|
44 | 44 | include dirname(__FILE__) . "/../homepage/featured.php"; |
45 | 45 | } ?> |
46 | 46 | </div> |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | <div class="homepage-recently homepage-content-section"> |
86 | 86 | <h2>Recently answered questions to the Mayor of London</h2> |
87 | 87 | <ul class="recently__list"><?php |
88 | - foreach ( $debates['recent'] as $recent ) { |
|
88 | + foreach ($debates['recent'] as $recent) { |
|
89 | 89 | include dirname(__FILE__) . '/../homepage/recent-debates.php'; |
90 | 90 | } |
91 | 91 | ?></ul> |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | |
15 | 15 | public $data; |
16 | 16 | |
17 | - private $about_links = array ('help', 'about', 'linktous', 'houserules', 'blog', 'news', 'contact', 'privacy'); |
|
17 | + private $about_links = array('help', 'about', 'linktous', 'houserules', 'blog', 'news', 'contact', 'privacy'); |
|
18 | 18 | private $assemblies_links = array('hansard', 'sp_home', 'ni_home', 'wales_home', 'london_home'); |
19 | 19 | private $international_links = array('newzealand', 'australia', 'ireland', 'mzalendo'); |
20 | 20 | private $tech_links = array('code', 'api', 'data', 'pombola', 'devmailinglist', 'irc'); |
@@ -28,10 +28,10 @@ discard block |
||
28 | 28 | public function __construct() { |
29 | 29 | $this->data = array(); |
30 | 30 | |
31 | - $this->data['about'] = $this->get_menu_links( $this->about_links ); |
|
32 | - $this->data['assemblies'] = $this->get_menu_links( $this->assemblies_links ); |
|
33 | - $this->data['international'] = $this->get_menu_links( $this->international_links ); |
|
34 | - $this->data['tech'] = $this->get_menu_links( $this->tech_links ); |
|
31 | + $this->data['about'] = $this->get_menu_links($this->about_links); |
|
32 | + $this->data['assemblies'] = $this->get_menu_links($this->assemblies_links); |
|
33 | + $this->data['international'] = $this->get_menu_links($this->international_links); |
|
34 | + $this->data['tech'] = $this->get_menu_links($this->tech_links); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | /** |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | |
33 | 33 | protected function getSearchSections() { |
34 | 34 | return array( |
35 | - array( 'section' => 'london' ) |
|
35 | + array('section' => 'london') |
|
36 | 36 | ); |
37 | 37 | } |
38 | 38 | |
@@ -51,23 +51,23 @@ discard block |
||
51 | 51 | |
52 | 52 | $debates = $DEBATELIST->display('recent_debates', array('days' => 30, 'num' => 9), 'none'); |
53 | 53 | $MOREURL = new \MySociety\TheyWorkForYou\Url('londondebatesfront'); |
54 | - $MOREURL->insert( array( 'more' => 1 ) ); |
|
54 | + $MOREURL->insert(array('more' => 1)); |
|
55 | 55 | |
56 | 56 | // this makes sure that we don't repeat this debate in the list below |
57 | 57 | $random_debate = NULL; |
58 | - if ( isset($debates['data']) && count($debates['data']) ) { |
|
58 | + if (isset($debates['data']) && count($debates['data'])) { |
|
59 | 59 | $random_debate = $debates['data'][0]; |
60 | 60 | } |
61 | 61 | |
62 | 62 | $recent = array(); |
63 | - if ( isset($debates['data']) && count($debates['data']) ) { |
|
63 | + if (isset($debates['data']) && count($debates['data'])) { |
|
64 | 64 | // at the start of a session there may be less than 6 |
65 | 65 | // debates |
66 | 66 | $max = 6; |
67 | - if ( count($debates['data']) < 6 ) { |
|
67 | + if (count($debates['data']) < 6) { |
|
68 | 68 | $max = count($debates['data']); |
69 | 69 | } |
70 | - for ( $i = 1; $i < $max; $i++ ) { |
|
70 | + for ($i = 1; $i < $max; $i++) { |
|
71 | 71 | $debate = $debates['data'][$i]; |
72 | 72 | $debate['desc'] = "questions to the Mayor of London"; |
73 | 73 | $debate['more_url'] = $MOREURL->generate(); |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | } |
77 | 77 | |
78 | 78 | $featured = array(); |
79 | - if ( $random_debate ) { |
|
79 | + if ($random_debate) { |
|
80 | 80 | $featured = $random_debate; |
81 | 81 | $featured['more_url'] = $MOREURL->generate(); |
82 | 82 | $featured['desc'] = 'question to the Mayor of London'; |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | } |
86 | 86 | |
87 | 87 | $data['featured'] = $featured; |
88 | - $data['debates'] = array( 'recent' => $recent); |
|
88 | + $data['debates'] = array('recent' => $recent); |
|
89 | 89 | |
90 | 90 | $data['regional'] = $this->getAssemblyMemberList(); |
91 | 91 | $data['template'] = 'london/index'; |
@@ -50,35 +50,35 @@ |
||
50 | 50 | |
51 | 51 | public static function getCountryDetails($house) { |
52 | 52 | $details = array( |
53 | - HOUSE_TYPE_COMMONS => array ( |
|
53 | + HOUSE_TYPE_COMMONS => array( |
|
54 | 54 | 'country' => 'UK', |
55 | 55 | 'assembly' => 'uk-commons', |
56 | 56 | 'location' => '– in the House of Commons', |
57 | 57 | 'cons_type' => 'WMC', |
58 | 58 | 'assembly_name' => 'House of Commons', |
59 | 59 | ), |
60 | - HOUSE_TYPE_NI => array ( |
|
60 | + HOUSE_TYPE_NI => array( |
|
61 | 61 | 'country' => 'NORTHERN IRELAND', |
62 | 62 | 'assembly' => 'ni', |
63 | 63 | 'location' => '– in the Northern Ireland Assembly', |
64 | 64 | 'cons_type' => 'NIE', |
65 | 65 | 'assembly_name' => 'Northern Ireland Assembly', |
66 | 66 | ), |
67 | - HOUSE_TYPE_SCOTLAND => array ( |
|
67 | + HOUSE_TYPE_SCOTLAND => array( |
|
68 | 68 | 'country' => 'SCOTLAND', |
69 | 69 | 'assembly' => 'scotland', |
70 | 70 | 'location' => '– in the Scottish Parliament', |
71 | 71 | 'cons_type' => 'SPC', |
72 | 72 | 'assembly_name' => 'Scottish Parliament', |
73 | 73 | ), |
74 | - HOUSE_TYPE_LORDS => array ( |
|
74 | + HOUSE_TYPE_LORDS => array( |
|
75 | 75 | 'country' => 'UK', |
76 | 76 | 'assembly' => 'uk-lords', |
77 | 77 | 'location' => '– in the House of Lords', |
78 | 78 | 'cons_type' => '', |
79 | 79 | 'assembly_name' => 'House of Lords', |
80 | 80 | ), |
81 | - HOUSE_TYPE_LONDON_ASSEMBLY => array ( |
|
81 | + HOUSE_TYPE_LONDON_ASSEMBLY => array( |
|
82 | 82 | 'country' => 'UK', |
83 | 83 | 'assembly' => 'london-assembly', |
84 | 84 | 'location' => '– in the London Assembly', |