@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $this->summaries = isset($options['summaries']) ? $options['summaries'] : array(); |
64 | 64 | $this->divisions = new \MySociety\TheyWorkForYou\Divisions($member); |
65 | 65 | |
66 | - $limit = isset($options['limit']) ? $options['limit'] : NULL; |
|
66 | + $limit = isset($options['limit']) ? $options['limit'] : null; |
|
67 | 67 | |
68 | 68 | // Do the actual getting of positions |
69 | 69 | $this->getMemberPolicyPositions($limit); |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | * @param int $limit The number of results to limit the output to. |
78 | 78 | */ |
79 | 79 | |
80 | - private function getMemberPolicyPositions ($limit = NULL) { |
|
80 | + private function getMemberPolicyPositions ($limit = null) { |
|
81 | 81 | |
82 | 82 | // Make sure member info has actually been set. |
83 | 83 | if (count($this->member->extra_info) === 0) { |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $member_houses = $this->member->houses(); |
90 | 90 | |
91 | 91 | // Determine the policy limit. |
92 | - if ($limit !== NULL AND is_int($limit)) |
|
92 | + if ($limit !== null and is_int($limit)) |
|
93 | 93 | { |
94 | 94 | $policy_limit = $limit; |
95 | 95 | } else { |
@@ -208,12 +208,12 @@ discard block |
||
208 | 208 | $current_member = $this->member->current_member(); |
209 | 209 | |
210 | 210 | if (count($this->policies) > 0) { |
211 | - if (in_array(HOUSE_TYPE_COMMONS, $member_houses) AND |
|
211 | + if (in_array(HOUSE_TYPE_COMMONS, $member_houses) and |
|
212 | 212 | $entered_house[HOUSE_TYPE_COMMONS]['date'] > '2001-06-07' |
213 | 213 | ) { |
214 | 214 | $since = ''; |
215 | - } elseif (!in_array(HOUSE_TYPE_COMMONS, $member_houses) AND |
|
216 | - in_array(HOUSE_TYPE_LORDS, $member_houses) AND |
|
215 | + } elseif (!in_array(HOUSE_TYPE_COMMONS, $member_houses) and |
|
216 | + in_array(HOUSE_TYPE_LORDS, $member_houses) and |
|
217 | 217 | $entered_house[HOUSE_TYPE_LORDS]['date'] > '2001-06-07' |
218 | 218 | ) { |
219 | 219 | $since = ''; |
@@ -223,9 +223,9 @@ discard block |
||
223 | 223 | $since = ' since 2001'; |
224 | 224 | } |
225 | 225 | # If not current MP/Lord, but current MLA/MSP, need to say voting record is when MP |
226 | - if (!$current_member[HOUSE_TYPE_COMMONS] AND |
|
227 | - !$current_member[HOUSE_TYPE_LORDS] AND |
|
228 | - ( $current_member[HOUSE_TYPE_SCOTLAND] OR $current_member[HOUSE_TYPE_NI] ) |
|
226 | + if (!$current_member[HOUSE_TYPE_COMMONS] and |
|
227 | + !$current_member[HOUSE_TYPE_LORDS] and |
|
228 | + ( $current_member[HOUSE_TYPE_SCOTLAND] or $current_member[HOUSE_TYPE_NI] ) |
|
229 | 229 | ) { |
230 | 230 | $since .= ' whilst an MP'; |
231 | 231 | } |
@@ -246,10 +246,10 @@ discard block |
||
246 | 246 | '" title="At The Guardian">well-known issues</a> <small>(from the Guardian)</small>'; |
247 | 247 | } |
248 | 248 | if ( |
249 | - ( isset($extra_info['public_whip_division_attendance']) AND |
|
249 | + ( isset($extra_info['public_whip_division_attendance']) and |
|
250 | 250 | $extra_info['public_whip_division_attendance'] != 'n/a' ) |
251 | - OR |
|
252 | - ( isset($extra_info['Lpublic_whip_division_attendance']) AND |
|
251 | + or |
|
252 | + ( isset($extra_info['Lpublic_whip_division_attendance']) and |
|
253 | 253 | $extra_info['Lpublic_whip_division_attendance'] != 'n/a' ) |
254 | 254 | ) { |
255 | 255 | $record[] = '<a href="http://www.publicwhip.org.uk/mp.php?id=uk.org.publicwhip/member/' . |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | * @param int $limit The number of results to limit the output to. |
78 | 78 | */ |
79 | 79 | |
80 | - private function getMemberPolicyPositions ($limit = NULL) { |
|
80 | + private function getMemberPolicyPositions($limit = NULL) { |
|
81 | 81 | |
82 | 82 | // Make sure member info has actually been set. |
83 | 83 | if (count($this->member->extra_info) === 0) { |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | |
117 | 117 | // don't return votes where they haven't voted on a strong division |
118 | 118 | // if we're limiting the number of votes |
119 | - if ( $limit && !empty($dream_info) && !$dream_info['has_strong'] ) { |
|
119 | + if ($limit && !empty($dream_info) && !$dream_info['has_strong']) { |
|
120 | 120 | continue; |
121 | 121 | } |
122 | 122 | |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | $has_strong = 1; |
196 | 196 | } |
197 | 197 | $full_sentence = $consistency . ' ' . $policy_description; |
198 | - $out = array( 'full_sentence' => $full_sentence, 'score' => $dmpscore, 'position' => $consistency, 'has_strong' => $has_strong ); |
|
198 | + $out = array('full_sentence' => $full_sentence, 'score' => $dmpscore, 'position' => $consistency, 'has_strong' => $has_strong); |
|
199 | 199 | } |
200 | 200 | |
201 | 201 | return $out; |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | # If not current MP/Lord, but current MLA/MSP, need to say voting record is when MP |
227 | 227 | if (!$current_member[HOUSE_TYPE_COMMONS] AND |
228 | 228 | !$current_member[HOUSE_TYPE_LORDS] AND |
229 | - ( $current_member[HOUSE_TYPE_SCOTLAND] OR $current_member[HOUSE_TYPE_NI] ) |
|
229 | + ($current_member[HOUSE_TYPE_SCOTLAND] OR $current_member[HOUSE_TYPE_NI]) |
|
230 | 230 | ) { |
231 | 231 | $since .= ' whilst an MP'; |
232 | 232 | } |
@@ -247,11 +247,11 @@ discard block |
||
247 | 247 | '" title="At The Guardian">well-known issues</a> <small>(from the Guardian)</small>'; |
248 | 248 | } |
249 | 249 | if ( |
250 | - ( isset($extra_info['public_whip_division_attendance']) AND |
|
251 | - $extra_info['public_whip_division_attendance'] != 'n/a' ) |
|
250 | + (isset($extra_info['public_whip_division_attendance']) AND |
|
251 | + $extra_info['public_whip_division_attendance'] != 'n/a') |
|
252 | 252 | OR |
253 | - ( isset($extra_info['Lpublic_whip_division_attendance']) AND |
|
254 | - $extra_info['Lpublic_whip_division_attendance'] != 'n/a' ) |
|
253 | + (isset($extra_info['Lpublic_whip_division_attendance']) AND |
|
254 | + $extra_info['Lpublic_whip_division_attendance'] != 'n/a') |
|
255 | 255 | ) { |
256 | 256 | $record[] = '<a href="http://www.publicwhip.org.uk/mp.php?id=uk.org.publicwhip/member/' . |
257 | 257 | $this->member->member_id() . |
@@ -95,8 +95,7 @@ |
||
95 | 95 | $member_houses = $this->member->houses(); |
96 | 96 | |
97 | 97 | // Determine the policy limit. |
98 | - if ($limit !== NULL AND is_int($limit)) |
|
99 | - { |
|
98 | + if ($limit !== NULL AND is_int($limit)) { |
|
100 | 99 | $policy_limit = $limit; |
101 | 100 | } else { |
102 | 101 | $policy_limit = count($policies); |
@@ -53,7 +53,7 @@ |
||
53 | 53 | <text font-size="24" font-weight="normal" fill="#000000"> |
54 | 54 | <?php foreach ($lines as $j=>$line) { ?> |
55 | 55 | <tspan x="40" y="<?= $stance_y + $stance_padding_top + $stance_baseline_offset + ($stance_lineheight * $j) ?>"><?php |
56 | - if (strpos($line, '*') !== False) { |
|
56 | + if (strpos($line, '*') !== false) { |
|
57 | 57 | echo preg_replace( |
58 | 58 | '#(?:^|[*])([^\r\n *][^*\n]*[^\r\n *])(?:$|[*])#i', |
59 | 59 | $tspan_bold_open . '$1' . $tspan_bold_close, |
@@ -29,7 +29,7 @@ |
||
29 | 29 | |
30 | 30 | echo '<?xml version="1.0" encoding="utf-8"?>'; |
31 | 31 | |
32 | - ?> |
|
32 | + ?> |
|
33 | 33 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> |
34 | 34 | <svg width="1000" height="500" viewBox="0 0 1000 500" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" font-family="Droid Sans, Trebuchet"> |
35 | 35 |
@@ -3,7 +3,7 @@ |
||
3 | 3 | $stances = array(); |
4 | 4 | |
5 | 5 | foreach ($segment['votes']->positions as $key_vote) { |
6 | - if ( $key_vote['has_strong'] || $key_vote['position'] == 'has never voted on' ) { |
|
6 | + if ($key_vote['has_strong'] || $key_vote['position'] == 'has never voted on') { |
|
7 | 7 | $stance = strip_tags($key_vote['desc'], '<b>'); |
8 | 8 | $stance = ucfirst($stance); |
9 | 9 | $stance = preg_replace('#</?b[^>]*>#i', '*', $stance); |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | </div> |
34 | 34 | <?php endif; ?> |
35 | 35 | |
36 | - <?php $displayed_votes = FALSE; ?> |
|
36 | + <?php $displayed_votes = false; ?> |
|
37 | 37 | <?php if ( isset($policydivisions) && $policydivisions ) { ?> |
38 | 38 | |
39 | 39 | <?php if ($has_voting_record) { ?> |
@@ -86,14 +86,14 @@ discard block |
||
86 | 86 | |
87 | 87 | <ul class="vote-descriptions policy-votes"> |
88 | 88 | <?php |
89 | - $show_all = FALSE; |
|
89 | + $show_all = false; |
|
90 | 90 | if ( $policy['weak_count'] == 0 || $policy['weak_count'] == count($policy['divisions']) ) { |
91 | - $show_all = TRUE; |
|
91 | + $show_all = true; |
|
92 | 92 | } |
93 | 93 | ?> |
94 | 94 | <?php foreach ($policy['divisions'] as $division) { |
95 | 95 | include('_division_description.php'); |
96 | - $displayed_votes = TRUE; |
|
96 | + $displayed_votes = true; |
|
97 | 97 | } ?> |
98 | 98 | </ul> |
99 | 99 |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | </div> |
16 | 16 | <div class="person-panels"> |
17 | 17 | <div class="sidebar__unit in-page-nav"> |
18 | - <?php if ( isset($policydivisions) && $policydivisions && count($policydivisions) == 1 ) { ?> |
|
18 | + <?php if (isset($policydivisions) && $policydivisions && count($policydivisions) == 1) { ?> |
|
19 | 19 | <p class="policy-votes-intro"> |
20 | 20 | How <?= $full_name ?> voted on <?= $policydivisions[array_keys($policydivisions)[0]]['desc'] ?>. |
21 | 21 | </p> |
@@ -34,17 +34,17 @@ discard block |
||
34 | 34 | <?php endif; ?> |
35 | 35 | |
36 | 36 | <?php $displayed_votes = FALSE; ?> |
37 | - <?php if ( isset($policydivisions) && $policydivisions ) { ?> |
|
37 | + <?php if (isset($policydivisions) && $policydivisions) { ?> |
|
38 | 38 | |
39 | 39 | <?php if ($has_voting_record) { ?> |
40 | 40 | |
41 | 41 | <?php foreach ($policydivisions as $policy) { ?> |
42 | 42 | |
43 | - <?php if ( isset($policy['header']) ) { ?> |
|
43 | + <?php if (isset($policy['header'])) { ?> |
|
44 | 44 | <div class="panel policy-votes-hero" style="background-image: url('<?php echo $policy['header']['image']; ?>');"> |
45 | 45 | <h2><?php echo $policy['header']['title']; ?></h2> |
46 | 46 | <p><?php echo $policy['header']['description']; ?>.</p> |
47 | - <?php if ( $policy['header']['image_source'] ) { ?> |
|
47 | + <?php if ($policy['header']['image_source']) { ?> |
|
48 | 48 | <span class="policy-votes-hero__image-attribution"> |
49 | 49 | Photo: |
50 | 50 | <a href="<?php echo $policy['header']['image_source']; ?>"> |
@@ -59,9 +59,9 @@ discard block |
||
59 | 59 | <?php } ?> |
60 | 60 | |
61 | 61 | |
62 | - <?php if ( isset($policy['position']) ) { ?> |
|
62 | + <?php if (isset($policy['position'])) { ?> |
|
63 | 63 | <div class="panel"> |
64 | - <?php if ( $policy['position']['has_strong'] ) { ?> |
|
64 | + <?php if ($policy['position']['has_strong']) { ?> |
|
65 | 65 | <h3 class="policy-vote-overall-stance"> |
66 | 66 | <?= $full_name . ' ' . $policy['position']['desc'] ?> |
67 | 67 | </h3> |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | <ul class="vote-descriptions policy-votes"> |
88 | 88 | <?php |
89 | 89 | $show_all = FALSE; |
90 | - if ( $policy['weak_count'] == 0 || $policy['weak_count'] == count($policy['divisions']) ) { |
|
90 | + if ($policy['weak_count'] == 0 || $policy['weak_count'] == count($policy['divisions'])) { |
|
91 | 91 | $show_all = TRUE; |
92 | 92 | } |
93 | 93 | ?> |
@@ -99,14 +99,14 @@ discard block |
||
99 | 99 | |
100 | 100 | <div class="policy-votes-list-footer"> |
101 | 101 | <p class="policy-votes__byline">Vote information from <a href="http://www.publicwhip.org.uk/mp.php?mpid=<?= $member_id ?>&dmp=<?= $policy['policy_id'] ?>">PublicWhip</a>. Last updated: <?= $policy_last_update[$policy['policy_id']] ?></p> |
102 | - <?php if ( !$show_all && $policy['weak_count'] > 0 ) { ?> |
|
102 | + <?php if (!$show_all && $policy['weak_count'] > 0) { ?> |
|
103 | 103 | <p><button class="button secondary-button small js-show-all-votes">Show all votes, including <?= $policy['weak_count'] ?> less important <?= $policy['weak_count'] == 1 ? 'vote' : 'votes' ?></button></p> |
104 | 104 | <?php } ?> |
105 | 105 | </div> |
106 | 106 | |
107 | 107 | <script type="text/javascript"> |
108 | 108 | $(function(){ |
109 | - <?php if ( !$show_all ) { ?> |
|
109 | + <?php if (!$show_all) { ?> |
|
110 | 110 | $('#policy-votes-type').text('Key'); |
111 | 111 | <?php } ?> |
112 | 112 | $('.js-show-all-votes').on('click', function(){ |
@@ -24,7 +24,7 @@ |
||
24 | 24 | </form> |
25 | 25 | </div> |
26 | 26 | <!-- TheyWorkForYou box, end --> |
27 | -END; |
|
27 | +end; |
|
28 | 28 | print $link_to_us_form; |
29 | 29 | ?> |
30 | 30 |
@@ -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"> |
@@ -11,10 +11,10 @@ discard block |
||
11 | 11 | </div> |
12 | 12 | <div class="row"> |
13 | 13 | <div class="medium-9 columns"> |
14 | - <?php if ( count($data['regional']) > 0 ) { ?> |
|
14 | + <?php if (count($data['regional']) > 0) { ?> |
|
15 | 15 | <ul class="homepage-rep-list"> |
16 | 16 | <li>Your Regional MSPs:</li> |
17 | - <?php foreach ( $data['regional'] as $msp ) { ?> |
|
17 | + <?php foreach ($data['regional'] as $msp) { ?> |
|
18 | 18 | <li class="homepage-rep-list__rep"><a href="/msp/?p=<?= $msp['person_id'] ?>"><?= $msp['name'] ?></a></li> |
19 | 19 | <?php } ?> |
20 | 20 | </ul> |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | <div class="panel panel--flushtop clearfix"> |
58 | 58 | <div class="row nested-row"> |
59 | 59 | <div class="homepage-in-the-news homepage-content-section"> |
60 | - <?php if ( $featured ) { |
|
60 | + <?php if ($featured) { |
|
61 | 61 | include dirname(__FILE__) . "/../homepage/featured.php"; |
62 | 62 | } ?> |
63 | 63 | </div> |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | |
105 | 105 | <h2>Recently in Parliament</h2> |
106 | 106 | <ul class="recently__list"><?php |
107 | - foreach ( $debates['recent'] as $recent ) { |
|
107 | + foreach ($debates['recent'] as $recent) { |
|
108 | 108 | include dirname(__FILE__) . '/../homepage/recent-debates.php'; |
109 | 109 | } |
110 | 110 | ?></ul> |
@@ -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> |
@@ -186,7 +186,8 @@ |
||
186 | 186 | } # End of voting HTML |
187 | 187 | |
188 | 188 | // Video |
189 | - if ($data['info']['major'] == 1 && !$individual_item) { # Commons debates only |
|
189 | + if ($data['info']['major'] == 1 && !$individual_item) { |
|
190 | +# Commons debates only |
|
190 | 191 | if ($speech['video_status']&4) { ?> |
191 | 192 | <a href="<?= $speech['commentsurl'] ?>" class="watch debate-speech__meta__link" onclick="return moveVideo(\'debate/'<?= $speech['gid'] ?>\');">Watch this</a> |
192 | 193 | <?php |
@@ -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,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -foreach($data['rows'] as $speech) { ?> |
|
3 | +foreach ($data['rows'] as $speech) { ?> |
|
4 | 4 | |
5 | 5 | <?php |
6 | 6 | |
@@ -63,27 +63,27 @@ discard block |
||
63 | 63 | $source = array(); |
64 | 64 | |
65 | 65 | $major = $data['info']['major']; |
66 | - if ($major==1 || $major==2 || (($major==3 || $major==4) && isset($speech['speaker']['house'])) || $major==101 || $major==6) { |
|
66 | + if ($major == 1 || $major == 2 || (($major == 3 || $major == 4) && isset($speech['speaker']['house'])) || $major == 101 || $major == 6) { |
|
67 | 67 | $source['title'] = 'Citation: '; |
68 | - if ($major==1 || $major==2) { |
|
68 | + if ($major == 1 || $major == 2) { |
|
69 | 69 | $source['title'] .= 'HC'; |
70 | - } elseif ($major==3 || $major==4) { |
|
71 | - if ($speech['speaker']['house']==1) { |
|
70 | + } elseif ($major == 3 || $major == 4) { |
|
71 | + if ($speech['speaker']['house'] == 1) { |
|
72 | 72 | $source['title'] .= 'HC'; |
73 | 73 | } else { |
74 | 74 | $source['title'] .= 'HL'; |
75 | 75 | } |
76 | - } elseif ($major==6) { |
|
76 | + } elseif ($major == 6) { |
|
77 | 77 | $source['title'] .= $data['section_title']; |
78 | 78 | } else { |
79 | 79 | $source['title'] .= 'HL'; |
80 | 80 | } |
81 | 81 | $source['title'] .= ' Deb, ' . format_date($data['info']['date'], LONGDATEFORMAT) . ', c' . $speech['colnum']; |
82 | - if ($major==2) { |
|
82 | + if ($major == 2) { |
|
83 | 83 | $source['title'] .= 'WH'; |
84 | - } elseif ($major==3) { |
|
84 | + } elseif ($major == 3) { |
|
85 | 85 | $source['title'] .= 'W'; |
86 | - } elseif ($major==4) { |
|
86 | + } elseif ($major == 4) { |
|
87 | 87 | $source['title'] .= 'WS'; |
88 | 88 | } |
89 | 89 | } |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | <div class="debate-speech__speaker-and-content"> |
113 | 113 | <?php } ?> |
114 | 114 | |
115 | - <?php if(isset($speech['speaker']) && count($speech['speaker']) > 0) { ?> |
|
115 | + <?php if (isset($speech['speaker']) && count($speech['speaker']) > 0) { ?> |
|
116 | 116 | <h2 class="debate-speech__speaker"> |
117 | 117 | <?php |
118 | 118 | |
@@ -179,17 +179,17 @@ discard block |
||
179 | 179 | <?php if ($division['has_description']) { ?> |
180 | 180 | <div class="debate-speech__division__details"> |
181 | 181 | <span class="policy-vote__text"> |
182 | - <?php include( dirname(__FILE__) . '/../divisions/_vote_description.php'); ?> |
|
182 | + <?php include(dirname(__FILE__) . '/../divisions/_vote_description.php'); ?> |
|
183 | 183 | </span><br> |
184 | 184 | </div> |
185 | 185 | <?php } ?> |
186 | 186 | |
187 | 187 | <?php if (isset($speech['mp_vote'])) { |
188 | - $mp_vote = array( 'vote' => $speech['mp_vote']['vote'] ); |
|
189 | - if ( isset($speech['before_mp']) ) { |
|
188 | + $mp_vote = array('vote' => $speech['mp_vote']['vote']); |
|
189 | + if (isset($speech['before_mp'])) { |
|
190 | 190 | $before_mp = $speech['before_mp']; |
191 | 191 | } |
192 | - if ( isset($speech['after_mp']) ) { |
|
192 | + if (isset($speech['after_mp'])) { |
|
193 | 193 | $after_mp = $speech['after_mp']; |
194 | 194 | } |
195 | 195 | include dirname(__FILE__) . '/../divisions/_your_mp.php'; |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | <div class="debate-speech__content"><?=$body ?></div> |
202 | 202 | <?php } ?> |
203 | 203 | |
204 | - <?php if ( $section ) { |
|
204 | + <?php if ($section) { |
|
205 | 205 | if ($speech['voting_data']) { ?> |
206 | 206 | |
207 | 207 | <div class="debate-speech__question-answered"> |
@@ -226,10 +226,10 @@ discard block |
||
226 | 226 | |
227 | 227 | // Video |
228 | 228 | if ($data['info']['major'] == 1 && !$individual_item) { # Commons debates only |
229 | - if ($speech['video_status']&4) { ?> |
|
229 | + if ($speech['video_status'] & 4) { ?> |
|
230 | 230 | <a href="<?= $speech['commentsurl'] ?>" class="watch debate-speech__meta__link" onclick="return moveVideo(\'debate/'<?= $speech['gid'] ?>\');">Watch this</a> |
231 | 231 | <?php |
232 | - } elseif (!$speech['video'] && $speech['video_status']&1 && !($speech['video_status']&8)) { |
|
232 | + } elseif (!$speech['video'] && $speech['video_status'] & 1 && !($speech['video_status'] & 8)) { |
|
233 | 233 | $gid_type = $data['info']['major'] == 1 ? 'debate' : 'lords'; ?> |
234 | 234 | <a href="/video/?from=debate&gid=<?= $gid_type ?>/<?= $speech['gid'] ?>" class="timestamp debate-speech__meta__link">Video match this</a> |
235 | 235 | <?php |
@@ -359,7 +359,7 @@ discard block |
||
359 | 359 | $moreinfo[] = $row['totalcomments'] . " $plural"; |
360 | 360 | } |
361 | 361 | if (count($moreinfo) > 0) { |
362 | - print "<small>(" . implode (', ', $moreinfo) . ") </small>"; |
|
362 | + print "<small>(" . implode(', ', $moreinfo) . ") </small>"; |
|
363 | 363 | } |
364 | 364 | } else { |
365 | 365 | // Nothing in this item, so no link. |
@@ -1,4 +1,4 @@ |
||
1 | 1 | <div class="full-page__row"> |
2 | 2 | <?php include '_business_section.php'; ?> |
3 | - <?php $search_title = "Search $title"; include '_search.php'; ?> |
|
3 | + <?php $search_title = "search $title"; include '_search.php'; ?> |
|
4 | 4 | </div> |
@@ -25,7 +25,7 @@ |
||
25 | 25 | $row = $data['rows'][$i]; |
26 | 26 | |
27 | 27 | $hdate = format_date($row['hdate'], 'D, d M Y'); |
28 | - if (isset($row['htime']) && $row['htime'] != NULL) { |
|
28 | + if (isset($row['htime']) && $row['htime'] != null) { |
|
29 | 29 | $htime = format_time($row['htime'], 'H:i:s'); |
30 | 30 | } else { |
31 | 31 | $htime = '00:00:00'; |
@@ -21,7 +21,7 @@ |
||
21 | 21 | twfy_debug("TEMPLATE", "rss/hansard_search.php"); |
22 | 22 | |
23 | 23 | if (isset ($data['rows']) && count($data['rows']) > 0) { |
24 | - for ($i=0; $i<count($data['rows']); $i++) { |
|
24 | + for ($i = 0; $i < count($data['rows']); $i++) { |
|
25 | 25 | $row = $data['rows'][$i]; |
26 | 26 | |
27 | 27 | $hdate = format_date($row['hdate'], 'D, d M Y'); |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | public $body = ''; |
32 | 32 | public $posted = ''; |
33 | 33 | public $visible = false; |
34 | - public $modflagged = NULL; // Is a datetime when set. |
|
34 | + public $modflagged = null; // Is a datetime when set. |
|
35 | 35 | public $firstname = ''; // Of the person who posted it. |
36 | 36 | public $lastname = ''; |
37 | 37 | public $url = ''; |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | $flag = "'$date'"; |
139 | 139 | |
140 | 140 | } elseif ($switch == 'off') { |
141 | - $date = NULL; |
|
141 | + $date = null; |
|
142 | 142 | $flag = 'NULL'; |
143 | 143 | |
144 | 144 | } else { |
@@ -210,8 +210,8 @@ |
||
210 | 210 | array(':epobject_id' => $this->epobject_id))->first(); |
211 | 211 | |
212 | 212 | if ($q) { |
213 | - // If you change stuff here, you might have to change it in |
|
214 | - // $COMMENTLIST->_get_comment_data() too... |
|
213 | + // If you change stuff here, you might have to change it in |
|
214 | + // $COMMENTLIST->_get_comment_data() too... |
|
215 | 215 | |
216 | 216 | $gid = fix_gid_from_db($q['gid']); // In includes/utility.php |
217 | 217 |
@@ -31,8 +31,8 @@ discard block |
||
31 | 31 | public $body = ''; |
32 | 32 | public $posted = ''; |
33 | 33 | public $visible = false; |
34 | - public $modflagged = NULL; // Is a datetime when set. |
|
35 | - public $firstname = ''; // Of the person who posted it. |
|
34 | + public $modflagged = NULL; // Is a datetime when set. |
|
35 | + public $firstname = ''; // Of the person who posted it. |
|
36 | 36 | public $lastname = ''; |
37 | 37 | public $url = ''; |
38 | 38 | |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | public $exists = false; |
42 | 42 | |
43 | 43 | |
44 | - public function __construct($comment_id='') { |
|
44 | + public function __construct($comment_id = '') { |
|
45 | 45 | |
46 | 46 | $this->db = new ParlDB; |
47 | 47 | |
@@ -69,12 +69,12 @@ discard block |
||
69 | 69 | if ($q) { |
70 | 70 | |
71 | 71 | $this->comment_id = $comment_id; |
72 | - $this->user_id = $q['user_id']; |
|
72 | + $this->user_id = $q['user_id']; |
|
73 | 73 | $this->epobject_id = $q['epobject_id']; |
74 | - $this->body = $q['body']; |
|
75 | - $this->posted = $q['posted']; |
|
76 | - $this->visible = $q['visible']; |
|
77 | - $this->modflagged = $q['modflagged']; |
|
74 | + $this->body = $q['body']; |
|
75 | + $this->posted = $q['posted']; |
|
76 | + $this->visible = $q['visible']; |
|
77 | + $this->modflagged = $q['modflagged']; |
|
78 | 78 | |
79 | 79 | // Sets the URL and username for this comment. Duh. |
80 | 80 | $this->_set_url(); |
@@ -104,9 +104,9 @@ discard block |
||
104 | 104 | public function comments_enabled() { return $this->comments_enabled; } |
105 | 105 | |
106 | 106 | |
107 | - public function display($format='html', $template='comments') { |
|
107 | + public function display($format = 'html', $template = 'comments') { |
|
108 | 108 | |
109 | - $data['comments'][0] = array ( |
|
109 | + $data['comments'][0] = array( |
|
110 | 110 | 'comment_id' => $this->comment_id, |
111 | 111 | 'user_id' => $this->user_id, |
112 | 112 | 'epobject_id' => $this->epobject_id, |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | $flag = 'NULL'; |
143 | 143 | |
144 | 144 | } else { |
145 | - $PAGE->error_message ("Why are you trying to switch this comment's modflag to '" . _htmlentities($switch) . "'!"); |
|
145 | + $PAGE->error_message("Why are you trying to switch this comment's modflag to '" . _htmlentities($switch) . "'!"); |
|
146 | 146 | } |
147 | 147 | |
148 | 148 | $q = $this->db->query("UPDATE comments |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | $this->modflagged = $date; |
155 | 155 | return true; |
156 | 156 | } else { |
157 | - $message = array ( |
|
157 | + $message = array( |
|
158 | 158 | 'title' => 'Sorry', |
159 | 159 | 'text' => "We couldn't update the annotation's modflag." |
160 | 160 | ); |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | if ($q->success()) { |
177 | 177 | return true; |
178 | 178 | } else { |
179 | - $message = array ( |
|
179 | + $message = array( |
|
180 | 180 | 'title' => 'Sorry', |
181 | 181 | 'text' => "We were unable to delete the annotation." |
182 | 182 | ); |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | } |
186 | 186 | |
187 | 187 | } else { |
188 | - $message = array ( |
|
188 | + $message = array( |
|
189 | 189 | 'title' => 'Sorry', |
190 | 190 | 'text' => "You are not authorised to delete annotations." |
191 | 191 | ); |