@@ -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 | |
@@ -143,12 +143,12 @@ discard block |
||
143 | 143 | ); |
144 | 144 | } |
145 | 145 | |
146 | - if ( $house==HOUSE_TYPE_ROYAL # The Monarch |
|
147 | - || (!$this->house_disp && $house==HOUSE_TYPE_LONDON_ASSEMBLY) # London Assembly |
|
148 | - || (!$this->house_disp && $house==HOUSE_TYPE_SCOTLAND) # MSPs and |
|
149 | - || (!$this->house_disp && $house==HOUSE_TYPE_NI) # MLAs have lowest priority |
|
150 | - || ($this->house_disp!=HOUSE_TYPE_LORDS && $house==HOUSE_TYPE_LORDS) # Lords have highest priority |
|
151 | - || (!$this->house_disp && $house==HOUSE_TYPE_COMMONS) # MPs |
|
146 | + if ($house == HOUSE_TYPE_ROYAL # The Monarch |
|
147 | + || (!$this->house_disp && $house == HOUSE_TYPE_LONDON_ASSEMBLY) # London Assembly |
|
148 | + || (!$this->house_disp && $house == HOUSE_TYPE_SCOTLAND) # MSPs and |
|
149 | + || (!$this->house_disp && $house == HOUSE_TYPE_NI) # MLAs have lowest priority |
|
150 | + || ($this->house_disp != HOUSE_TYPE_LORDS && $house == HOUSE_TYPE_LORDS) # Lords have highest priority |
|
151 | + || (!$this->house_disp && $house == HOUSE_TYPE_COMMONS) # MPs |
|
152 | 152 | ) { |
153 | 153 | $this->house_disp = $house; |
154 | 154 | $this->constituency = $const; |
@@ -203,13 +203,13 @@ discard block |
||
203 | 203 | } |
204 | 204 | } |
205 | 205 | |
206 | - public function postcode_to_person_id($postcode, $house=null) { |
|
207 | - twfy_debug ('MP', "postcode_to_person_id converting postcode to person"); |
|
206 | + public function postcode_to_person_id($postcode, $house = null) { |
|
207 | + twfy_debug('MP', "postcode_to_person_id converting postcode to person"); |
|
208 | 208 | $constituency = strtolower(MySociety\TheyWorkForYou\Utility\Postcode::postcodeToConstituency($postcode)); |
209 | 209 | return $this->constituency_to_person_id($constituency, $house); |
210 | 210 | } |
211 | 211 | |
212 | - public function constituency_to_person_id($constituency, $house=null) { |
|
212 | + public function constituency_to_person_id($constituency, $house = null) { |
|
213 | 213 | if ($constituency == '') { |
214 | 214 | throw new MySociety\TheyWorkForYou\MemberException('Sorry, no constituency was found.'); |
215 | 215 | } |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | } |
249 | 249 | } |
250 | 250 | |
251 | - public function name_to_person_id($name, $const='') { |
|
251 | + public function name_to_person_id($name, $const = '') { |
|
252 | 252 | global $this_page; |
253 | 253 | if ($name == '') { |
254 | 254 | throw new MySociety\TheyWorkForYou\MemberException('Sorry, no name was found.'); |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | global $THEUSER; |
349 | 349 | if (is_object($THEUSER) && $THEUSER->postcode_is_set() && $this->current_member(1)) { |
350 | 350 | $pc = $THEUSER->postcode(); |
351 | - twfy_debug ('MP', "set_users_mp converting postcode to person"); |
|
351 | + twfy_debug('MP', "set_users_mp converting postcode to person"); |
|
352 | 352 | $constituency = strtolower(MySociety\TheyWorkForYou\Utility\Postcode::postcodeToConstituency($pc)); |
353 | 353 | if ($constituency == strtolower($this->constituency())) { |
354 | 354 | $this->the_users_mp = true; |
@@ -422,9 +422,9 @@ discard block |
||
422 | 422 | |
423 | 423 | if (isset($this->extra_info['public_whip_attendrank'])) { |
424 | 424 | $prefix = ($this->house(HOUSE_TYPE_LORDS) ? 'L' : ''); |
425 | - $this->extra_info[$prefix.'public_whip_division_attendance_rank'] = $this->extra_info['public_whip_attendrank']; |
|
426 | - $this->extra_info[$prefix.'public_whip_division_attendance_rank_outof'] = $this->extra_info['public_whip_attendrank_outof']; |
|
427 | - $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); |
|
425 | + $this->extra_info[$prefix . 'public_whip_division_attendance_rank'] = $this->extra_info['public_whip_attendrank']; |
|
426 | + $this->extra_info[$prefix . 'public_whip_division_attendance_rank_outof'] = $this->extra_info['public_whip_attendrank_outof']; |
|
427 | + $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); |
|
428 | 428 | } |
429 | 429 | if ($this->house(HOUSE_TYPE_LORDS) && isset($this->extra_info['public_whip_division_attendance'])) { |
430 | 430 | $this->extra_info['Lpublic_whip_division_attendance'] = $this->extra_info['public_whip_division_attendance']; |
@@ -432,7 +432,7 @@ discard block |
||
432 | 432 | } |
433 | 433 | |
434 | 434 | if ($display && array_key_exists('register_member_interests_html', $this->extra_info) && ($this->extra_info['register_member_interests_html'] != '')) { |
435 | - $args = array ( |
|
435 | + $args = array( |
|
436 | 436 | "sort" => "regexp_replace" |
437 | 437 | ); |
438 | 438 | $GLOSSARY = new GLOSSARY($args); |
@@ -440,7 +440,7 @@ discard block |
||
440 | 440 | $GLOSSARY->glossarise($this->extra_info['register_member_interests_html']); |
441 | 441 | } |
442 | 442 | |
443 | - $q = $this->db->query('select count(*) as c from alerts where criteria like "%speaker:'.$this->person_id.'%" and confirmed and not deleted')->first(); |
|
443 | + $q = $this->db->query('select count(*) as c from alerts where criteria like "%speaker:' . $this->person_id . '%" and confirmed and not deleted')->first(); |
|
444 | 444 | $this->extra_info['number_of_alerts'] = $q['c']; |
445 | 445 | |
446 | 446 | if (isset($this->extra_info['reading_ease'])) { |
@@ -464,14 +464,14 @@ discard block |
||
464 | 464 | $this->extra_info['pbc'] = array(); |
465 | 465 | foreach ($q as $row) { |
466 | 466 | $bill_id = $row['bill_id']; |
467 | - $c = $this->db->query('select count(*) as c from hansard where major=6 and minor='.$bill_id.' and htype=10')->first(); |
|
467 | + $c = $this->db->query('select count(*) as c from hansard where major=6 and minor=' . $bill_id . ' and htype=10')->first(); |
|
468 | 468 | $c = $c['c']; |
469 | 469 | $title = $row['title']; |
470 | 470 | $attending = $row['a']; |
471 | 471 | $chairman = $row['c']; |
472 | 472 | $this->extra_info['pbc'][$bill_id] = array( |
473 | 473 | 'title' => $title, 'session' => $row['session'], |
474 | - 'attending'=>$attending, 'chairman'=>($chairman>0), 'outof' => $c |
|
474 | + 'attending'=>$attending, 'chairman'=>($chairman > 0), 'outof' => $c |
|
475 | 475 | ); |
476 | 476 | } |
477 | 477 | |
@@ -486,7 +486,7 @@ discard block |
||
486 | 486 | public function family_name() { return $this->family_name; } |
487 | 487 | public function full_name($no_mp_title = false) { |
488 | 488 | $title = $this->title; |
489 | - if ($no_mp_title && ($this->house_disp==HOUSE_TYPE_COMMONS || $this->house_disp==HOUSE_TYPE_NI || $this->house_disp==HOUSE_TYPE_SCOTLAND)) |
|
489 | + if ($no_mp_title && ($this->house_disp == HOUSE_TYPE_COMMONS || $this->house_disp == HOUSE_TYPE_NI || $this->house_disp == HOUSE_TYPE_SCOTLAND)) |
|
490 | 490 | $title = ''; |
491 | 491 | return member_full_name($this->house_disp, $title, $this->given_name, $this->family_name, $this->lordofname); |
492 | 492 | } |
@@ -513,8 +513,8 @@ discard block |
||
513 | 513 | } |
514 | 514 | |
515 | 515 | public function entered_house($house = null) { |
516 | - if ( isset($house) ) { |
|
517 | - if ( array_key_exists($house, $this->entered_house) ) { |
|
516 | + if (isset($house)) { |
|
517 | + if (array_key_exists($house, $this->entered_house)) { |
|
518 | 518 | return $this->entered_house[$house]; |
519 | 519 | } else { |
520 | 520 | return null; |
@@ -526,9 +526,9 @@ discard block |
||
526 | 526 | public function entered_house_text($entered_house) { |
527 | 527 | if (!$entered_house) return ''; |
528 | 528 | list($year, $month, $day) = explode('-', $entered_house); |
529 | - if ($month==1 && $day==1 && $this->house(HOUSE_TYPE_LORDS)) { |
|
529 | + if ($month == 1 && $day == 1 && $this->house(HOUSE_TYPE_LORDS)) { |
|
530 | 530 | return $year; |
531 | - } elseif ($month==0 && $day==0) { |
|
531 | + } elseif ($month == 0 && $day == 0) { |
|
532 | 532 | return $year; |
533 | 533 | } elseif (checkdate($month, $day, $year) && $year != '9999') { |
534 | 534 | return format_date($entered_house, LONGDATEFORMAT); |
@@ -538,8 +538,8 @@ discard block |
||
538 | 538 | } |
539 | 539 | |
540 | 540 | public function left_house($house = null) { |
541 | - if ( isset($house) ) { |
|
542 | - if ( array_key_exists($house, $this->left_house) ) { |
|
541 | + if (isset($house)) { |
|
542 | + if (array_key_exists($house, $this->left_house)) { |
|
543 | 543 | return $this->left_house[$house]; |
544 | 544 | } else { |
545 | 545 | return null; |
@@ -553,7 +553,7 @@ discard block |
||
553 | 553 | list($year, $month, $day) = explode('-', $left_house); |
554 | 554 | if (checkdate($month, $day, $year) && $year != '9999') { |
555 | 555 | return format_date($left_house, LONGDATEFORMAT); |
556 | - } elseif ($month==0 && $day==0) { |
|
556 | + } elseif ($month == 0 && $day == 0) { |
|
557 | 557 | # Left house date is stored as 1942-00-00 to mean "at some point in 1941" |
558 | 558 | return $year - 1; |
559 | 559 | } else { |
@@ -671,7 +671,7 @@ discard block |
||
671 | 671 | $name = $row['given_name'] . ' ' . $row['family_name']; |
672 | 672 | if ($last_pid != $pid) { |
673 | 673 | $mships[] = array( |
674 | - 'href' => WEBPATH . 'mp/?pid='.$pid, |
|
674 | + 'href' => WEBPATH . 'mp/?pid=' . $pid, |
|
675 | 675 | 'text' => $name |
676 | 676 | ); |
677 | 677 | $last_pid = $pid; |
@@ -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_LORDS => array ( |
|
81 | + HOUSE_TYPE_LORDS => array( |
|
82 | 82 | 'country' => 'UK', |
83 | 83 | 'assembly' => 'london-assembly', |
84 | 84 | 'location' => '– in the London Assembly', |
@@ -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' => 'Scottish education, health, agriculture, justice, prisons and other devolved areas. Some tax-varying powers' |
664 | 664 | ), |
@@ -666,9 +666,9 @@ discard block |
||
666 | 666 | 'url' => 'london-assembly/' |
667 | 667 | ), |
668 | 668 | |
669 | - 'london_assembly_members' => array ( |
|
669 | + 'london_assembly_members' => array( |
|
670 | 670 | 'parent' => 'london_home', |
671 | - 'menu' => array ( |
|
671 | + 'menu' => array( |
|
672 | 672 | 'text' => 'London Assembly Members', |
673 | 673 | 'title' => "List of Members of the London Assembly)" |
674 | 674 | ), |
@@ -676,25 +676,25 @@ discard block |
||
676 | 676 | 'url' => 'london-assembly-members/' |
677 | 677 | ), |
678 | 678 | |
679 | - 'london_assembly_member' => array ( |
|
679 | + 'london_assembly_member' => array( |
|
680 | 680 | 'parent' => 'london_assembly_members', |
681 | 681 | 'title' => 'Find your London Assembly Member', |
682 | 682 | 'url' => 'london-assembly-member/' |
683 | 683 | ), |
684 | 684 | |
685 | - 'otheruseredit' => array ( |
|
685 | + 'otheruseredit' => array( |
|
686 | 686 | 'pg' => 'editother', |
687 | 687 | 'title' => "Editing a user's data", |
688 | 688 | 'url' => 'user/' |
689 | 689 | ), |
690 | - 'privacy' => array ( |
|
690 | + 'privacy' => array( |
|
691 | 691 | 'title' => 'Privacy Policy', |
692 | 692 | 'url' => 'privacy/' |
693 | 693 | ), |
694 | 694 | |
695 | 695 | /* Public bill committees */ |
696 | - 'pbc_front' => array ( |
|
697 | - 'menu' => array ( |
|
696 | + 'pbc_front' => array( |
|
697 | + 'menu' => array( |
|
698 | 698 | 'text' => 'Bill Committees', |
699 | 699 | 'title' => "Public Bill Committees (formerly Standing Committees) debates" |
700 | 700 | ), |
@@ -712,17 +712,17 @@ discard block |
||
712 | 712 | 'title' => '', |
713 | 713 | 'url' => 'pbc/', |
714 | 714 | 'parent' => 'pbc_front', |
715 | - 'session_vars' => array ('bill'), |
|
715 | + 'session_vars' => array('bill'), |
|
716 | 716 | ), |
717 | 717 | 'pbc_clause' => array( |
718 | 718 | 'parent' => 'pbc_front', |
719 | 719 | 'url' => 'pbc/', |
720 | - 'session_vars' => array ('id'), |
|
720 | + 'session_vars' => array('id'), |
|
721 | 721 | ), |
722 | 722 | 'pbc_speech' => array( |
723 | 723 | 'parent' => 'pbc_front', |
724 | 724 | 'url' => 'pbc/', |
725 | - 'session_vars' => array ('id'), |
|
725 | + 'session_vars' => array('id'), |
|
726 | 726 | ), |
727 | 727 | |
728 | 728 | 'people' => array( |
@@ -734,62 +734,62 @@ discard block |
||
734 | 734 | 'url' => '', |
735 | 735 | ), |
736 | 736 | |
737 | - 'raw' => array ( |
|
737 | + 'raw' => array( |
|
738 | 738 | 'title' => 'Raw data', |
739 | 739 | 'url' => 'raw/' |
740 | 740 | ), |
741 | 741 | |
742 | - 'regmem' => array ( |
|
742 | + 'regmem' => array( |
|
743 | 743 | 'title' => 'Changes to the Register of Members\' Interests', |
744 | 744 | 'url' => 'regmem/' |
745 | 745 | ), |
746 | 746 | |
747 | - 'regmem_date' => array ( |
|
747 | + 'regmem_date' => array( |
|
748 | 748 | 'url' => 'regmem/', |
749 | 749 | 'parent' => 'regmem' |
750 | 750 | ), |
751 | 751 | |
752 | - 'regmem_mp' => array ( |
|
752 | + 'regmem_mp' => array( |
|
753 | 753 | 'url' => 'regmem/', |
754 | 754 | 'parent' => 'regmem' |
755 | 755 | ), |
756 | 756 | |
757 | - 'regmem_diff' => array ( |
|
757 | + 'regmem_diff' => array( |
|
758 | 758 | 'url' => 'regmem/', |
759 | 759 | 'parent' => 'regmem' |
760 | 760 | ), |
761 | 761 | |
762 | - 'royal' => array ( |
|
762 | + 'royal' => array( |
|
763 | 763 | 'parent' => 'hansard', |
764 | 764 | 'title' => 'Royal', |
765 | 765 | 'url' => 'royal/', |
766 | 766 | ), |
767 | 767 | |
768 | - 'topic' => array ( |
|
768 | + 'topic' => array( |
|
769 | 769 | 'parent' => 'topics', |
770 | 770 | 'url' => 'topic/topic.php', |
771 | 771 | ), |
772 | 772 | |
773 | - 'topics' => array ( |
|
773 | + 'topics' => array( |
|
774 | 774 | 'title' => 'Topics', |
775 | 775 | 'url' => 'topic/', |
776 | 776 | ), |
777 | 777 | |
778 | - 'search' => array ( |
|
778 | + 'search' => array( |
|
779 | 779 | 'sidebar' => 'search', |
780 | 780 | 'url' => 'search/', |
781 | 781 | 'robots' => 'noindex, nofollow', |
782 | 782 | 'heading' => '', |
783 | - 'session_vars' => array ('q', 's', 'pid', 'o', 'pop') |
|
783 | + 'session_vars' => array('q', 's', 'pid', 'o', 'pop') |
|
784 | 784 | ), |
785 | - 'search_help' => array ( |
|
785 | + 'search_help' => array( |
|
786 | 786 | 'sidebar' => 'search', |
787 | 787 | 'title' => 'Help with searching', |
788 | 788 | 'url' => 'search/' |
789 | 789 | ), |
790 | 790 | |
791 | - 'sitenews' => array ( |
|
792 | - 'menu' => array ( |
|
791 | + 'sitenews' => array( |
|
792 | + 'menu' => array( |
|
793 | 793 | 'text' => 'TheyWorkForYou news', |
794 | 794 | 'title' => "News about changes to this website" |
795 | 795 | ), |
@@ -799,68 +799,68 @@ discard block |
||
799 | 799 | 'title' => 'TheyWorkForYou news', |
800 | 800 | 'url' => 'news/' |
801 | 801 | ), |
802 | - 'sitenews_archive' => array ( |
|
802 | + 'sitenews_archive' => array( |
|
803 | 803 | 'parent' => 'sitenews', |
804 | 804 | 'rss' => 'news/index.rdf', |
805 | 805 | 'sidebar' => 'sitenews', |
806 | 806 | 'title' => 'Archive', |
807 | 807 | 'url' => 'news/archives/' |
808 | 808 | ), |
809 | - 'sitenews_atom' => array ( |
|
809 | + 'sitenews_atom' => array( |
|
810 | 810 | 'url' => 'news/atom.xml' |
811 | 811 | ), |
812 | - 'sitenews_date' => array ( |
|
812 | + 'sitenews_date' => array( |
|
813 | 813 | 'parent' => 'sitenews', |
814 | 814 | 'rss' => 'news/index.rdf', |
815 | 815 | 'sidebar' => 'sitenews' |
816 | 816 | ), |
817 | - 'sitenews_individual' => array ( |
|
817 | + 'sitenews_individual' => array( |
|
818 | 818 | 'parent' => 'sitenews', |
819 | 819 | 'rss' => 'news/index.rdf', |
820 | 820 | 'sidebar' => 'sitenews', |
821 | 821 | ), |
822 | - 'sitenews_rss1' => array ( |
|
822 | + 'sitenews_rss1' => array( |
|
823 | 823 | 'url' => 'news/index.rdf' |
824 | 824 | ), |
825 | - 'sitenews_rss2' => array ( |
|
825 | + 'sitenews_rss2' => array( |
|
826 | 826 | 'url' => 'news/index.xml' |
827 | 827 | ), |
828 | 828 | |
829 | 829 | /* Scottish Parliament */ |
830 | 830 | 'sp_home' => array( |
831 | - 'menu' => array ( |
|
831 | + 'menu' => array( |
|
832 | 832 | 'text' => 'Scottish Parliament', |
833 | 833 | 'title' => 'Scottish education, health, agriculture, justice, prisons and other devolved areas. Some tax-varying powers' |
834 | 834 | ), |
835 | 835 | 'title' => 'Scottish Parliament', |
836 | 836 | 'url' => 'scotland/' |
837 | 837 | ), |
838 | - 'spoverview' => array ( |
|
838 | + 'spoverview' => array( |
|
839 | 839 | 'parent' => 'sp_home', |
840 | - 'menu' => array ( |
|
840 | + 'menu' => array( |
|
841 | 841 | 'text' => 'Overview', |
842 | 842 | 'title' => "Overview of the Scottish Parliament" |
843 | 843 | ), |
844 | 844 | 'title' => '', |
845 | 845 | 'url' => 'scotland/' |
846 | 846 | ), |
847 | - 'spdebate' => array ( |
|
847 | + 'spdebate' => array( |
|
848 | 848 | 'parent' => 'spdebatesfront', |
849 | 849 | 'url' => 'sp/', |
850 | - 'session_vars' => array ('id'), |
|
850 | + 'session_vars' => array('id'), |
|
851 | 851 | ), |
852 | - 'spdebates' => array ( |
|
852 | + 'spdebates' => array( |
|
853 | 853 | 'parent' => 'spdebatesfront', |
854 | 854 | 'url' => 'sp/', |
855 | - 'session_vars' => array ('id'), |
|
855 | + 'session_vars' => array('id'), |
|
856 | 856 | ), |
857 | - 'spdebatesday' => array ( |
|
857 | + 'spdebatesday' => array( |
|
858 | 858 | 'parent' => 'spdebatesfront', |
859 | - 'session_vars' => array ('d'), |
|
859 | + 'session_vars' => array('d'), |
|
860 | 860 | 'url' => 'sp/', |
861 | 861 | ), |
862 | - 'spdebatesfront' => array ( |
|
863 | - 'menu' => array ( |
|
862 | + 'spdebatesfront' => array( |
|
863 | + 'menu' => array( |
|
864 | 864 | 'text' => 'Debates', |
865 | 865 | 'title' => '' |
866 | 866 | ), |
@@ -869,21 +869,21 @@ discard block |
||
869 | 869 | 'url' => 'sp/' |
870 | 870 | ), |
871 | 871 | |
872 | - 'spdebatesyear' => array ( |
|
872 | + 'spdebatesyear' => array( |
|
873 | 873 | 'parent' => 'spdebatesfront', |
874 | 874 | 'url' => 'sp/' |
875 | 875 | ), |
876 | - 'spwrans' => array ( |
|
876 | + 'spwrans' => array( |
|
877 | 877 | 'parent' => 'spwransfront', |
878 | 878 | 'url' => 'spwrans/', |
879 | 879 | #'session_vars' => array ('id'), |
880 | 880 | ), |
881 | - 'spwransday' => array ( |
|
881 | + 'spwransday' => array( |
|
882 | 882 | 'parent' => 'spwransfront', |
883 | 883 | 'url' => 'spwrans/' |
884 | 884 | ), |
885 | - 'spwransfront' => array ( |
|
886 | - 'menu' => array ( |
|
885 | + 'spwransfront' => array( |
|
886 | + 'menu' => array( |
|
887 | 887 | 'text' => 'Written Answers', |
888 | 888 | 'title' => '' |
889 | 889 | ), |
@@ -896,31 +896,31 @@ discard block |
||
896 | 896 | 'title' => 'For questions asked by ', |
897 | 897 | 'url' => 'spwrans/' |
898 | 898 | ), |
899 | - 'spwransyear' => array ( |
|
899 | + 'spwransyear' => array( |
|
900 | 900 | 'parent' => 'spwransfront', |
901 | 901 | 'url' => 'spwrans/' |
902 | 902 | ), |
903 | 903 | |
904 | 904 | // Topic pages |
905 | 905 | |
906 | - 'topic' => array ( |
|
906 | + 'topic' => array( |
|
907 | 907 | 'url' => 'topic/', |
908 | 908 | 'title' => 'Topics' |
909 | 909 | ), |
910 | 910 | |
911 | - 'topicbenefits' => array ( |
|
911 | + 'topicbenefits' => array( |
|
912 | 912 | 'url' => 'topic/benefits', |
913 | 913 | 'parent' => 'topic', |
914 | 914 | 'title' => 'Benefits' |
915 | 915 | ), |
916 | 916 | |
917 | - 'topiccrimestats' => array ( |
|
917 | + 'topiccrimestats' => array( |
|
918 | 918 | 'url' => 'topic/crime-stats', |
919 | 919 | 'parent' => 'topic', |
920 | 920 | 'title' => 'Crime Statistics' |
921 | 921 | ), |
922 | 922 | |
923 | - 'topicnhs' => array ( |
|
923 | + 'topicnhs' => array( |
|
924 | 924 | 'url' => 'topic/nhs', |
925 | 925 | 'parent' => 'topic', |
926 | 926 | 'title' => 'NHS' |
@@ -935,29 +935,29 @@ discard block |
||
935 | 935 | 'url' => 'user/alerts/', |
936 | 936 | 'parent' => 'userviewself' |
937 | 937 | ), |
938 | - 'userchangepc' => array ( |
|
938 | + 'userchangepc' => array( |
|
939 | 939 | 'title' => 'Change your postcode', |
940 | 940 | 'url' => 'user/changepc/' |
941 | 941 | ), |
942 | - 'userconfirm' => array ( |
|
942 | + 'userconfirm' => array( |
|
943 | 943 | 'url' => 'user/confirm/' |
944 | 944 | ), |
945 | - 'userconfirmed' => array ( |
|
945 | + 'userconfirmed' => array( |
|
946 | 946 | 'sidebar' => 'userconfirmed', |
947 | 947 | 'title' => 'Welcome to TheyWorkForYou!', |
948 | 948 | 'url' => 'user/confirm/' |
949 | 949 | ), |
950 | - 'userconfirmfailed' => array ( |
|
950 | + 'userconfirmfailed' => array( |
|
951 | 951 | 'title' => 'Oops!', |
952 | 952 | 'url' => 'user/confirm/' |
953 | 953 | ), |
954 | - 'useredit' => array ( |
|
954 | + 'useredit' => array( |
|
955 | 955 | 'pg' => 'edit', |
956 | 956 | 'title' => 'Edit your details', |
957 | 957 | 'url' => 'user/' |
958 | 958 | ), |
959 | - 'userjoin' => array ( |
|
960 | - 'menu' => array ( |
|
959 | + 'userjoin' => array( |
|
960 | + 'menu' => array( |
|
961 | 961 | 'text' => 'Join', |
962 | 962 | 'title' => "Joining is free and allows you to annotate speeches" |
963 | 963 | ), |
@@ -966,8 +966,8 @@ discard block |
||
966 | 966 | 'title' => 'Join TheyWorkForYou', |
967 | 967 | 'url' => 'user/' |
968 | 968 | ), |
969 | - 'getinvolved' => array ( |
|
970 | - 'menu' => array ( |
|
969 | + 'getinvolved' => array( |
|
970 | + 'menu' => array( |
|
971 | 971 | 'text' => 'Get involved', |
972 | 972 | 'title' => "Contribute to TheyWorkForYou" |
973 | 973 | ), |
@@ -976,8 +976,8 @@ discard block |
||
976 | 976 | 'title' => 'Contribute to TheyWorkForYou', |
977 | 977 | 'url' => 'getinvolved/' |
978 | 978 | ), |
979 | - 'userlogin' => array ( |
|
980 | - 'menu' => array ( |
|
979 | + 'userlogin' => array( |
|
980 | + 'menu' => array( |
|
981 | 981 | 'text' => 'Sign in', |
982 | 982 | 'title' => "If you've already joined , sign in to add annotations" |
983 | 983 | ), |
@@ -986,33 +986,33 @@ discard block |
||
986 | 986 | 'url' => 'user/login/' |
987 | 987 | ), |
988 | 988 | |
989 | - 'userlogout' => array ( |
|
990 | - 'menu' => array ( |
|
989 | + 'userlogout' => array( |
|
990 | + 'menu' => array( |
|
991 | 991 | 'text' => 'Sign out', |
992 | 992 | 'title' => "Sign out" |
993 | 993 | ), |
994 | 994 | 'url' => 'user/logout/' |
995 | 995 | ), |
996 | - 'userpassword' => array ( |
|
996 | + 'userpassword' => array( |
|
997 | 997 | 'title' => 'Change password', |
998 | 998 | 'url' => 'user/password/' |
999 | 999 | ), |
1000 | - 'userprompt' => array ( |
|
1000 | + 'userprompt' => array( |
|
1001 | 1001 | 'title' => 'Please sign in', |
1002 | 1002 | 'url' => 'user/prompt/' |
1003 | 1003 | ), |
1004 | - 'userview' => array ( |
|
1004 | + 'userview' => array( |
|
1005 | 1005 | 'session_vars' => array('u'), |
1006 | 1006 | 'url' => 'user/' |
1007 | 1007 | ), |
1008 | - 'userviewself' => array ( |
|
1009 | - 'menu' => array ( |
|
1008 | + 'userviewself' => array( |
|
1009 | + 'menu' => array( |
|
1010 | 1010 | 'text' => 'Your details', |
1011 | 1011 | 'title' => "View and edit your details" |
1012 | 1012 | ), |
1013 | 1013 | 'url' => 'user/' |
1014 | 1014 | ), |
1015 | - 'userwelcome' => array ( |
|
1015 | + 'userwelcome' => array( |
|
1016 | 1016 | 'title' => 'Welcome!', |
1017 | 1017 | 'url' => 'user/' |
1018 | 1018 | ), |
@@ -1040,23 +1040,23 @@ discard block |
||
1040 | 1040 | ), |
1041 | 1041 | |
1042 | 1042 | /* Westminster Hall */ |
1043 | - 'whall' => array ( |
|
1043 | + 'whall' => array( |
|
1044 | 1044 | 'parent' => 'whallfront', |
1045 | 1045 | 'url' => 'whall/', |
1046 | - 'session_vars' => array ('id'), |
|
1046 | + 'session_vars' => array('id'), |
|
1047 | 1047 | ), |
1048 | - 'whalls' => array ( |
|
1048 | + 'whalls' => array( |
|
1049 | 1049 | 'parent' => 'whallfront', |
1050 | 1050 | 'url' => 'whall/', |
1051 | - 'session_vars' => array ('id'), |
|
1051 | + 'session_vars' => array('id'), |
|
1052 | 1052 | ), |
1053 | - 'whallday' => array ( |
|
1053 | + 'whallday' => array( |
|
1054 | 1054 | 'parent' => 'whallfront', |
1055 | - 'session_vars' => array ('d'), |
|
1055 | + 'session_vars' => array('d'), |
|
1056 | 1056 | 'url' => 'whall/', |
1057 | 1057 | ), |
1058 | - 'whallfront' => array ( |
|
1059 | - 'menu' => array ( |
|
1058 | + 'whallfront' => array( |
|
1059 | + 'menu' => array( |
|
1060 | 1060 | 'text' => 'Westminster Hall', |
1061 | 1061 | 'title' => "Westminster Hall debates" |
1062 | 1062 | ), |
@@ -1065,23 +1065,23 @@ discard block |
||
1065 | 1065 | 'rss' => 'rss/whall.rss', |
1066 | 1066 | 'url' => 'whall/' |
1067 | 1067 | ), |
1068 | - 'whallyear' => array ( |
|
1068 | + 'whallyear' => array( |
|
1069 | 1069 | 'parent' => 'whallfront', |
1070 | 1070 | 'url' => 'whall/' |
1071 | 1071 | ), |
1072 | 1072 | |
1073 | - 'wms' => array ( |
|
1073 | + 'wms' => array( |
|
1074 | 1074 | 'parent' => 'wranswmsfront', |
1075 | 1075 | 'url' => 'wms/', |
1076 | 1076 | 'session_vars' => array('id') |
1077 | 1077 | ), |
1078 | - 'wmsday' => array ( |
|
1078 | + 'wmsday' => array( |
|
1079 | 1079 | 'parent' => 'wmsfront', |
1080 | 1080 | 'session_vars' => array('d'), |
1081 | 1081 | 'url' => 'wms/' |
1082 | 1082 | ), |
1083 | - 'wmsfront' => array ( |
|
1084 | - 'menu' => array ( |
|
1083 | + 'wmsfront' => array( |
|
1084 | + 'menu' => array( |
|
1085 | 1085 | 'text' => 'Written Ministerial Statements', |
1086 | 1086 | 'title' => '' |
1087 | 1087 | ), |
@@ -1090,22 +1090,22 @@ discard block |
||
1090 | 1090 | 'rss' => 'rss/wms.rss', |
1091 | 1091 | 'url' => 'wms/' |
1092 | 1092 | ), |
1093 | - 'wmsyear' => array ( |
|
1093 | + 'wmsyear' => array( |
|
1094 | 1094 | 'parent' => 'wmsfront', |
1095 | 1095 | 'url' => 'wms/' |
1096 | 1096 | ), |
1097 | 1097 | |
1098 | - 'wrans' => array ( |
|
1098 | + 'wrans' => array( |
|
1099 | 1099 | 'parent' => 'wranswmsfront', |
1100 | 1100 | 'url' => 'wrans/', |
1101 | - 'session_vars' => array ('id') |
|
1101 | + 'session_vars' => array('id') |
|
1102 | 1102 | ), |
1103 | - 'wransday' => array ( |
|
1103 | + 'wransday' => array( |
|
1104 | 1104 | 'parent' => 'wransfront', |
1105 | 1105 | 'url' => 'wrans/' |
1106 | 1106 | ), |
1107 | - 'wransfront' => array ( |
|
1108 | - 'menu' => array ( |
|
1107 | + 'wransfront' => array( |
|
1108 | + 'menu' => array( |
|
1109 | 1109 | 'text' => 'Written Answers', |
1110 | 1110 | 'title' => "Written Answers" |
1111 | 1111 | ), |
@@ -1118,13 +1118,13 @@ discard block |
||
1118 | 1118 | 'title' => 'For questions asked by ', |
1119 | 1119 | 'url' => 'wrans/' |
1120 | 1120 | ), |
1121 | - 'wransyear' => array ( |
|
1121 | + 'wransyear' => array( |
|
1122 | 1122 | 'parent' => 'wransfront', |
1123 | 1123 | 'url' => 'wrans/' |
1124 | 1124 | ), |
1125 | 1125 | |
1126 | - 'wranswmsfront' => array ( |
|
1127 | - 'menu' => array ( |
|
1126 | + 'wranswmsfront' => array( |
|
1127 | + 'menu' => array( |
|
1128 | 1128 | 'text' => 'Written Answers', |
1129 | 1129 | 'title' => 'Written Answers and Statements', |
1130 | 1130 | ), |
@@ -1141,8 +1141,8 @@ discard block |
||
1141 | 1141 | 'title' => 'Your representative', |
1142 | 1142 | 'url' => 'your/', |
1143 | 1143 | ), |
1144 | - 'yourmp' => array ( |
|
1145 | - 'menu' => array ( |
|
1144 | + 'yourmp' => array( |
|
1145 | + 'menu' => array( |
|
1146 | 1146 | 'text' => 'Your MP', |
1147 | 1147 | 'title' => "Find out about your Member of Parliament" |
1148 | 1148 | ), |
@@ -1151,8 +1151,8 @@ discard block |
||
1151 | 1151 | 'url' => 'mp/', |
1152 | 1152 | 'parent' => 'mps', |
1153 | 1153 | ), |
1154 | - 'yourmp_recent' => array ( |
|
1155 | - 'menu' => array ( |
|
1154 | + 'yourmp_recent' => array( |
|
1155 | + 'menu' => array( |
|
1156 | 1156 | 'text' => 'Recent appearances', |
1157 | 1157 | 'title' => "Recent speeches and written answers by this MP" |
1158 | 1158 | ), |
@@ -1160,8 +1160,8 @@ discard block |
||
1160 | 1160 | 'title' => "Your MP's recent appearances in parliament", |
1161 | 1161 | 'url' => 'mp/?recent=1' |
1162 | 1162 | ), |
1163 | - 'yourmsp' => array ( |
|
1164 | - 'menu' => array ( |
|
1163 | + 'yourmsp' => array( |
|
1164 | + 'menu' => array( |
|
1165 | 1165 | 'text' => 'Your MSPs', |
1166 | 1166 | 'title' => "Find out about your Members of the Scottish Parliament" |
1167 | 1167 | ), |
@@ -1170,8 +1170,8 @@ discard block |
||
1170 | 1170 | 'title' => 'Your MSPs', |
1171 | 1171 | 'url' => 'msp/' |
1172 | 1172 | ), |
1173 | - 'yourmla' => array ( |
|
1174 | - 'menu' => array ( |
|
1173 | + 'yourmla' => array( |
|
1174 | + 'menu' => array( |
|
1175 | 1175 | 'text' => 'Your MLAs', |
1176 | 1176 | 'title' => "Find out about your Members of the Legislative Assembly" |
1177 | 1177 | ), |
@@ -1187,38 +1187,38 @@ discard block |
||
1187 | 1187 | // The text displayed on the page itself will also be this, |
1188 | 1188 | // UNLESS the section has a 'heading', in which case that's used instead. |
1189 | 1189 | |
1190 | -$this->section = array ( |
|
1190 | +$this->section = array( |
|
1191 | 1191 | |
1192 | 1192 | |
1193 | - 'about' => array ( |
|
1193 | + 'about' => array( |
|
1194 | 1194 | 'title' => 'About Us' |
1195 | 1195 | ), |
1196 | - 'admin' => array ( |
|
1196 | + 'admin' => array( |
|
1197 | 1197 | 'title' => 'Admin' |
1198 | 1198 | ), |
1199 | - 'debates' => array ( |
|
1199 | + 'debates' => array( |
|
1200 | 1200 | 'title' => 'Debates', |
1201 | 1201 | 'heading' => 'House of Commons Debates' |
1202 | 1202 | ), |
1203 | - 'help_us_out' => array ( |
|
1203 | + 'help_us_out' => array( |
|
1204 | 1204 | 'title' => 'Help Us Out' |
1205 | 1205 | ), |
1206 | - 'hansard' => array ( |
|
1206 | + 'hansard' => array( |
|
1207 | 1207 | 'title' => 'Hansard' |
1208 | 1208 | ), |
1209 | - 'home' => array ( |
|
1209 | + 'home' => array( |
|
1210 | 1210 | 'title' => 'Home' |
1211 | 1211 | ), |
1212 | - 'mp' => array ( |
|
1212 | + 'mp' => array( |
|
1213 | 1213 | 'title' => 'Your MP' |
1214 | 1214 | ), |
1215 | - 'search' => array ( |
|
1215 | + 'search' => array( |
|
1216 | 1216 | 'title' => 'Search' |
1217 | 1217 | ), |
1218 | - 'sitenews' => array ( |
|
1218 | + 'sitenews' => array( |
|
1219 | 1219 | 'title' => 'TheyWorkForYou news' |
1220 | 1220 | ), |
1221 | - 'wrans' => array ( |
|
1221 | + 'wrans' => array( |
|
1222 | 1222 | 'title' => 'Written Answers' |
1223 | 1223 | ) |
1224 | 1224 |
@@ -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 |