@@ -13,15 +13,15 @@ discard block |
||
13 | 13 | <?php if ($error == 'No results' && isset($house) && $house != HOUSE_TYPE_ROYAL) { ?> |
14 | 14 | <ul class="search-result-display-options"> |
15 | 15 | <li> |
16 | - <?php if ($house == HOUSE_TYPE_COMMONS) { ?> |
|
16 | + <?php if ($house == HOUSE_TYPE_COMMONS) { ?> |
|
17 | 17 | No results for MPs only |
18 | - <?php } elseif ($house == HOUSE_TYPE_LORDS) { ?> |
|
18 | + <?php } elseif ($house == HOUSE_TYPE_LORDS) { ?> |
|
19 | 19 | No results for Peers only |
20 | 20 | <?php } elseif ($house == HOUSE_TYPE_SCOTLAND) { ?> |
21 | 21 | No results for MSPs only |
22 | 22 | <?php } elseif ($house == HOUSE_TYPE_WALES) { ?> |
23 | 23 | <?= gettext('No results for MSs only') ?> |
24 | - <?php } elseif ($house == HOUSE_TYPE_NI) { ?> |
|
24 | + <?php } elseif ($house == HOUSE_TYPE_NI) { ?> |
|
25 | 25 | No results for MLAs only |
26 | 26 | <?php } ?> |
27 | 27 | | |
@@ -47,37 +47,37 @@ discard block |
||
47 | 47 | <ul class="search-result-display-options"> |
48 | 48 | <li><?= gettext('Results grouped by person') ?></li> |
49 | 49 | <li> |
50 | - <?php if ($house == HOUSE_TYPE_ROYAL) { ?> |
|
50 | + <?php if ($house == HOUSE_TYPE_ROYAL) { ?> |
|
51 | 51 | <?= gettext('Show All') ?> |
52 | 52 | <?php } else { ?> |
53 | 53 | <a href="<?= $this_url->generate('html') ?>"><?= gettext('Show All') ?></a> |
54 | 54 | <?php } ?> |
55 | 55 | | |
56 | - <?php if ($house == HOUSE_TYPE_COMMONS) { ?> |
|
56 | + <?php if ($house == HOUSE_TYPE_COMMONS) { ?> |
|
57 | 57 | MPs only |
58 | 58 | <?php } else { ?> |
59 | 59 | <a href="<?= $this_url->generate('html', ['house' => 1]) ?>">MPs only</a> |
60 | 60 | <?php } ?> |
61 | 61 | | |
62 | - <?php if ($house == HOUSE_TYPE_LORDS) { ?> |
|
62 | + <?php if ($house == HOUSE_TYPE_LORDS) { ?> |
|
63 | 63 | Peers only |
64 | 64 | <?php } else { ?> |
65 | 65 | <a href="<?= $this_url->generate('html', ['house' => 2]) ?>">Lords only</a> |
66 | 66 | <?php } ?> |
67 | 67 | | |
68 | - <?php if ($house == HOUSE_TYPE_SCOTLAND) { ?> |
|
68 | + <?php if ($house == HOUSE_TYPE_SCOTLAND) { ?> |
|
69 | 69 | MSPs only |
70 | 70 | <?php } else { ?> |
71 | 71 | <a href="<?= $this_url->generate('html', ['house' => 4]) ?>">MSPs only</a> |
72 | 72 | <?php } ?> |
73 | 73 | | |
74 | - <?php if ($house == HOUSE_TYPE_WALES) { ?> |
|
74 | + <?php if ($house == HOUSE_TYPE_WALES) { ?> |
|
75 | 75 | <?= gettext('MSs only') ?> |
76 | 76 | <?php } else { ?> |
77 | 77 | <a href="<?= $this_url->generate('html', ['house' => 5]) ?>"><?= gettext('MSs only') ?></a> |
78 | 78 | <?php } ?> |
79 | 79 | | |
80 | - <?php if ($house == HOUSE_TYPE_NI) { ?> |
|
80 | + <?php if ($house == HOUSE_TYPE_NI) { ?> |
|
81 | 81 | MLAs only |
82 | 82 | <?php } else { ?> |
83 | 83 | <a href="<?= $this_url->generate('html', ['house' => HOUSE_TYPE_NI]) ?>">MLAs only</a> |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | <?php if (isset($speaker['party'])) { ?> |
119 | 119 | <span class="search-results-grouped__speaker-party">(<?= $speaker['party'] ?>)</span> |
120 | 120 | <?php } ?> |
121 | - <?php if ($house != HOUSE_TYPE_LORDS) { ?> |
|
121 | + <?php if ($house != HOUSE_TYPE_LORDS) { ?> |
|
122 | 122 | <?= isset($speaker['office']) ? ' - ' . join('; ', $speaker['office']) : '' ?> |
123 | 123 | <?php } ?> |
124 | 124 | <?php } else { // no $pid?> |
@@ -121,7 +121,8 @@ |
||
121 | 121 | <?php if ($house != HOUSE_TYPE_LORDS) { ?> |
122 | 122 | <?= isset($speaker['office']) ? ' - ' . join('; ', $speaker['office']) : '' ?> |
123 | 123 | <?php } ?> |
124 | - <?php } else { // no $pid?> |
|
124 | + <?php } else { |
|
125 | +// no $pid?> |
|
125 | 126 | <?= $speaker['name'] ?> |
126 | 127 | <?php } ?> |
127 | 128 | </td> |
@@ -1,43 +1,43 @@ discard block |
||
1 | 1 | <div class="calendar"> |
2 | 2 | <?php if(isset($month)) { |
3 | - // What is the first day of the month in question? |
|
4 | - $firstDayOfMonth = mktime(0, 0, 0, $month, 1, $year); |
|
5 | - |
|
6 | - // How many days does this month contain? |
|
7 | - $numberDays = date('t', $firstDayOfMonth); |
|
8 | - |
|
9 | - // What is the name of the month in question? |
|
10 | - $monthName = strftime('%B', $firstDayOfMonth); |
|
11 | - |
|
12 | - if (isset($info['onday'])) { |
|
13 | - // 'onday' is like 'yyyy-mm-dd'. |
|
14 | - $datebits = explode('-', $info['onday']); |
|
15 | - if (count($datebits) > 2 && $datebits[0] == $year && $datebits[1] == $month) { |
|
16 | - $toDay = $datebits[2]; |
|
17 | - } else { |
|
18 | - $toDay = ''; |
|
19 | - } |
|
20 | - } else { |
|
21 | - // If this calendar is for this current, real world, month |
|
22 | - // we get the value of today, so we can highlight it. |
|
23 | - $nowDateComponents = getdate(); |
|
24 | - |
|
25 | - if ($nowDateComponents['year'] == $year && $nowDateComponents['mon'] == $month) { |
|
26 | - $toDay = $nowDateComponents['mday']; |
|
27 | - } else { |
|
28 | - $toDay = ''; |
|
29 | - } |
|
30 | - } |
|
31 | - |
|
32 | - $dayOfWeek = strftime('%w', $firstDayOfMonth) - 1; |
|
33 | - |
|
34 | - // Adjusted to cope with the week starting on Monday. |
|
35 | - if ($dayOfWeek < 0) { |
|
36 | - $dayOfWeek = 6; |
|
37 | - } |
|
38 | - ?> |
|
3 | + // What is the first day of the month in question? |
|
4 | + $firstDayOfMonth = mktime(0, 0, 0, $month, 1, $year); |
|
5 | + |
|
6 | + // How many days does this month contain? |
|
7 | + $numberDays = date('t', $firstDayOfMonth); |
|
8 | + |
|
9 | + // What is the name of the month in question? |
|
10 | + $monthName = strftime('%B', $firstDayOfMonth); |
|
11 | + |
|
12 | + if (isset($info['onday'])) { |
|
13 | + // 'onday' is like 'yyyy-mm-dd'. |
|
14 | + $datebits = explode('-', $info['onday']); |
|
15 | + if (count($datebits) > 2 && $datebits[0] == $year && $datebits[1] == $month) { |
|
16 | + $toDay = $datebits[2]; |
|
17 | + } else { |
|
18 | + $toDay = ''; |
|
19 | + } |
|
20 | + } else { |
|
21 | + // If this calendar is for this current, real world, month |
|
22 | + // we get the value of today, so we can highlight it. |
|
23 | + $nowDateComponents = getdate(); |
|
24 | + |
|
25 | + if ($nowDateComponents['year'] == $year && $nowDateComponents['mon'] == $month) { |
|
26 | + $toDay = $nowDateComponents['mday']; |
|
27 | + } else { |
|
28 | + $toDay = ''; |
|
29 | + } |
|
30 | + } |
|
31 | + |
|
32 | + $dayOfWeek = strftime('%w', $firstDayOfMonth) - 1; |
|
33 | + |
|
34 | + // Adjusted to cope with the week starting on Monday. |
|
35 | + if ($dayOfWeek < 0) { |
|
36 | + $dayOfWeek = 6; |
|
37 | + } |
|
38 | + ?> |
|
39 | 39 | <?php } |
40 | - if (!isset($years)) { ?> |
|
40 | + if (!isset($years)) { ?> |
|
41 | 41 | <div class="calendar__controls"> |
42 | 42 | <?php if (isset($prev)) { ?> |
43 | 43 | <a href="<?= $prev['url'] ?>" class="calendar__controls__previous">←</a> |
@@ -75,93 +75,93 @@ discard block |
||
75 | 75 | <tr> |
76 | 76 | |
77 | 77 | <?php |
78 | - if ($dayOfWeek > 0) { |
|
79 | - print "<td colspan=\"$dayOfWeek\"> </td>"; |
|
80 | - } |
|
78 | + if ($dayOfWeek > 0) { |
|
79 | + print "<td colspan=\"$dayOfWeek\"> </td>"; |
|
80 | + } |
|
81 | 81 | |
82 | - $currentDay = 1; |
|
82 | + $currentDay = 1; |
|
83 | 83 | |
84 | - while ($currentDay <= $numberDays) { |
|
84 | + while ($currentDay <= $numberDays) { |
|
85 | 85 | |
86 | - // Seventh column (Sunday) reached. Start a new row. |
|
86 | + // Seventh column (Sunday) reached. Start a new row. |
|
87 | 87 | |
88 | - if ($dayOfWeek == 7) { |
|
88 | + if ($dayOfWeek == 7) { |
|
89 | 89 | |
90 | - $dayOfWeek = 0; |
|
91 | - ?></tr> |
|
90 | + $dayOfWeek = 0; |
|
91 | + ?></tr> |
|
92 | 92 | <tr><?php |
93 | - } |
|
94 | - |
|
95 | - $recess = recess_prettify($currentDay, $month, $year, $recess_major); |
|
96 | - |
|
97 | - // Is this day actually Today in the real world? |
|
98 | - // If so, higlight it. |
|
99 | - // Also highlight days where there are no |
|
100 | - // sittings - e.g. WH is only Tuesday-Thursday |
|
101 | - if ($currentDay == $toDay) { |
|
102 | - print '<td class="on"'; |
|
103 | - if ($recess[0] && $recess[0] != 1) { |
|
104 | - print ' title="' . $recess[0] . '"'; |
|
105 | - } |
|
106 | - print '>'; |
|
107 | - } elseif ($recess[0]) { |
|
108 | - print '<td class="no"'; |
|
109 | - if ($recess[0] != 1) { |
|
110 | - print ' title="' . $recess[0] . '"'; |
|
111 | - } |
|
112 | - print '>'; |
|
113 | - } else { |
|
114 | - print '<td>'; |
|
115 | - } |
|
116 | - |
|
117 | - // Is the $currentDay a member of $dates? If so, |
|
118 | - // the day should be linked. |
|
119 | - if (in_array($currentDay, $dates)) { |
|
120 | - |
|
121 | - $date = sprintf("%04d-%02d-%02d", $year, $month, $currentDay); |
|
122 | - |
|
123 | - if ($currentDay == $toDay) { |
|
124 | - print '<span>' . $currentDay . '</span></td>'; |
|
125 | - } else { |
|
126 | - $day_section = $section; |
|
127 | - if ($section == 'sp') { |
|
128 | - $day_section = 'spdebates'; |
|
129 | - } |
|
130 | - $urls[$day_section . 'day']->insert(['d' => $date]); |
|
131 | - print "<a href=\"" . $urls[$day_section . 'day']->generate() . "\">$currentDay</a></td>"; |
|
132 | - } |
|
133 | - |
|
134 | - // $currentDay is not a member of $dates. |
|
135 | - |
|
136 | - } else { |
|
137 | - |
|
138 | - print '<span>' . $currentDay . '</span></td>'; |
|
139 | - } |
|
140 | - // Increment counters |
|
141 | - |
|
142 | - $currentDay++; |
|
143 | - $dayOfWeek++; |
|
144 | - } |
|
145 | - |
|
146 | - // Complete the row of the last week in month, if necessary |
|
147 | - |
|
148 | - if ($dayOfWeek != 7) { |
|
149 | - |
|
150 | - $remainingDays = 7 - $dayOfWeek; |
|
151 | - print "<td colspan=\"$remainingDays\"> </td>"; |
|
152 | - } |
|
153 | - ?> |
|
93 | + } |
|
94 | + |
|
95 | + $recess = recess_prettify($currentDay, $month, $year, $recess_major); |
|
96 | + |
|
97 | + // Is this day actually Today in the real world? |
|
98 | + // If so, higlight it. |
|
99 | + // Also highlight days where there are no |
|
100 | + // sittings - e.g. WH is only Tuesday-Thursday |
|
101 | + if ($currentDay == $toDay) { |
|
102 | + print '<td class="on"'; |
|
103 | + if ($recess[0] && $recess[0] != 1) { |
|
104 | + print ' title="' . $recess[0] . '"'; |
|
105 | + } |
|
106 | + print '>'; |
|
107 | + } elseif ($recess[0]) { |
|
108 | + print '<td class="no"'; |
|
109 | + if ($recess[0] != 1) { |
|
110 | + print ' title="' . $recess[0] . '"'; |
|
111 | + } |
|
112 | + print '>'; |
|
113 | + } else { |
|
114 | + print '<td>'; |
|
115 | + } |
|
116 | + |
|
117 | + // Is the $currentDay a member of $dates? If so, |
|
118 | + // the day should be linked. |
|
119 | + if (in_array($currentDay, $dates)) { |
|
120 | + |
|
121 | + $date = sprintf("%04d-%02d-%02d", $year, $month, $currentDay); |
|
122 | + |
|
123 | + if ($currentDay == $toDay) { |
|
124 | + print '<span>' . $currentDay . '</span></td>'; |
|
125 | + } else { |
|
126 | + $day_section = $section; |
|
127 | + if ($section == 'sp') { |
|
128 | + $day_section = 'spdebates'; |
|
129 | + } |
|
130 | + $urls[$day_section . 'day']->insert(['d' => $date]); |
|
131 | + print "<a href=\"" . $urls[$day_section . 'day']->generate() . "\">$currentDay</a></td>"; |
|
132 | + } |
|
133 | + |
|
134 | + // $currentDay is not a member of $dates. |
|
135 | + |
|
136 | + } else { |
|
137 | + |
|
138 | + print '<span>' . $currentDay . '</span></td>'; |
|
139 | + } |
|
140 | + // Increment counters |
|
141 | + |
|
142 | + $currentDay++; |
|
143 | + $dayOfWeek++; |
|
144 | + } |
|
145 | + |
|
146 | + // Complete the row of the last week in month, if necessary |
|
147 | + |
|
148 | + if ($dayOfWeek != 7) { |
|
149 | + |
|
150 | + $remainingDays = 7 - $dayOfWeek; |
|
151 | + print "<td colspan=\"$remainingDays\"> </td>"; |
|
152 | + } |
|
153 | + ?> |
|
154 | 154 | </tr> |
155 | 155 | </tbody> |
156 | 156 | </table> |
157 | 157 | <?php if(!isset($years)) { ?> |
158 | 158 | <div class="calendar__footer"> |
159 | 159 | <?php |
160 | - $y = $urls['day']; |
|
161 | - $y->reset(); |
|
162 | - $y->insert([ 'y' => $year ]); |
|
163 | - $url = $y->generate(); |
|
164 | - ?> |
|
160 | + $y = $urls['day']; |
|
161 | + $y->reset(); |
|
162 | + $y->insert([ 'y' => $year ]); |
|
163 | + $url = $y->generate(); |
|
164 | + ?> |
|
165 | 165 | <a href="<?= $url ?>"><?= sprintf(gettext('See all of %s'), $year) ?></a> |
166 | 166 | </div> |
167 | 167 | <?php } ?> |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <div class="calendar"> |
2 | - <?php if(isset($month)) { |
|
2 | + <?php if (isset($month)) { |
|
3 | 3 | // What is the first day of the month in question? |
4 | 4 | $firstDayOfMonth = mktime(0, 0, 0, $month, 1, $year); |
5 | 5 | |
@@ -154,12 +154,12 @@ discard block |
||
154 | 154 | </tr> |
155 | 155 | </tbody> |
156 | 156 | </table> |
157 | - <?php if(!isset($years)) { ?> |
|
157 | + <?php if (!isset($years)) { ?> |
|
158 | 158 | <div class="calendar__footer"> |
159 | 159 | <?php |
160 | 160 | $y = $urls['day']; |
161 | 161 | $y->reset(); |
162 | - $y->insert([ 'y' => $year ]); |
|
162 | + $y->insert(['y' => $year]); |
|
163 | 163 | $url = $y->generate(); |
164 | 164 | ?> |
165 | 165 | <a href="<?= $url ?>"><?= sprintf(gettext('See all of %s'), $year) ?></a> |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | <ul class="business-list"> |
15 | 15 | <?php |
16 | 16 | $prevlevel = ''; |
17 | - foreach ($rows as $row) { ?> |
|
17 | + foreach ($rows as $row) { ?> |
|
18 | 18 | <?php if ($row['htype'] == 10) { |
19 | 19 | if ($prevlevel == 'sub') { ?> |
20 | 20 | </ul> |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | <?php } ?> |
50 | 50 | </a> |
51 | 51 | <?php } |
52 | - if (isset($row['excerpt'])) { ?> |
|
52 | + if (isset($row['excerpt'])) { ?> |
|
53 | 53 | <p class="business-list__excerpt"> |
54 | 54 | <?= trim_characters($row['excerpt'], 0, 200) ?> |
55 | 55 | </p> |
@@ -32,9 +32,9 @@ |
||
32 | 32 | </div> |
33 | 33 | </div> |
34 | 34 | <?php } else { |
35 | - $section = false; |
|
36 | - include '_section_content.php'; |
|
37 | - } ?> |
|
35 | + $section = false; |
|
36 | + include '_section_content.php'; |
|
37 | + } ?> |
|
38 | 38 | |
39 | 39 | </div> |
40 | 40 |
@@ -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 | |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | $body = preg_replace('# (S\d[O0WF]-\d+)[, ]#', ' <a href="/spwrans/?spid=$1">$1</a> ', $body); |
16 | 16 | $body = preg_replace_callback( |
17 | 17 | '#<citation id="uk\.org\.publicwhip/(.*?)/(.*?)">\[(.*?)\]</citation>#', |
18 | - function ($matches) { |
|
18 | + function($matches) { |
|
19 | 19 | if ($matches[1] == 'spor') { |
20 | 20 | $href_segment = 'sp/?g'; |
21 | 21 | } elseif ($matches[1] == 'spwa') { |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | <div class="debate-speech__speaker-and-content"> |
120 | 120 | <?php } ?> |
121 | 121 | |
122 | - <?php if(isset($speech['speaker']) && count($speech['speaker']) > 0) { ?> |
|
122 | + <?php if (isset($speech['speaker']) && count($speech['speaker']) > 0) { ?> |
|
123 | 123 | <h2 class="debate-speech__speaker"> |
124 | 124 | <?php |
125 | 125 | |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | <?php } ?> |
194 | 194 | |
195 | 195 | <?php if (isset($speech['mp_vote'])) { |
196 | - $mp_vote = [ 'vote' => $speech['mp_vote']['vote'] ]; |
|
196 | + $mp_vote = ['vote' => $speech['mp_vote']['vote']]; |
|
197 | 197 | if (isset($speech['before_mp'])) { |
198 | 198 | $before_mp = $speech['before_mp']; |
199 | 199 | } |
@@ -167,7 +167,7 @@ |
||
167 | 167 | <?php # XXX |
168 | 168 | if ($data['info']['major'] == 8 && preg_match('#\d{4}-\d\d-\d\d\.(.*?)\.q#', $speech['gid'], $m)) { |
169 | 169 | ?><p class="debate-speech__question_id"><small> |
170 | - <?= "Question $m[1]" ?> |
|
170 | + <?= "question $m[1]" ?> |
|
171 | 171 | </small></p> |
172 | 172 | <?php } ?> |
173 | 173 |
@@ -124,32 +124,32 @@ discard block |
||
124 | 124 | <?php |
125 | 125 | |
126 | 126 | $speaker = $speech['speaker']; |
127 | - $speaker_name = ucfirst($speaker['name']); |
|
128 | - |
|
129 | - [$image_url, $size] = MySociety\TheyWorkForYou\Utility\Member::findMemberImage( |
|
130 | - $speaker['person_id'], |
|
131 | - true, |
|
132 | - $data['info']['major'] == 101 ? 'lord' : 'general' |
|
133 | - ); |
|
134 | - |
|
135 | - if (count($speaker['office'])) { |
|
136 | - $desc = []; |
|
137 | - foreach ($speaker['office'] as $off) { |
|
138 | - $desc[] = $off['pretty']; |
|
139 | - } |
|
140 | - $speaker_position = join(', ', $desc); |
|
141 | - } else { |
|
142 | - $speaker_position = _htmlentities($speaker['party']); |
|
143 | - if ($speaker['house'] == 1 && |
|
127 | + $speaker_name = ucfirst($speaker['name']); |
|
128 | + |
|
129 | + [$image_url, $size] = MySociety\TheyWorkForYou\Utility\Member::findMemberImage( |
|
130 | + $speaker['person_id'], |
|
131 | + true, |
|
132 | + $data['info']['major'] == 101 ? 'lord' : 'general' |
|
133 | + ); |
|
134 | + |
|
135 | + if (count($speaker['office'])) { |
|
136 | + $desc = []; |
|
137 | + foreach ($speaker['office'] as $off) { |
|
138 | + $desc[] = $off['pretty']; |
|
139 | + } |
|
140 | + $speaker_position = join(', ', $desc); |
|
141 | + } else { |
|
142 | + $speaker_position = _htmlentities($speaker['party']); |
|
143 | + if ($speaker['house'] == 1 && |
|
144 | 144 | $speaker['party'] != 'Speaker' && |
145 | 145 | $speaker['party'] != 'Deputy Speaker' && |
146 | 146 | $speaker['constituency'] |
147 | - ) { |
|
148 | - $speaker_position .= ', ' . $speaker['constituency']; |
|
149 | - } |
|
150 | - } |
|
147 | + ) { |
|
148 | + $speaker_position .= ', ' . $speaker['constituency']; |
|
149 | + } |
|
150 | + } |
|
151 | 151 | |
152 | - ?> |
|
152 | + ?> |
|
153 | 153 | <a href="<?= $speech['speaker']['url'] ?>"> |
154 | 154 | <img src="<?= $image_url ?>" alt="Photo of <?= $speaker_name ?>"> |
155 | 155 | <strong class="debate-speech__speaker__name"><?= $speaker_name ?></strong> |
@@ -165,8 +165,8 @@ discard block |
||
165 | 165 | <?php } ?> |
166 | 166 | |
167 | 167 | <?php # XXX |
168 | - if ($data['info']['major'] == 8 && preg_match('#\d{4}-\d\d-\d\d\.(.*?)\.q#', $speech['gid'], $m)) { |
|
169 | - ?><p class="debate-speech__question_id"><small> |
|
168 | + if ($data['info']['major'] == 8 && preg_match('#\d{4}-\d\d-\d\d\.(.*?)\.q#', $speech['gid'], $m)) { |
|
169 | + ?><p class="debate-speech__question_id"><small> |
|
170 | 170 | <?= "Question $m[1]" ?> |
171 | 171 | </small></p> |
172 | 172 | <?php } ?> |
@@ -193,15 +193,15 @@ discard block |
||
193 | 193 | <?php } ?> |
194 | 194 | |
195 | 195 | <?php if (isset($speech['mp_vote'])) { |
196 | - $mp_vote = [ 'vote' => $speech['mp_vote']['vote'] ]; |
|
197 | - if (isset($speech['before_mp'])) { |
|
198 | - $before_mp = $speech['before_mp']; |
|
199 | - } |
|
200 | - if (isset($speech['after_mp'])) { |
|
201 | - $after_mp = $speech['after_mp']; |
|
202 | - } |
|
203 | - include dirname(__FILE__) . '/../divisions/_your_mp.php'; |
|
204 | - } ?> |
|
196 | + $mp_vote = [ 'vote' => $speech['mp_vote']['vote'] ]; |
|
197 | + if (isset($speech['before_mp'])) { |
|
198 | + $before_mp = $speech['before_mp']; |
|
199 | + } |
|
200 | + if (isset($speech['after_mp'])) { |
|
201 | + $after_mp = $speech['after_mp']; |
|
202 | + } |
|
203 | + include dirname(__FILE__) . '/../divisions/_your_mp.php'; |
|
204 | + } ?> |
|
205 | 205 | <div class="debate-speech__division__details"> |
206 | 206 | <?php include dirname(__FILE__) . '/../divisions/_votes.php'; ?> |
207 | 207 | </div> |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | $divisions_to_link = []; |
4 | -foreach($data['rows'] as $speech) { |
|
4 | +foreach ($data['rows'] as $speech) { |
|
5 | 5 | |
6 | 6 | # Only care about divisions... |
7 | 7 | if ($speech['htype'] != 14) { |
@@ -85,13 +85,13 @@ |
||
85 | 85 | |
86 | 86 | <p><strong>Chairpersons</strong></p> |
87 | 87 | <ul> |
88 | - <?php foreach($committee['chairmen'] as $chair) { ?> |
|
88 | + <?php foreach ($committee['chairmen'] as $chair) { ?> |
|
89 | 89 | <li><?= $chair['name'] ?> (<?= $chair['attending'] ?>)</li> |
90 | 90 | <?php } ?> |
91 | 91 | </ul> |
92 | 92 | <p><strong>Members</strong></p> |
93 | 93 | <ul> |
94 | - <?php foreach($committee['members'] as $chair) { ?> |
|
94 | + <?php foreach ($committee['members'] as $chair) { ?> |
|
95 | 95 | <li><?= $chair['name'] ?> (<?= $chair['attending'] ?>)</li> |
96 | 96 | <?php } ?> |
97 | 97 | </ul> |
@@ -9,7 +9,7 @@ |
||
9 | 9 | <?php |
10 | 10 | # remove the current policy from the list of related policies |
11 | 11 | if (isset($policy)) { |
12 | - $division['related_policies'] = array_filter($division['related_policies'], function ($related_policy) use ($policy) { |
|
12 | + $division['related_policies'] = array_filter($division['related_policies'], function($related_policy) use ($policy) { |
|
13 | 13 | return $related_policy['policy_id'] != $policy['policy_id']; |
14 | 14 | }); |
15 | 15 | } |
@@ -56,7 +56,7 @@ |
||
56 | 56 | <div> |
57 | 57 | <h3 class="browse-content"><?= gettext('Browse content') ?></h3> |
58 | 58 | <ul> |
59 | - <?php foreach($sidebar_links as $date) { ?> |
|
59 | + <?php foreach ($sidebar_links as $date) { ?> |
|
60 | 60 | <li> |
61 | 61 | <a href="#<?= strftime('%Y-%m-%d', strtotime($date)) ?>"> |
62 | 62 | <?= strftime('%e %b %Y', strtotime($date)) ?> |