@@ -22,19 +22,19 @@ |
||
22 | 22 | if (isset($row['listurl'])) { |
23 | 23 | // So we can link to the 'More recent appearances' precisely. |
24 | 24 | $count = $n + 1; |
25 | - $text = "<a name=\"n$count\"></a><strong><a href=\"" . $row['listurl'] . "\">$text</a></strong> "; |
|
25 | + $text = "<a name=\"n$count\"></a><strong><a href=\"".$row['listurl']."\">$text</a></strong> "; |
|
26 | 26 | } |
27 | 27 | |
28 | - $text .= '<small>' . format_date($row['hdate'], SHORTDATEFORMAT); |
|
28 | + $text .= '<small>'.format_date($row['hdate'], SHORTDATEFORMAT); |
|
29 | 29 | |
30 | 30 | if ($hansardmajors[$row['major']]['type'] == 'debate') { |
31 | 31 | $plural = $row['total_speeches'] == 1 ? 'speech' : 'speeches'; |
32 | - $text .= ' (' . $row['total_speeches'] . " $plural)"; |
|
32 | + $text .= ' ('.$row['total_speeches']." $plural)"; |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | $text .= '</small>'; |
36 | 36 | |
37 | - $text = "\t\t\t\t<p>$text<br>\n\t\t\t\t“" . trim_characters($row['body'], 0, 200) . "”</p>\n"; |
|
37 | + $text = "\t\t\t\t<p>$text<br>\n\t\t\t\t“".trim_characters($row['body'], 0, 200)."”</p>\n"; |
|
38 | 38 | |
39 | 39 | print $text; |
40 | 40 | } |
@@ -49,7 +49,7 @@ |
||
49 | 49 | <?php if (isset($data['user_signed_in']) && isset($data['already_signed_up'])): ?> |
50 | 50 | <div class="alerts-message alerts-message--reminder"> |
51 | 51 | <h2>You are already signed up</h2> |
52 | - <p>You are already receiving alerts when your MP<?= isset($data['mp_name']) ? ', ' . $data['mp_name'] . ',' : '' ?> speaks in Parliament or receives an answer to a written question.</p> |
|
52 | + <p>You are already receiving alerts when your MP<?= isset($data['mp_name']) ? ', '.$data['mp_name'].',' : '' ?> speaks in Parliament or receives an answer to a written question.</p> |
|
53 | 53 | <p><a href="/alert/" class="button radius">Show my email settings</a></p> |
54 | 54 | </div> |
55 | 55 | <?php endif ?> |
@@ -122,25 +122,25 @@ discard block |
||
122 | 122 | <?php } ?> |
123 | 123 | |
124 | 124 | <?php |
125 | - if( |
|
126 | - (isset($members) && $members->rows() > 0) || |
|
125 | + if( |
|
126 | + (isset($members) && $members->rows() > 0) || |
|
127 | 127 | (isset($constituencies) && count($constituencies) > 0) || |
128 | 128 | ($alertsearch) |
129 | - ) { |
|
130 | - /* We need to disambiguate the user's instructions */ |
|
131 | - $member_options = false; |
|
132 | - ?> |
|
129 | + ) { |
|
130 | + /* We need to disambiguate the user's instructions */ |
|
131 | + $member_options = false; |
|
132 | + ?> |
|
133 | 133 | <div class="alert-section alert-section--disambiguation"> |
134 | 134 | <div class="alert-section__primary"> |
135 | 135 | |
136 | 136 | <?php if (isset($members) && $members->rows() > 0) { |
137 | - $member_options = true; ?> |
|
137 | + $member_options = true; ?> |
|
138 | 138 | <h3>Sign up for alerts when people matching <i><?= _htmlspecialchars($alertsearch) ?></i> speaks</h3> |
139 | 139 | <ul> |
140 | 140 | <?php |
141 | 141 | $q = $members; |
142 | 142 | for ($n=0; $n<$q->rows(); $n++) { |
143 | - ?> |
|
143 | + ?> |
|
144 | 144 | <li> |
145 | 145 | <form action="<?= $actionurl ?>" method="post"> |
146 | 146 | <input type="hidden" name="t" value="<?= _htmlspecialchars($token) ?>"> |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | <?php } ?> |
161 | 161 | |
162 | 162 | <?php if (isset($constituencies) && count($constituencies) > 0) { |
163 | - $member_options = true; ?> |
|
163 | + $member_options = true; ?> |
|
164 | 164 | <h3>Sign up for alerts when MPs for constituencies matching <i><?= _htmlspecialchars($alertsearch) ?></i> speaks</h3> |
165 | 165 | <ul> |
166 | 166 | <?php foreach ($constituencies as $constituency => $member) { ?> |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <div class="full-page"> |
2 | 2 | <div class="full-page__row"> |
3 | 3 | |
4 | - <?php if ( $message ) { ?> |
|
4 | + <?php if ($message) { ?> |
|
5 | 5 | <div class="alert-section alert-section--feedback"> |
6 | 6 | <div class="alert-section__primary"> |
7 | 7 | <h3><?= $message['title'] ?></h3> |
@@ -12,10 +12,10 @@ discard block |
||
12 | 12 | </div> |
13 | 13 | <?php } ?> |
14 | 14 | |
15 | - <?php if ( $results ) { ?> |
|
15 | + <?php if ($results) { ?> |
|
16 | 16 | <div class="alert-section alert-section--feedback"> |
17 | 17 | <div class="alert-section__primary"> |
18 | - <?php if ( $results == 'alert-confirmed' ) { ?> |
|
18 | + <?php if ($results == 'alert-confirmed') { ?> |
|
19 | 19 | <h3>Your alert has been confirmed</h3> |
20 | 20 | <p> |
21 | 21 | You will now receive email alerts for the following criteria: |
@@ -45,26 +45,26 @@ discard block |
||
45 | 45 | </div> |
46 | 46 | </noscript> |
47 | 47 | |
48 | - <?php } elseif ( $results == 'alert-suspended' ) { ?> |
|
48 | + <?php } elseif ($results == 'alert-suspended') { ?> |
|
49 | 49 | <h3>Alert suspended</h3> |
50 | 50 | <p> |
51 | 51 | You can reactivate the alert at any time, from the sidebar below. |
52 | 52 | </p> |
53 | 53 | |
54 | - <?php } elseif ( $results == 'alert-resumed' ) { ?> |
|
54 | + <?php } elseif ($results == 'alert-resumed') { ?> |
|
55 | 55 | <h3>Alert resumed</h3> |
56 | 56 | <p> |
57 | 57 | You will now receive email alerts on any day when there |
58 | 58 | are entries in Hansard that match your criteria. |
59 | 59 | </p> |
60 | 60 | |
61 | - <?php } elseif ( $results == 'alert-deleted' ) { ?> |
|
61 | + <?php } elseif ($results == 'alert-deleted') { ?> |
|
62 | 62 | <h3>Alert deleted</h3> |
63 | 63 | <p> |
64 | 64 | You will no longer receive this alert. |
65 | 65 | </p> |
66 | 66 | |
67 | - <?php } elseif ( $results == 'alert-fail' ) { ?> |
|
67 | + <?php } elseif ($results == 'alert-fail') { ?> |
|
68 | 68 | <h3>Hmmm, something’s not right</h3> |
69 | 69 | <p> |
70 | 70 | The link you followed to reach this page appears to be incomplete. |
@@ -80,14 +80,14 @@ discard block |
||
80 | 80 | and let us know, and we'll help out! |
81 | 81 | </p> |
82 | 82 | |
83 | - <?php } elseif ( $results == 'alert-added' ) { ?> |
|
83 | + <?php } elseif ($results == 'alert-added') { ?> |
|
84 | 84 | <h3>Your alert has been added</h3> |
85 | 85 | <p> |
86 | 86 | You will now receive email alerts on any day when |
87 | 87 | <?= _htmlspecialchars($criteria) ?> in parliament. |
88 | 88 | </p> |
89 | 89 | |
90 | - <?php } elseif ( $results == 'alert-confirmation' ) { ?> |
|
90 | + <?php } elseif ($results == 'alert-confirmation') { ?> |
|
91 | 91 | <h3>We’re nearly done…</h3> |
92 | 92 | <p> |
93 | 93 | You should receive an email shortly which will contain a link. |
@@ -95,20 +95,20 @@ discard block |
||
95 | 95 | and receive future alerts. Thanks. |
96 | 96 | </p> |
97 | 97 | |
98 | - <?php } elseif ( $results == 'alert-exists' ) { ?> |
|
98 | + <?php } elseif ($results == 'alert-exists') { ?> |
|
99 | 99 | <h3>You’re already subscribed to that!</h3> |
100 | 100 | <p> |
101 | 101 | It’s good to know you’re keen though. |
102 | 102 | </p> |
103 | 103 | |
104 | - <?php } elseif ( $results == 'alert-already-signed' ) { ?> |
|
104 | + <?php } elseif ($results == 'alert-already-signed') { ?> |
|
105 | 105 | <h3>We’re nearly done</h3> |
106 | 106 | <p> |
107 | 107 | You should receive an email shortly which will contain a link. |
108 | 108 | You will need to follow that link to confirm your email address to receive the alert. Thanks. |
109 | 109 | </p> |
110 | 110 | |
111 | - <?php } elseif ( $results == 'alert-fail' ) { ?> |
|
111 | + <?php } elseif ($results == 'alert-fail') { ?> |
|
112 | 112 | <h3>Alert could not be created</h3> |
113 | 113 | <p> |
114 | 114 | Sorry, we were unable to create that alert. Please |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | <?php } ?> |
123 | 123 | |
124 | 124 | <?php |
125 | - if( |
|
125 | + if ( |
|
126 | 126 | (isset($members) && $members->rows() > 0) || |
127 | 127 | (isset($constituencies) && count($constituencies) > 0) || |
128 | 128 | ($alertsearch) |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | <ul> |
140 | 140 | <?php |
141 | 141 | $q = $members; |
142 | - for ($n=0; $n<$q->rows(); $n++) { |
|
142 | + for ($n = 0; $n < $q->rows(); $n++) { |
|
143 | 143 | ?> |
144 | 144 | <li> |
145 | 145 | <form action="<?= $actionurl ?>" method="post"> |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | <input type="hidden" name="email" value="<?= _htmlspecialchars($email) ?>"> |
148 | 148 | <input type="hidden" name="pid" value="<?= $q->field($n, 'person_id') ?>"> |
149 | 149 | When |
150 | - <?= member_full_name($q->field($n, 'house'), $q->field($n, 'title'), $q->field($n, 'given_name'), $q->field($n, 'family_name'), $q->field($n, 'lordofname') ) ?> |
|
150 | + <?= member_full_name($q->field($n, 'house'), $q->field($n, 'title'), $q->field($n, 'given_name'), $q->field($n, 'family_name'), $q->field($n, 'lordofname')) ?> |
|
151 | 151 | <?php if ($q->field($n, 'constituency')) { ?> |
152 | 152 | (<?= $q->field($n, 'constituency') ?>) |
153 | 153 | <?php } ?> |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | <?php } ?> |
179 | 179 | |
180 | 180 | <?php if ($alertsearch) { |
181 | - if ( $member_options ) { ?> |
|
181 | + if ($member_options) { ?> |
|
182 | 182 | <h3>Sign up for alerts for topics</h3> |
183 | 183 | <?php } else { ?> |
184 | 184 | <h3>Great! Can you just confirm what you mean?</h3> |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | Receive alerts when <?= _htmlspecialchars($alertsearch_pretty) ?> |
193 | 193 | <input type="submit" class="button small" value="Subscribe"> |
194 | 194 | </form> |
195 | - <?php if ( isset($mistakes['multiple']) ) { ?> |
|
195 | + <?php if (isset($mistakes['multiple'])) { ?> |
|
196 | 196 | <em class="error"> |
197 | 197 | You have used a comma in your search term – |
198 | 198 | are you sure this is what you want? You cannot |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | for each individual term. |
202 | 202 | </em> |
203 | 203 | <?php } ?> |
204 | - <?php if ( isset($mistakes['postcode_and']) ) { ?> |
|
204 | + <?php if (isset($mistakes['postcode_and'])) { ?> |
|
205 | 205 | <em class="error"> |
206 | 206 | You have used a postcode and something else in your |
207 | 207 | search term – are you sure this is what you |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | <input type="hidden" name="t" value="<?= _htmlspecialchars($token) ?>"> |
223 | 223 | <input type="hidden" name="email" value="<?= _htmlspecialchars($email) ?>"> |
224 | 224 | <input type="hidden" name="keyword" value="<?= _htmlspecialchars($member_alertsearch) ?>"> |
225 | - Mentions of [<?= _htmlspecialchars($member_displaysearch) ?>] by <?= $mp_display_text . $member->full_name() ?> |
|
225 | + Mentions of [<?= _htmlspecialchars($member_displaysearch) ?>] by <?= $mp_display_text.$member->full_name() ?> |
|
226 | 226 | <input type="submit" class="button small" value="Subscribe"> |
227 | 227 | </form> |
228 | 228 | </li> |
@@ -350,17 +350,17 @@ discard block |
||
350 | 350 | <div class="alert-section__secondary"> |
351 | 351 | <?php if ($email_verified) { ?> |
352 | 352 | |
353 | - <?php if ( $alerts ) { ?> |
|
353 | + <?php if ($alerts) { ?> |
|
354 | 354 | <h3>Your current email alerts</h3> |
355 | 355 | <ul class="alerts-manage__list"> |
356 | - <?php foreach ( $alerts as $alert ) { ?> |
|
356 | + <?php foreach ($alerts as $alert) { ?> |
|
357 | 357 | <li> |
358 | 358 | When <?= _htmlspecialchars($alert['criteria']) ?>. |
359 | 359 | <form action="<?= $actionurl ?>" method="POST"> |
360 | 360 | <input type="hidden" name="t" value="<?= _htmlspecialchars($alert['token']) ?>"> |
361 | - <?php if ( $alert['status'] == 'unconfirmed' ) { ?> |
|
361 | + <?php if ($alert['status'] == 'unconfirmed') { ?> |
|
362 | 362 | <input type="submit" class="button small" name="action" value="Confirm"> |
363 | - <?php } elseif ( $alert['status'] == 'suspended' ) { ?> |
|
363 | + <?php } elseif ($alert['status'] == 'suspended') { ?> |
|
364 | 364 | <input type="submit" class="button small" name="action" value="Resume"> |
365 | 365 | <?php } else { ?> |
366 | 366 | <input type="submit" class="button button--secondary small" name="action" value="Suspend"> |
@@ -372,7 +372,7 @@ discard block |
||
372 | 372 | </ul> |
373 | 373 | <?php } ?> |
374 | 374 | |
375 | - <?php if ( $current_mp ) { ?> |
|
375 | + <?php if ($current_mp) { ?> |
|
376 | 376 | <h3>Your MP alert</h3> |
377 | 377 | <ul class="alerts-manage__list"> |
378 | 378 | <li> |
@@ -91,7 +91,9 @@ |
||
91 | 91 | echo '</dt> <dd><p>'; |
92 | 92 | if (isset($row['speaker']) && count($row['speaker'])) { |
93 | 93 | echo "<em>" . ucfirst($row['speaker']['name']) . "</em>"; |
94 | - if ($row['extract']) echo ": "; |
|
94 | + if ($row['extract']) { |
|
95 | + echo ": "; |
|
96 | + } |
|
95 | 97 | } |
96 | 98 | |
97 | 99 | echo $row['extract'] . "</p></dd>\n"; |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $last_result = $info['total_results']; |
45 | 45 | } |
46 | 46 | |
47 | - print "\t\t\t\t<h3 style='font-weight:normal'>Results <strong>" . number_format($info['first_result']) . '-' . number_format($last_result) . '</strong> of ' . number_format($info['total_results']) . " for <strong>" . _htmlentities($searchdescription) . "</strong></h3>\n"; |
|
47 | + print "\t\t\t\t<h3 style='font-weight:normal'>Results <strong>".number_format($info['first_result']).'-'.number_format($last_result).'</strong> of '.number_format($info['total_results'])." for <strong>"._htmlentities($searchdescription)."</strong></h3>\n"; |
|
48 | 48 | |
49 | 49 | } elseif ($info['total_results'] == 0) { |
50 | 50 | echo '<h3 style="font-weight:normal">Your search for <strong>', _htmlentities($searchdescription), '</strong> did not match anything.</h3>'; |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | $u = new \MySociety\TheyWorkForYou\Url('search'); |
55 | 55 | $u->reset(); |
56 | 56 | $u->insert(array('s' => $info['spelling_correction'])); |
57 | - echo '<p><big>Did you mean: <a href="' . $u->generate(), '">', $info['spelling_correction'] . '</a>?</big></p>'; |
|
57 | + echo '<p><big>Did you mean: <a href="'.$u->generate(), '">', $info['spelling_correction'].'</a>?</big></p>'; |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | if ($match = get_http_var('match')) { |
@@ -66,35 +66,35 @@ discard block |
||
66 | 66 | if (isset ($data['rows']) && count($data['rows']) > 0) { |
67 | 67 | |
68 | 68 | echo '<dl id="searchresults">'; |
69 | - for ($i=0; $i<count($data['rows']); $i++) { |
|
69 | + for ($i = 0; $i < count($data['rows']); $i++) { |
|
70 | 70 | |
71 | 71 | $row = $data['rows'][$i]; |
72 | 72 | echo '<dt><a href="', $row['listurl'], '">'; |
73 | 73 | if (isset($row['parent']) && count($row['parent']) > 0) { |
74 | - echo ('<strong>' . $row['parent']['body'] . '</strong>'); |
|
74 | + echo ('<strong>'.$row['parent']['body'].'</strong>'); |
|
75 | 75 | } |
76 | - echo '</a> <small>(' . format_date($row['hdate'], LONGDATEFORMAT) . ')'; |
|
76 | + echo '</a> <small>('.format_date($row['hdate'], LONGDATEFORMAT).')'; |
|
77 | 77 | if (isset($row['video_status']) && ($row['video_status'] == 5 || $row['video_status'] == 7)) { |
78 | 78 | echo ' <em>has video</em> '; |
79 | 79 | } |
80 | 80 | if (isset($row['collapsed']) && $row['collapsed'] && $row['subsection_id']) { |
81 | 81 | $URL = new \MySociety\TheyWorkForYou\Url('search'); |
82 | - $URL->insert(array('s' => $info['s'] . " segment:$row[subsection_id]" )); |
|
82 | + $URL->insert(array('s' => $info['s']." segment:$row[subsection_id]")); |
|
83 | 83 | echo ' <a href="', $URL->generate(), '">See ', $row['collapsed'], |
84 | - ' other result', $row['collapsed']>1?'s':'', ' from this ', |
|
84 | + ' other result', $row['collapsed'] > 1 ? 's' : '', ' from this ', |
|
85 | 85 | $hansardmajors[$row['major']]['singular'], '</a>'; |
86 | 86 | } |
87 | 87 | echo '</small>'; |
88 | 88 | if ($match = get_http_var('match')) { |
89 | - echo ' – <a href="/search/record.php?result=', $row['gid'] , '&match=', _htmlspecialchars($match), '">This is the correct match</a>'; |
|
89 | + echo ' – <a href="/search/record.php?result=', $row['gid'], '&match=', _htmlspecialchars($match), '">This is the correct match</a>'; |
|
90 | 90 | } |
91 | 91 | echo '</dt> <dd><p>'; |
92 | 92 | if (isset($row['speaker']) && count($row['speaker'])) { |
93 | - echo "<em>" . ucfirst($row['speaker']['name']) . "</em>"; |
|
93 | + echo "<em>".ucfirst($row['speaker']['name'])."</em>"; |
|
94 | 94 | if ($row['extract']) echo ": "; |
95 | 95 | } |
96 | 96 | |
97 | - echo $row['extract'] . "</p></dd>\n"; |
|
97 | + echo $row['extract']."</p></dd>\n"; |
|
98 | 98 | |
99 | 99 | } |
100 | 100 |
@@ -1,8 +1,8 @@ discard block |
||
1 | - <?php if ( $featured['featured'] ) { ?> |
|
1 | + <?php if ($featured['featured']) { ?> |
|
2 | 2 | <h2>In the news</h2> |
3 | - <?php if ( isset($featured['headline']) ) { ?> |
|
3 | + <?php if (isset($featured['headline'])) { ?> |
|
4 | 4 | <h3 class="in-the-news__topic"><a href="<?= $featured['list_url'] ?>"><?= $featured['headline'] ?></a></h3> |
5 | - <?php if ( isset($featured['context']) ) { ?> |
|
5 | + <?php if (isset($featured['context'])) { ?> |
|
6 | 6 | <p class="in-the-news__context"><?= $featured['context'] ?></p> |
7 | 7 | <?php } ?> |
8 | 8 | <?php } ?> |
@@ -15,21 +15,21 @@ discard block |
||
15 | 15 | <p class="meta excerpt__category"><a href="<?= $featured['more_url'] ?>"><?= $featured['desc'] ?></a></p> |
16 | 16 | <p class="excerpt__statement"> |
17 | 17 | <q> |
18 | - <?php if ( $featured['child']['speaker'] ) { ?> |
|
18 | + <?php if ($featured['child']['speaker']) { ?> |
|
19 | 19 | <a href="<?= $featured['child']['speaker']['url'] ?>"><?= $featured['child']['speaker']['name'] ?></a> : |
20 | 20 | <?php } ?> |
21 | 21 | <?= trim_characters($featured['child']['body'], 0, 200) ?> |
22 | 22 | </q> |
23 | 23 | </p> |
24 | 24 | </div> |
25 | - <?php if ( count($featured['related']) ) { ?> |
|
25 | + <?php if (count($featured['related'])) { ?> |
|
26 | 26 | <div class="in-the-news__key-events"> |
27 | 27 | <!-- No maximum, but less than 4 looks best --> |
28 | 28 | <ul class="key-events__list"> |
29 | 29 | <li> |
30 | 30 | <h4>Key events</h4> |
31 | 31 | </li> |
32 | - <?php foreach ( $featured['related'] as $related ) { ?> |
|
32 | + <?php foreach ($featured['related'] as $related) { ?> |
|
33 | 33 | <li> |
34 | 34 | <a href="<?= $related['list_url'] ?>"><?= $related['parent']['body'] ?></a> |
35 | 35 | <p class="meta"><?= format_date($related['hdate'], SHORTDATEFORMAT) ?></p> |
@@ -1,10 +1,10 @@ discard block |
||
1 | - <?php if ( isset( $recent['child'] ) ) { ?> |
|
1 | + <?php if (isset($recent['child'])) { ?> |
|
2 | 2 | <li class="parliamentary-excerpt"> |
3 | - <h3 class="excerpt__title"><a href="<?= $recent['list_url'] ?>"><?= $recent['parent']['body'] ? $recent['parent']['body'] . ' : ' : '' ?><?= $recent['body'] ?></a></h3> |
|
3 | + <h3 class="excerpt__title"><a href="<?= $recent['list_url'] ?>"><?= $recent['parent']['body'] ? $recent['parent']['body'].' : ' : '' ?><?= $recent['body'] ?></a></h3> |
|
4 | 4 | <p class="meta"><?=format_date($recent['hdate'], LONGERDATEFORMAT); ?></p> |
5 | 5 | <p class="meta excerpt__category"><a href="<?= $recent['more_url'] ?>"><?= $recent['desc'] ?></a></p> |
6 | 6 | <p class="excerpt__statement"> |
7 | - <?php if ( isset($recent['child']['speaker']) && count($recent['child']['speaker']) ) { ?> |
|
7 | + <?php if (isset($recent['child']['speaker']) && count($recent['child']['speaker'])) { ?> |
|
8 | 8 | <a href="<?= $recent['child']['speaker']['url'] ?>"><?= $recent['child']['speaker']['name'] ?></a> |
9 | 9 | <?php } ?> |
10 | 10 | <?= trim_characters($recent['child']['body'], 0, 200) ?> |
@@ -13,10 +13,10 @@ discard block |
||
13 | 13 | <?php } else { ?> |
14 | 14 | <li class="parliamentary-excerpt"> |
15 | 15 | <h3 class="excerpt__title"><?= $recent['desc'] ?></h3> |
16 | - <?php foreach ( $recent['data'] as $date => $details ) { ?> |
|
16 | + <?php foreach ($recent['data'] as $date => $details) { ?> |
|
17 | 17 | <p class="meta"><?= $date ?></p> |
18 | 18 | <p class="meta excerpt__category"><a href="<?= $recent['more_url'] ?>"><?= $recent['desc'] ?></a></p> |
19 | - <?php foreach ( $details as $bill ) { ?> |
|
19 | + <?php foreach ($details as $bill) { ?> |
|
20 | 20 | <p class="excerpt__statement"> |
21 | 21 | <a href="<?= $bill['url'] ?>"><?= $bill['bill'] ?>, <?= $bill['sitting'] ?></a> |
22 | 22 | </p> |
@@ -42,24 +42,24 @@ |
||
42 | 42 | ?> |
43 | 43 | <dl id="searchresults"> |
44 | 44 | <?php |
45 | - for ($i=0; $i<count($data['rows']); $i++) { |
|
45 | + for ($i = 0; $i < count($data['rows']); $i++) { |
|
46 | 46 | |
47 | 47 | $row = $data['rows'][$i]; |
48 | 48 | |
49 | 49 | ?> |
50 | 50 | <dt><a href="<?php echo $row['listurl']; ?>"><?php |
51 | 51 | if (isset($row['parent']) && count($row['parent']) > 0) { |
52 | - echo ('<strong>' . $row['parent']['body'] . '</strong>'); |
|
52 | + echo ('<strong>'.$row['parent']['body'].'</strong>'); |
|
53 | 53 | } |
54 | - echo ('</a> <small>(' . format_date($row['hdate'], SHORTDATEFORMAT) . ')</small>'); |
|
54 | + echo ('</a> <small>('.format_date($row['hdate'], SHORTDATEFORMAT).')</small>'); |
|
55 | 55 | ?></dt> |
56 | 56 | <dd><p><?php |
57 | 57 | |
58 | 58 | if (isset($row['speaker']['name'])) { |
59 | - echo "<em>" . $row['speaker']['name'] . "</em>: "; |
|
59 | + echo "<em>".$row['speaker']['name']."</em>: "; |
|
60 | 60 | } |
61 | 61 | |
62 | - echo $row['extract'] . "</p></dd>\n"; |
|
62 | + echo $row['extract']."</p></dd>\n"; |
|
63 | 63 | |
64 | 64 | } |
65 | 65 |
@@ -1,10 +1,10 @@ discard block |
||
1 | 1 | <div class="search-page__section__secondary search-page-sidebar"> |
2 | - <?php if ( isset( $search_sidebar['email'] ) ) { ?> |
|
2 | + <?php if (isset($search_sidebar['email'])) { ?> |
|
3 | 3 | <h2>Create an alert</h2> |
4 | 4 | <p class="sidebar-item-with-icon"> |
5 | 5 | <a href="<?= $search_sidebar['email'] ?>">Subscribe to an email alert</a> |
6 | 6 | for <em class="current-search-term"><?= $search_sidebar['email_desc'] ?></em> |
7 | - <?php if (isset( $search_sidebar['email_section'] ) ) { ?> |
|
7 | + <?php if (isset($search_sidebar['email_section'])) { ?> |
|
8 | 8 | <br><small>(or just <a href="<?= $search_sidebar['email_section'] ?>"><?= $search_sidebar['email_desc_section'] ?></a>)</small> |
9 | 9 | <?php } ?> |
10 | 10 | </p> |
@@ -16,5 +16,5 @@ discard block |
||
16 | 16 | <?php } ?> |
17 | 17 | |
18 | 18 | |
19 | - <?php include( dirname(__FILE__) . '/../sidebar/looking_for.php' ) ?> |
|
19 | + <?php include(dirname(__FILE__).'/../sidebar/looking_for.php') ?> |
|
20 | 20 | </div> |
@@ -9,17 +9,17 @@ discard block |
||
9 | 9 | <div class="search-page__section__primary"> |
10 | 10 | <h2>Who says <em class="current-search-term"><?= _htmlentities($searchstring) ?></em> the most?</h2> |
11 | 11 | |
12 | - <?php if ( isset($error) ) { ?> |
|
13 | - <?php if ( $error == 'No results' && isset( $house ) && $house != 0 ) { ?> |
|
12 | + <?php if (isset($error)) { ?> |
|
13 | + <?php if ($error == 'No results' && isset($house) && $house != 0) { ?> |
|
14 | 14 | <ul class="search-result-display-options"> |
15 | 15 | <li> |
16 | - <?php if ( $house == 1 ) { ?> |
|
16 | + <?php if ($house == 1) { ?> |
|
17 | 17 | No results for MPs only |
18 | - <?php } else if ( $house == 2 ) { ?> |
|
18 | + <?php } else if ($house == 2) { ?> |
|
19 | 19 | No results for Peers only |
20 | - <?php } else if ( $house == 4 ) { ?> |
|
20 | + <?php } else if ($house == 4) { ?> |
|
21 | 21 | No results for MSPs only |
22 | - <?php } else if ( $house == 3 ) { ?> |
|
22 | + <?php } else if ($house == 3) { ?> |
|
23 | 23 | No results for MLAs only |
24 | 24 | <?php } ?> |
25 | 25 | | |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | <?php } ?> |
32 | 32 | <?php } ?> |
33 | 33 | |
34 | - <?php if ( $wtt ) { ?> |
|
34 | + <?php if ($wtt) { ?> |
|
35 | 35 | <p><strong>Now, try reading what a couple of these Lords are saying, |
36 | 36 | to help you find someone appropriate. When you've found someone, |
37 | 37 | hit the "I want to write to this Lord" button on their results page |
@@ -39,37 +39,37 @@ discard block |
||
39 | 39 | </strong></p> |
40 | 40 | <?php } ?> |
41 | 41 | |
42 | - <?php if ( isset($speakers) && count($speakers) ) { ?> |
|
42 | + <?php if (isset($speakers) && count($speakers)) { ?> |
|
43 | 43 | |
44 | - <?php if ( !$wtt ) { ?> |
|
44 | + <?php if (!$wtt) { ?> |
|
45 | 45 | <ul class="search-result-display-options"> |
46 | 46 | <li>Results grouped by person</li> |
47 | 47 | <li> |
48 | - <?php if ( $house == 0 ) { ?> |
|
48 | + <?php if ($house == 0) { ?> |
|
49 | 49 | Show All |
50 | 50 | <?php } else { ?> |
51 | 51 | <a href="<?= $this_url->generate('html') ?>">Show All</a> |
52 | 52 | <?php } ?> |
53 | 53 | | |
54 | - <?php if ( $house == 1 ) { ?> |
|
54 | + <?php if ($house == 1) { ?> |
|
55 | 55 | MPs only |
56 | 56 | <?php } else { ?> |
57 | 57 | <a href="<?= $this_url->generate('html', array('house'=>1)) ?>">MPs only</a> |
58 | 58 | <?php } ?> |
59 | 59 | | |
60 | - <?php if ( $house == 2 ) { ?> |
|
60 | + <?php if ($house == 2) { ?> |
|
61 | 61 | Peers only |
62 | 62 | <?php } else { ?> |
63 | 63 | <a href="<?= $this_url->generate('html', array('house'=>2)) ?>">Lords only</a> |
64 | 64 | <?php } ?> |
65 | 65 | | |
66 | - <?php if ( $house == 4 ) { ?> |
|
66 | + <?php if ($house == 4) { ?> |
|
67 | 67 | MSPs only |
68 | 68 | <?php } else { ?> |
69 | 69 | <a href="<?= $this_url->generate('html', array('house'=>4)) ?>">MSPs only</a> |
70 | 70 | <?php } ?> |
71 | 71 | | |
72 | - <?php if ( $house == 3 ) { ?> |
|
72 | + <?php if ($house == 3) { ?> |
|
73 | 73 | MLAs only |
74 | 74 | <?php } else { ?> |
75 | 75 | <a href="<?= $this_url->generate('html', array('house'=>3)) ?>">MLAs only</a> |
@@ -90,33 +90,33 @@ discard block |
||
90 | 90 | </tr> |
91 | 91 | </thead> |
92 | 92 | <tbody> |
93 | - <?php foreach ( $speakers as $pid => $speaker ) { ?> |
|
93 | + <?php foreach ($speakers as $pid => $speaker) { ?> |
|
94 | 94 | |
95 | - <?php if ( $wtt && $pid == 0 ) { continue; } // skip heading count for WTT lords list ?> |
|
95 | + <?php if ($wtt && $pid == 0) { continue; } // skip heading count for WTT lords list ?> |
|
96 | 96 | |
97 | 97 | <tr> |
98 | 98 | <td><?= $speaker['count'] ?></td> |
99 | 99 | <td> |
100 | - <?php if ( $pid ) { ?> |
|
101 | - <?php if ( !$wtt || $speaker['left'] == '9999-12-31' ) { ?> |
|
100 | + <?php if ($pid) { ?> |
|
101 | + <?php if (!$wtt || $speaker['left'] == '9999-12-31') { ?> |
|
102 | 102 | <a href="/search/?q=<?= _htmlentities($searchstring) ?>&pid=<?= $pid ?><?= isset($wtt) && $speaker['left'] == '9999-12-31' ? '&wtt=2' : '' ?>"> |
103 | 103 | <?php } ?> |
104 | 104 | <?= isset($speaker['name']) ? $speaker['name'] : 'N/A' ?> |
105 | - <?php if ( !$wtt || $speaker['left'] == '9999-12-31' ) { ?> |
|
105 | + <?php if (!$wtt || $speaker['left'] == '9999-12-31') { ?> |
|
106 | 106 | </a> |
107 | 107 | <?php } ?> |
108 | - <?php if ( isset($speaker['party']) ) { ?> |
|
108 | + <?php if (isset($speaker['party'])) { ?> |
|
109 | 109 | <span class="search-results-grouped__speaker-party">(<?= $speaker['party'] ?>)</span> |
110 | 110 | <?php } ?> |
111 | - <?php if ( $house != 2 ) { ?> |
|
112 | - <?= isset($speaker['office']) ? ' - ' . join('; ', $speaker['office']) : '' ?> |
|
111 | + <?php if ($house != 2) { ?> |
|
112 | + <?= isset($speaker['office']) ? ' - '.join('; ', $speaker['office']) : '' ?> |
|
113 | 113 | <?php } ?> |
114 | 114 | <?php } else { // no $pid ?> |
115 | 115 | <?= $speaker['name'] ?> |
116 | 116 | <?php } ?> |
117 | 117 | </td> |
118 | 118 | <td> |
119 | - <?php if ( format_date($speaker['pmindate'], 'M Y') == format_date($speaker['pmaxdate'], 'M Y') ) { ?> |
|
119 | + <?php if (format_date($speaker['pmindate'], 'M Y') == format_date($speaker['pmaxdate'], 'M Y')) { ?> |
|
120 | 120 | <?= format_date($speaker['pmindate'], 'M Y') ?> |
121 | 121 | <?php } else { ?> |
122 | 122 | <?= format_date($speaker['pmindate'], 'M Y') ?> – <?= format_date($speaker['pmaxdate'], 'M Y') ?> |