@@ -12,9 +12,9 @@ discard block |
||
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/?'; |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | $after_mp = $speech['after_mp']; |
192 | 192 | } |
193 | 193 | include dirname(__FILE__) . '/../divisions/_your_mp.php'; |
194 | - } ?> |
|
194 | + } ?> |
|
195 | 195 | <div class="debate-speech__division__details"> |
196 | 196 | <?php include dirname(__FILE__) . '/../divisions/_votes.php'; ?> |
197 | 197 | </div> |
@@ -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 | |
@@ -61,27 +61,27 @@ discard block |
||
61 | 61 | $source = array(); |
62 | 62 | |
63 | 63 | $major = $data['info']['major']; |
64 | - if ($major==1 || $major==2 || (($major==3 || $major==4) && isset($speech['speaker']['house'])) || $major==101 || $major==6) { |
|
64 | + if ($major == 1 || $major == 2 || (($major == 3 || $major == 4) && isset($speech['speaker']['house'])) || $major == 101 || $major == 6) { |
|
65 | 65 | $source['title'] = 'Citation: '; |
66 | - if ($major==1 || $major==2) { |
|
66 | + if ($major == 1 || $major == 2) { |
|
67 | 67 | $source['title'] .= 'HC'; |
68 | - } elseif ($major==3 || $major==4) { |
|
69 | - if ($speech['speaker']['house']==1) { |
|
68 | + } elseif ($major == 3 || $major == 4) { |
|
69 | + if ($speech['speaker']['house'] == 1) { |
|
70 | 70 | $source['title'] .= 'HC'; |
71 | 71 | } else { |
72 | 72 | $source['title'] .= 'HL'; |
73 | 73 | } |
74 | - } elseif ($major==6) { |
|
74 | + } elseif ($major == 6) { |
|
75 | 75 | $source['title'] .= $data['section_title']; |
76 | 76 | } else { |
77 | 77 | $source['title'] .= 'HL'; |
78 | 78 | } |
79 | 79 | $source['title'] .= ' Deb, ' . format_date($data['info']['date'], LONGDATEFORMAT) . ', c' . $speech['colnum']; |
80 | - if ($major==2) { |
|
80 | + if ($major == 2) { |
|
81 | 81 | $source['title'] .= 'WH'; |
82 | - } elseif ($major==3) { |
|
82 | + } elseif ($major == 3) { |
|
83 | 83 | $source['title'] .= 'W'; |
84 | - } elseif ($major==4) { |
|
84 | + } elseif ($major == 4) { |
|
85 | 85 | $source['title'] .= 'WS'; |
86 | 86 | } |
87 | 87 | } |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | <div class="debate-speech__speaker-and-content"> |
111 | 111 | <?php } ?> |
112 | 112 | |
113 | - <?php if(isset($speech['speaker']) && count($speech['speaker']) > 0) { ?> |
|
113 | + <?php if (isset($speech['speaker']) && count($speech['speaker']) > 0) { ?> |
|
114 | 114 | <h2 class="debate-speech__speaker"> |
115 | 115 | <?php |
116 | 116 | |
@@ -177,17 +177,17 @@ discard block |
||
177 | 177 | <?php if ($division['has_description']) { ?> |
178 | 178 | <div class="debate-speech__division__details"> |
179 | 179 | <span class="policy-vote__text"> |
180 | - <?php include( dirname(__FILE__) . '/../divisions/_vote_description.php'); ?> |
|
180 | + <?php include(dirname(__FILE__) . '/../divisions/_vote_description.php'); ?> |
|
181 | 181 | </span><br> |
182 | 182 | </div> |
183 | 183 | <?php } ?> |
184 | 184 | |
185 | 185 | <?php if (isset($speech['mp_vote'])) { |
186 | - $mp_vote = array( 'vote' => $speech['mp_vote']['vote'] ); |
|
187 | - if ( isset($speech['before_mp']) ) { |
|
186 | + $mp_vote = array('vote' => $speech['mp_vote']['vote']); |
|
187 | + if (isset($speech['before_mp'])) { |
|
188 | 188 | $before_mp = $speech['before_mp']; |
189 | 189 | } |
190 | - if ( isset($speech['after_mp']) ) { |
|
190 | + if (isset($speech['after_mp'])) { |
|
191 | 191 | $after_mp = $speech['after_mp']; |
192 | 192 | } |
193 | 193 | include dirname(__FILE__) . '/../divisions/_your_mp.php'; |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | <div class="debate-speech__content"><?=$body ?></div> |
200 | 200 | <?php } ?> |
201 | 201 | |
202 | - <?php if ( $section ) { |
|
202 | + <?php if ($section) { |
|
203 | 203 | if ($speech['voting_data']) { ?> |
204 | 204 | |
205 | 205 | <div class="debate-speech__question-answered"> |
@@ -224,10 +224,10 @@ discard block |
||
224 | 224 | |
225 | 225 | // Video |
226 | 226 | if ($data['info']['major'] == 1 && !$individual_item) { # Commons debates only |
227 | - if ($speech['video_status']&4) { ?> |
|
227 | + if ($speech['video_status'] & 4) { ?> |
|
228 | 228 | <a href="<?= $speech['commentsurl'] ?>" class="watch debate-speech__meta__link" onclick="return moveVideo(\'debate/'<?= $speech['gid'] ?>\');">Watch this</a> |
229 | 229 | <?php |
230 | - } elseif (!$speech['video'] && $speech['video_status']&1 && !($speech['video_status']&8)) { |
|
230 | + } elseif (!$speech['video'] && $speech['video_status'] & 1 && !($speech['video_status'] & 8)) { |
|
231 | 231 | $gid_type = $data['info']['major'] == 1 ? 'debate' : 'lords'; ?> |
232 | 232 | <a href="/video/?from=debate&gid=<?= $gid_type ?>/<?= $speech['gid'] ?>" class="timestamp debate-speech__meta__link">Video match this</a> |
233 | 233 | <?php |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | $moreinfo[] = $row['totalcomments'] . " $plural"; |
355 | 355 | } |
356 | 356 | if (count($moreinfo) > 0) { |
357 | - print "<small>(" . implode (', ', $moreinfo) . ") </small>"; |
|
357 | + print "<small>(" . implode(', ', $moreinfo) . ") </small>"; |
|
358 | 358 | } |
359 | 359 | } else { |
360 | 360 | // Nothing in this item, so no link. |