@@ -12,9 +12,9 @@ |
||
12 | 12 | if ($hansardmajors[$data['info']['major']]['location'] == 'Scotland') { |
13 | 13 | $body = preg_replace('# (S\d[O0WF]-\d+)[, ]#', ' <a href="/spwrans/?spid=$1">$1</a> ', $body); |
14 | 14 | $body = preg_replace_callback('#<citation id="uk\.org\.publicwhip/(.*?)/(.*?)">\[(.*?)\]</citation>#', function($matches) { |
15 | - if ($matches[1] == 'spor') { |
|
16 | - $href_segment = 'sp/?g'; |
|
17 | - } elseif ($matches[1] == 'spwa') { |
|
15 | + if ($matches[1] == 'spor') { |
|
16 | + $href_segment = 'sp/?g'; |
|
17 | + } elseif ($matches[1] == 'spwa') { |
|
18 | 18 | $href_segment = 'spwrans/?'; |
19 | 19 | } else { |
20 | 20 | $href_segment = 'debates/?'; |
@@ -157,7 +157,7 @@ |
||
157 | 157 | <?php # XXX |
158 | 158 | if ($data['info']['major'] == 8 && preg_match('#\d{4}-\d\d-\d\d\.(.*?)\.q#', $speech['gid'], $m)) { |
159 | 159 | ?><p class="debate-speech__question_id"><small> |
160 | - <?= "Question $m[1]" ?> |
|
160 | + <?= "question $m[1]" ?> |
|
161 | 161 | </small></p> |
162 | 162 | <?php } ?> |
163 | 163 | </h2> |
@@ -1,4 +1,4 @@ discard block |
||
1 | - <?php foreach($data['rows'] as $speech) { ?> |
|
1 | + <?php foreach ($data['rows'] as $speech) { ?> |
|
2 | 2 | |
3 | 3 | <?php |
4 | 4 | |
@@ -65,34 +65,34 @@ discard block |
||
65 | 65 | 'url' => $speech['source_url'] |
66 | 66 | ); |
67 | 67 | $major = $data['info']['major']; |
68 | - if ($major==1 || $major==2 || (($major==3 || $major==4) && isset($speech['speaker']['house'])) || $major==101 || $major==6) { |
|
68 | + if ($major == 1 || $major == 2 || (($major == 3 || $major == 4) && isset($speech['speaker']['house'])) || $major == 101 || $major == 6) { |
|
69 | 69 | $source['title'] = 'Citation: '; |
70 | - if ($major==1 || $major==2) { |
|
70 | + if ($major == 1 || $major == 2) { |
|
71 | 71 | $source['title'] .= 'HC'; |
72 | - } elseif ($major==3 || $major==4) { |
|
73 | - if ($speech['speaker']['house']==1) { |
|
72 | + } elseif ($major == 3 || $major == 4) { |
|
73 | + if ($speech['speaker']['house'] == 1) { |
|
74 | 74 | $source['title'] .= 'HC'; |
75 | 75 | } else { |
76 | 76 | $source['title'] .= 'HL'; |
77 | 77 | } |
78 | - } elseif ($major==6) { |
|
78 | + } elseif ($major == 6) { |
|
79 | 79 | $source['title'] .= $data['section_title']; |
80 | 80 | } else { |
81 | 81 | $source['title'] .= 'HL'; |
82 | 82 | } |
83 | 83 | $source['title'] .= ' Deb, ' . format_date($data['info']['date'], LONGDATEFORMAT) . ', c' . $speech['colnum']; |
84 | - if ($major==2) { |
|
84 | + if ($major == 2) { |
|
85 | 85 | $source['title'] .= 'WH'; |
86 | - } elseif ($major==3) { |
|
86 | + } elseif ($major == 3) { |
|
87 | 87 | $source['title'] .= 'W'; |
88 | - } elseif ($major==4) { |
|
88 | + } elseif ($major == 4) { |
|
89 | 89 | $source['title'] .= 'WS'; |
90 | 90 | } |
91 | 91 | } else { |
92 | 92 | $source['title'] = null; |
93 | 93 | } |
94 | 94 | |
95 | - if ($hansardmajors[$data['info']['major']]['location']=='Scotland'){ |
|
95 | + if ($hansardmajors[$data['info']['major']]['location'] == 'Scotland') { |
|
96 | 96 | $source['text'] = 'Official Report source'; |
97 | 97 | } else { |
98 | 98 | $source['text'] = 'Hansard source'; |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | |
110 | 110 | <div class="debate-speech__speaker-and-content"> |
111 | 111 | |
112 | - <?php if(isset($speech['speaker']) && count($speech['speaker']) > 0) { ?> |
|
112 | + <?php if (isset($speech['speaker']) && count($speech['speaker']) > 0) { ?> |
|
113 | 113 | <h2 class="debate-speech__speaker"> |
114 | 114 | <?php |
115 | 115 | |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | <?php } ?> |
167 | 167 | <div class="debate-speech__content"><?=$body ?></div> |
168 | 168 | |
169 | - <?php if ( $section ) { |
|
169 | + <?php if ($section) { |
|
170 | 170 | if ($speech['voting_data']) { ?> |
171 | 171 | |
172 | 172 | <div class="debate-speech__question-answered"> |
@@ -191,10 +191,10 @@ discard block |
||
191 | 191 | |
192 | 192 | // Video |
193 | 193 | if ($data['info']['major'] == 1 && !$individual_item) { # Commons debates only |
194 | - if ($speech['video_status']&4) { ?> |
|
194 | + if ($speech['video_status'] & 4) { ?> |
|
195 | 195 | <a href="<?= $speech['commentsurl'] ?>" class="watch debate-speech__meta__link" onclick="return moveVideo(\'debate/'<?= $speech['gid'] ?>\');">Watch this</a> |
196 | 196 | <?php |
197 | - } elseif (!$speech['video'] && $speech['video_status']&1 && !($speech['video_status']&8)) { |
|
197 | + } elseif (!$speech['video'] && $speech['video_status'] & 1 && !($speech['video_status'] & 8)) { |
|
198 | 198 | $gid_type = $data['info']['major'] == 1 ? 'debate' : 'lords'; ?> |
199 | 199 | <a href="/video/?from=debate&gid=<?= $gid_type ?>/<?= $speech['gid'] ?>" class="timestamp debate-speech__meta__link">Video match this</a> |
200 | 200 | <?php |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | $moreinfo[] = $row['totalcomments'] . " $plural"; |
299 | 299 | } |
300 | 300 | if (count($moreinfo) > 0) { |
301 | - print "<small>(" . implode (', ', $moreinfo) . ") </small>"; |
|
301 | + print "<small>(" . implode(', ', $moreinfo) . ") </small>"; |
|
302 | 302 | } |
303 | 303 | } else { |
304 | 304 | // Nothing in this item, so no link. |
@@ -14,9 +14,11 @@ discard block |
||
14 | 14 | $body = preg_replace_callback('#<citation id="uk\.org\.publicwhip/(.*?)/(.*?)">\[(.*?)\]</citation>#', function($matches) { |
15 | 15 | if ($matches[1] == 'spor') { |
16 | 16 | $href_segment = 'sp/?g'; |
17 | - } elseif ($matches[1] == 'spwa') { |
|
17 | + } |
|
18 | + elseif ($matches[1] == 'spwa') { |
|
18 | 19 | $href_segment = 'spwrans/?'; |
19 | - } else { |
|
20 | + } |
|
21 | + else { |
|
20 | 22 | $href_segment = 'debates/?'; |
21 | 23 | } |
22 | 24 | return '[<a href="' . $href_segment . 'id=' . $matches[2] . '\">' . $matches[3] . '</a>]'; |
@@ -69,32 +71,40 @@ discard block |
||
69 | 71 | $source['title'] = 'Citation: '; |
70 | 72 | if ($major==1 || $major==2) { |
71 | 73 | $source['title'] .= 'HC'; |
72 | - } elseif ($major==3 || $major==4) { |
|
74 | + } |
|
75 | + elseif ($major==3 || $major==4) { |
|
73 | 76 | if ($speech['speaker']['house']==1) { |
74 | 77 | $source['title'] .= 'HC'; |
75 | - } else { |
|
78 | + } |
|
79 | + else { |
|
76 | 80 | $source['title'] .= 'HL'; |
77 | 81 | } |
78 | - } elseif ($major==6) { |
|
82 | + } |
|
83 | + elseif ($major==6) { |
|
79 | 84 | $source['title'] .= $data['section_title']; |
80 | - } else { |
|
85 | + } |
|
86 | + else { |
|
81 | 87 | $source['title'] .= 'HL'; |
82 | 88 | } |
83 | 89 | $source['title'] .= ' Deb, ' . format_date($data['info']['date'], LONGDATEFORMAT) . ', c' . $speech['colnum']; |
84 | 90 | if ($major==2) { |
85 | 91 | $source['title'] .= 'WH'; |
86 | - } elseif ($major==3) { |
|
92 | + } |
|
93 | + elseif ($major==3) { |
|
87 | 94 | $source['title'] .= 'W'; |
88 | - } elseif ($major==4) { |
|
95 | + } |
|
96 | + elseif ($major==4) { |
|
89 | 97 | $source['title'] .= 'WS'; |
90 | 98 | } |
91 | - } else { |
|
99 | + } |
|
100 | + else { |
|
92 | 101 | $source['title'] = null; |
93 | 102 | } |
94 | 103 | |
95 | - if ($hansardmajors[$data['info']['major']]['location']=='Scotland'){ |
|
104 | + if ($hansardmajors[$data['info']['major']]['location']=='Scotland') { |
|
96 | 105 | $source['text'] = 'Official Report source'; |
97 | - } else { |
|
106 | + } |
|
107 | + else { |
|
98 | 108 | $source['text'] = 'Hansard source'; |
99 | 109 | } |
100 | 110 | } |
@@ -128,7 +138,8 @@ discard block |
||
128 | 138 | $desc[] = $off['pretty']; |
129 | 139 | } |
130 | 140 | $speaker_position = join(', ', $desc); |
131 | - } else { |
|
141 | + } |
|
142 | + else { |
|
132 | 143 | $speaker_position = _htmlentities($speaker['party']); |
133 | 144 | if ($speaker['house'] == 1 && |
134 | 145 | $speaker['party'] != 'Speaker' && |
@@ -190,11 +201,13 @@ discard block |
||
190 | 201 | } # End of voting HTML |
191 | 202 | |
192 | 203 | // Video |
193 | - if ($data['info']['major'] == 1 && !$individual_item) { # Commons debates only |
|
204 | + if ($data['info']['major'] == 1 && !$individual_item) { |
|
205 | +# Commons debates only |
|
194 | 206 | if ($speech['video_status']&4) { ?> |
195 | 207 | <a href="<?= $speech['commentsurl'] ?>" class="watch debate-speech__meta__link" onclick="return moveVideo(\'debate/'<?= $speech['gid'] ?>\');">Watch this</a> |
196 | 208 | <?php |
197 | - } elseif (!$speech['video'] && $speech['video_status']&1 && !($speech['video_status']&8)) { |
|
209 | + } |
|
210 | + elseif (!$speech['video'] && $speech['video_status']&1 && !($speech['video_status']&8)) { |
|
198 | 211 | $gid_type = $data['info']['major'] == 1 ? 'debate' : 'lords'; ?> |
199 | 212 | <a href="/video/?from=debate&gid=<?= $gid_type ?>/<?= $speech['gid'] ?>" class="timestamp debate-speech__meta__link">Video match this</a> |
200 | 213 | <?php |
@@ -231,9 +244,11 @@ discard block |
||
231 | 244 | <?php if ($section && $hansardmajors[$speech['major']]['type'] == 'debate' && $individual_item) { |
232 | 245 | if ($speech['htype'] == '12') { |
233 | 246 | $thing = 'speech'; |
234 | - } elseif ($speech['htype'] == '13') { |
|
247 | + } |
|
248 | + elseif ($speech['htype'] == '13') { |
|
235 | 249 | $thing = 'item'; |
236 | - } else { |
|
250 | + } |
|
251 | + else { |
|
237 | 252 | $thing = 'item'; |
238 | 253 | } |
239 | 254 | ?> |
@@ -242,7 +257,8 @@ discard block |
||
242 | 257 | </li> |
243 | 258 | <?php |
244 | 259 | } |
245 | - if (!$section || !$individual_item) { # XXX ?> |
|
260 | + if (!$section || !$individual_item) { |
|
261 | +# XXX ?> |
|
246 | 262 | <li class="link-to-speech"> |
247 | 263 | <span class="link-to-speech__label">Link to this speech</span> |
248 | 264 | <a href="<?= $speech['listurl'] ?>" class="link debate-speech__meta__link">In context</a> |
@@ -296,9 +312,11 @@ discard block |
||
296 | 312 | print '<li class="subrows__list-item">'; |
297 | 313 | if (isset($row['contentcount']) && $row['contentcount'] > 0) { |
298 | 314 | $has_content = true; |
299 | - } elseif ($row['htype'] == '11' && $hansardmajors[$row['major']]['type'] == 'other') { |
|
315 | + } |
|
316 | + elseif ($row['htype'] == '11' && $hansardmajors[$row['major']]['type'] == 'other') { |
|
300 | 317 | $has_content = true; |
301 | - } else { |
|
318 | + } |
|
319 | + else { |
|
302 | 320 | $has_content = false; |
303 | 321 | } |
304 | 322 | if ($has_content) { |
@@ -318,7 +336,8 @@ discard block |
||
318 | 336 | if (count($moreinfo) > 0) { |
319 | 337 | print "<small>(" . implode (', ', $moreinfo) . ") </small>"; |
320 | 338 | } |
321 | - } else { |
|
339 | + } |
|
340 | + else { |
|
322 | 341 | // Nothing in this item, so no link. |
323 | 342 | print $row['body']; |
324 | 343 | } |
@@ -10,17 +10,17 @@ |
||
10 | 10 | <input type="submit" value="Search" class="button search-section__submit"> |
11 | 11 | </div> |
12 | 12 | </div> |
13 | - <?php if ( isset($search_sections) ) { ?> |
|
14 | - <?php if ( count($search_sections) == 1 ) { ?> |
|
13 | + <?php if (isset($search_sections)) { ?> |
|
14 | + <?php if (count($search_sections) == 1) { ?> |
|
15 | 15 | <input name="section" value="<?= $search_sections[0]['section'] ?>" type="hidden"> |
16 | - <?php } else if ( count($search_sections) > 1 ) { ?> |
|
16 | + <?php } else if (count($search_sections) > 1) { ?> |
|
17 | 17 | <div class="search-section__filters"> |
18 | - <?php foreach ( $search_sections as $section ) { ?> |
|
18 | + <?php foreach ($search_sections as $section) { ?> |
|
19 | 19 | <label><input name="section[]" value="<?= $section['section'] ?>" type="checkbox" checked="checked"><?= $section['title'] ?></label> |
20 | 20 | <?php } ?> |
21 | 21 | </div> |
22 | 22 | <?php } |
23 | - } else if ( isset($section) ) { ?> |
|
23 | + } else if (isset($section)) { ?> |
|
24 | 24 | <input name="section" value="<?= $section ?>" type="hidden"> |
25 | 25 | <?php } ?> |
26 | 26 | </form> |
@@ -13,14 +13,16 @@ |
||
13 | 13 | <?php if ( isset($search_sections) ) { ?> |
14 | 14 | <?php if ( count($search_sections) == 1 ) { ?> |
15 | 15 | <input name="section" value="<?= $search_sections[0]['section'] ?>" type="hidden"> |
16 | - <?php } else if ( count($search_sections) > 1 ) { ?> |
|
16 | + <?php } |
|
17 | +else if ( count($search_sections) > 1 ) { ?> |
|
17 | 18 | <div class="search-section__filters"> |
18 | 19 | <?php foreach ( $search_sections as $section ) { ?> |
19 | 20 | <label><input name="section[]" value="<?= $section['section'] ?>" type="checkbox" checked="checked"><?= $section['title'] ?></label> |
20 | 21 | <?php } ?> |
21 | 22 | </div> |
22 | 23 | <?php } |
23 | - } else if ( isset($section) ) { ?> |
|
24 | + } |
|
25 | + else if ( isset($section) ) { ?> |
|
24 | 26 | <input name="section" value="<?= $section ?>" type="hidden"> |
25 | 27 | <?php } ?> |
26 | 28 | </form> |
@@ -1,5 +1,5 @@ discard block |
||
1 | - <?php if ( isset($mini_survey) ) { |
|
2 | - if ( $mini_survey['show'] ) { ?> |
|
1 | + <?php if (isset($mini_survey)) { |
|
2 | + if ($mini_survey['show']) { ?> |
|
3 | 3 | <form class="minisurvey" method="post" action="<?=OPTION_SURVEY_URL?>"> |
4 | 4 | <p>Did you find what you were looking for?</p> |
5 | 5 | <input type="hidden" name="sourceidentifier" value="twfy-mini-2"> |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | |
18 | 18 | <input type="submit" value="Submit answer"> |
19 | 19 | </form> |
20 | - <?php } else if ( $mini_survey['answered'] ) { ?> |
|
20 | + <?php } else if ($mini_survey['answered']) { ?> |
|
21 | 21 | <p>Thanks for answering</p> |
22 | 22 | <?php } ?> |
23 | 23 | <?php } ?> |
@@ -17,7 +17,8 @@ |
||
17 | 17 | |
18 | 18 | <input type="submit" value="Submit answer"> |
19 | 19 | </form> |
20 | - <?php } else if ( $mini_survey['answered'] ) { ?> |
|
20 | + <?php } |
|
21 | +else if ( $mini_survey['answered'] ) { ?> |
|
21 | 22 | <p>Thanks for answering</p> |
22 | 23 | <?php } ?> |
23 | 24 | <?php } ?> |
@@ -41,7 +41,7 @@ |
||
41 | 41 | <div class="row nested-row"> |
42 | 42 | <div class="homepage-in-the-news homepage-content-section"> |
43 | 43 | <?php if ( $featured ) { |
44 | - include dirname(__FILE__) . "/../homepage/featured.php"; |
|
44 | + include dirname(__FILE__) . "/../homepage/featured.php"; |
|
45 | 45 | } ?> |
46 | 46 | </div> |
47 | 47 | <div class="homepage-create-alert homepage-content-section"> |
@@ -4,10 +4,10 @@ discard block |
||
4 | 4 | <div class="hero__mp-search__wrap"> |
5 | 5 | <h1>Do your MLAs 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 MLAs: </li> |
10 | - <?php foreach ( $data['regional'] as $mla ) { ?> |
|
10 | + <?php foreach ($data['regional'] as $mla) { ?> |
|
11 | 11 | <li class="homepage-rep-list__rep"><a href="/mla/?p=<?= $mla['person_id'] ?>"><?= $mla['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 in the Northern Ireland Assembly</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> |
@@ -11,7 +11,8 @@ |
||
11 | 11 | <li class="homepage-rep-list__rep"><a href="/mla/?p=<?= $mla['person_id'] ?>"><?= $mla['name'] ?></a></li> |
12 | 12 | <?php } ?> |
13 | 13 | </ul> |
14 | - <?php } else { ?> |
|
14 | + <?php } |
|
15 | +else { ?> |
|
15 | 16 | <form action="/postcode/" class="mp-search__form" onsubmit="trackFormSubmit(this, 'PostcodeSearch', 'Submit', 'NIHome'); return false;"> |
16 | 17 | <label for="postcode">Your Northern Ireland postcode</label> |
17 | 18 | <div class="medium-9 columns"> |
@@ -61,23 +61,23 @@ |
||
61 | 61 | <?php else: ?> |
62 | 62 | <ul class="vote-descriptions"> |
63 | 63 | <?php |
64 | - $policy_ids = array(); |
|
65 | - |
|
66 | - foreach ($positions as $position) { |
|
67 | - if (!in_array($position['policy_id'], $policy_ids)) { |
|
68 | - $description = ucfirst($position['desc']); |
|
69 | - $link = sprintf( |
|
70 | - '%s/divisions?policy=%s', |
|
71 | - $member_url, |
|
72 | - $position['policy_id'] |
|
73 | - ); |
|
74 | - $show_link = $position['position'] != 'has never voted on'; |
|
75 | - $key_vote = $position; |
|
76 | - include(dirname(__DIR__) . '/mp/_vote_description.php'); |
|
77 | - |
|
78 | - $policy_ids[] = $position['policy_id']; |
|
79 | - } |
|
80 | - } ?> |
|
64 | + $policy_ids = array(); |
|
65 | + |
|
66 | + foreach ($positions as $position) { |
|
67 | + if (!in_array($position['policy_id'], $policy_ids)) { |
|
68 | + $description = ucfirst($position['desc']); |
|
69 | + $link = sprintf( |
|
70 | + '%s/divisions?policy=%s', |
|
71 | + $member_url, |
|
72 | + $position['policy_id'] |
|
73 | + ); |
|
74 | + $show_link = $position['position'] != 'has never voted on'; |
|
75 | + $key_vote = $position; |
|
76 | + include(dirname(__DIR__) . '/mp/_vote_description.php'); |
|
77 | + |
|
78 | + $policy_ids[] = $position['policy_id']; |
|
79 | + } |
|
80 | + } ?> |
|
81 | 81 | </ul> |
82 | 82 | |
83 | 83 | <?php endif; ?> |
@@ -58,10 +58,12 @@ |
||
58 | 58 | to <a href="<?= $member_url ?>/votes">see all their votes</a>. |
59 | 59 | </p> |
60 | 60 | |
61 | - <?php else: ?> |
|
61 | + <?php else { |
|
62 | + : ?> |
|
62 | 63 | <ul class="vote-descriptions"> |
63 | 64 | <?php |
64 | 65 | $policy_ids = array(); |
66 | +} |
|
65 | 67 | |
66 | 68 | foreach ($positions as $position) { |
67 | 69 | if (!in_array($position['policy_id'], $policy_ids)) { |
@@ -113,7 +113,7 @@ |
||
113 | 113 | </div> |
114 | 114 | |
115 | 115 | <ul class="debate-speech__meta debate-speech__links"> |
116 | - <?php if ( $division['debate_url'] ) { ?> |
|
116 | + <?php if ($division['debate_url']) { ?> |
|
117 | 117 | <li class="link-to-speech"> |
118 | 118 | <a class="link debate-speech__meta__link" href="<?= $division['debate_url'] ?>">Show full debate</a> |
119 | 119 | </li> |
@@ -49,11 +49,13 @@ discard block |
||
49 | 49 | <a href="/mp/?p=<?= $member->person_id() ?>"><?= $member->full_name() ?></a> <?= preg_replace('/(voted\s+(?:for|against|not to|to|in favour))/', '<b>\1</b>', $mp_vote['text']) ?> |
50 | 50 | </span><br> |
51 | 51 | </p> |
52 | - <?php } else if (isset($before_mp)) { ?> |
|
52 | + <?php } |
|
53 | +else if (isset($before_mp)) { ?> |
|
53 | 54 | <p> |
54 | 55 | This vote happened before <a href="/mp/?p=<?= $member->person_id() ?>"><?= $member->full_name() ?></a> was elected. |
55 | 56 | </p> |
56 | - <?php } else if (isset($after_mp)) { ?> |
|
57 | + <?php } |
|
58 | +else if (isset($after_mp)) { ?> |
|
57 | 59 | <p> |
58 | 60 | This vote happened after <a href="/mp/?p=<?= $member->person_id() ?>"><?= $member->full_name() ?></a> left the House of Commons. |
59 | 61 | </p> |
@@ -63,17 +65,20 @@ discard block |
||
63 | 65 | <span class="policy-vote__text"> |
64 | 66 | <?php include('_vote_description.php'); ?> |
65 | 67 | </span><br> |
66 | - <?php } else { ?> |
|
68 | + <?php } |
|
69 | +else { ?> |
|
67 | 70 | <?php if ($mp_vote['with_majority']) { ?> |
68 | 71 | A majority of MPs voted the same. |
69 | - <?php } else { ?> |
|
72 | + <?php } |
|
73 | +else { ?> |
|
70 | 74 | <?php $vote_prefix = 'A majority of MPs <b>disagreed</b> and'; include('_vote_description.php'); ?> |
71 | 75 | <?php } ?> |
72 | 76 | <?php } ?> |
73 | 77 | </p> |
74 | 78 | |
75 | 79 | <?php include('_vote_summary.php'); ?> |
76 | - <?php } else { ?> |
|
80 | + <?php } |
|
81 | +else { ?> |
|
77 | 82 | <p> |
78 | 83 | <span class="policy-vote__text"> |
79 | 84 | <?php include('_vote_description.php'); ?> |
@@ -87,23 +92,30 @@ discard block |
||
87 | 92 | Your MP, <a href="/mp/?p=<?= $member->person_id() ?>"><?= $member->full_name() ?></a>, |
88 | 93 | <?php if ($mp_vote['vote'] == 'aye') { ?> |
89 | 94 | voted for. |
90 | - <?php } else if ($mp_vote['vote'] == 'no') { ?> |
|
95 | + <?php } |
|
96 | +else if ($mp_vote['vote'] == 'no') { ?> |
|
91 | 97 | voted against. |
92 | - <?php } else if ($mp_vote['vote'] == 'absent') { ?> |
|
98 | + <?php } |
|
99 | +else if ($mp_vote['vote'] == 'absent') { ?> |
|
93 | 100 | was absent. |
94 | - <?php } else if ($mp_vote['vote'] == 'both') { ?> |
|
101 | + <?php } |
|
102 | +else if ($mp_vote['vote'] == 'both') { ?> |
|
95 | 103 | abstained. |
96 | - <?php } else if ($mp_vote['vote'] == 'tellaye') { ?> |
|
104 | + <?php } |
|
105 | +else if ($mp_vote['vote'] == 'tellaye') { ?> |
|
97 | 106 | was a teller for the Ayes. |
98 | - <?php } else if ($mp_vote['vote'] == 'tellno') { ?> |
|
107 | + <?php } |
|
108 | +else if ($mp_vote['vote'] == 'tellno') { ?> |
|
99 | 109 | was a teller for the Nos. |
100 | 110 | <?php } ?> |
101 | 111 | </p> |
102 | - <?php } else if (isset($before_mp)) { ?> |
|
112 | + <?php } |
|
113 | +else if (isset($before_mp)) { ?> |
|
103 | 114 | <p> |
104 | 115 | This vote happened before your MP, <a href="/mp/?p=<?= $member->person_id() ?>"><?= $member->full_name() ?></a>, was elected. |
105 | 116 | </p> |
106 | - <?php } else if (isset($after_mp)) { ?> |
|
117 | + <?php } |
|
118 | +else if (isset($after_mp)) { ?> |
|
107 | 119 | <p> |
108 | 120 | This vote happened after your MP, <a href="/mp/?p=<?= $member->person_id() ?>"><?= $member->full_name() ?></a>, left the House of Commons. |
109 | 121 | </p> |
@@ -9,10 +9,10 @@ |
||
9 | 9 | ?> |
10 | 10 | <ul class="division-list"> |
11 | 11 | <?php foreach ($votes as $vote) { |
12 | - $voter = sprintf('<a href="/mp/?p=%d">%s</a>', $vote['person_id'], $vote['name']); |
|
13 | - if ($vote['teller']) { |
|
14 | - $tellers[] = $voter; |
|
15 | - } else { ?> |
|
12 | + $voter = sprintf('<a href="/mp/?p=%d">%s</a>', $vote['person_id'], $vote['name']); |
|
13 | + if ($vote['teller']) { |
|
14 | + $tellers[] = $voter; |
|
15 | + } else { ?> |
|
16 | 16 | <li><?= $voter ?></li> |
17 | 17 | <?php |
18 | 18 | } |
@@ -12,7 +12,8 @@ discard block |
||
12 | 12 | $voter = sprintf('<a href="/mp/?p=%d">%s</a>', $vote['person_id'], $vote['name']); |
13 | 13 | if ($vote['teller']) { |
14 | 14 | $tellers[] = $voter; |
15 | - } else { ?> |
|
15 | + } |
|
16 | + else { ?> |
|
16 | 17 | <li><?= $voter ?></li> |
17 | 18 | <?php |
18 | 19 | } |
@@ -23,7 +24,8 @@ discard block |
||
23 | 24 | Tellers: <?= implode(', ', $tellers) ?> |
24 | 25 | </p> |
25 | 26 | <?php } |
26 | - } else { ?> |
|
27 | + } |
|
28 | + else { ?> |
|
27 | 29 | <p> |
28 | 30 | None |
29 | 31 | </p> |
@@ -7,9 +7,9 @@ discard block |
||
7 | 7 | </div> |
8 | 8 | <div class="business-section__primary"> |
9 | 9 | <?php |
10 | - if ( isset($divisions) && $divisions ) { |
|
11 | - $current_date = ''; |
|
12 | - ?> |
|
10 | + if ( isset($divisions) && $divisions ) { |
|
11 | + $current_date = ''; |
|
12 | + ?> |
|
13 | 13 | <ul class="business-list"> |
14 | 14 | <?php foreach ($divisions as $division) { ?> |
15 | 15 | <li id="<?= $division['division_id'] ?>"> |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | <h3><?= format_date($division['date'], LONGERDATEFORMAT) ?></h3> |
19 | 19 | </span> |
20 | 20 | <?php |
21 | - $current_date = $division['date']; |
|
21 | + $current_date = $division['date']; |
|
22 | 22 | } ?> |
23 | 23 | <a href="/divisions/<?= $division['division_id'] ?>" class="business-list__title"> |
24 | 24 | <h3><?= $division['division_title'] ?></h3> |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | </div> |
8 | 8 | <div class="business-section__primary"> |
9 | 9 | <?php |
10 | - if ( isset($divisions) && $divisions ) { |
|
10 | + if (isset($divisions) && $divisions) { |
|
11 | 11 | $current_date = ''; |
12 | 12 | ?> |
13 | 13 | <ul class="business-list"> |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | <br> |
30 | 30 | <span class="business-list__meta"> |
31 | 31 | <?= $division['summary'] ?> |
32 | - <?= $division['mp_vote'] !== '' ? '. <b>Your MP, ' . $mp_name . ', ' . $division['mp_vote'] . '.</b>': '' ?> |
|
32 | + <?= $division['mp_vote'] !== '' ? '. <b>Your MP, ' . $mp_name . ', ' . $division['mp_vote'] . '.</b>' : '' ?> |
|
33 | 33 | </span> |
34 | 34 | </p> |
35 | 35 | </li> |
@@ -84,13 +84,13 @@ |
||
84 | 84 | $db->display_total_duration(); |
85 | 85 | |
86 | 86 | $duration = getmicrotime() - STARTTIME; |
87 | - twfy_debug ("TIME", "Total time for page: $duration seconds."); |
|
87 | + twfy_debug("TIME", "Total time for page: $duration seconds."); |
|
88 | 88 | if (!isset($_SERVER['WINDIR'])) { |
89 | 89 | $rusage = getrusage(); |
90 | - $duration = $rusage['ru_utime.tv_sec']*1000000 + $rusage['ru_utime.tv_usec'] - STARTTIMEU; |
|
91 | - twfy_debug ('TIME', "Total user time: $duration microseconds."); |
|
92 | - $duration = $rusage['ru_stime.tv_sec']*1000000 + $rusage['ru_stime.tv_usec'] - STARTTIMES; |
|
93 | - twfy_debug ('TIME', "Total system time: $duration microseconds."); |
|
90 | + $duration = $rusage['ru_utime.tv_sec'] * 1000000 + $rusage['ru_utime.tv_usec'] - STARTTIMEU; |
|
91 | + twfy_debug('TIME', "Total user time: $duration microseconds."); |
|
92 | + $duration = $rusage['ru_stime.tv_sec'] * 1000000 + $rusage['ru_stime.tv_usec'] - STARTTIMES; |
|
93 | + twfy_debug('TIME', "Total system time: $duration microseconds."); |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | ?> |