@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | WHERE house=1 AND left_house = (SELECT MAX(left_house) FROM member) '; |
12 | 12 | $q = $db->query($query . "ORDER BY person_id"); |
13 | 13 | $out = array('both'=>'', 'small'=>'', 'none'=>array()); |
14 | -for ($i=0; $i<$q->rows(); $i++) { |
|
14 | +for ($i = 0; $i < $q->rows(); $i++) { |
|
15 | 15 | $p_id = $q->field($i, 'person_id'); |
16 | 16 | list($dummy, $sz) = MySociety\TheyWorkForYou\Utility\Member::findMemberImage($p_id); |
17 | 17 | if ($sz == 'L') { |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | array_push($out['none'], '<li>' . $q->field($i, 'person_id') . ' (' . $q->field($i, 'party') . ')' . ', ' . $q->field($i, 'constituency')); |
23 | 23 | } |
24 | 24 | } |
25 | -print '<h3>Missing completely ('.count($out['none']).')</h3> <ul>'; |
|
25 | +print '<h3>Missing completely (' . count($out['none']) . ')</h3> <ul>'; |
|
26 | 26 | print join($out['none'], "\n"); |
27 | 27 | print '</ul>'; |
28 | 28 | print '<h3>Large and small</h3> <p>'; |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | public function moderate_trackbacks() { return $this->moderate_trackbacks; } |
52 | 52 | |
53 | 53 | |
54 | - public function display ($view, $args=array(), $format='html') { |
|
54 | + public function display($view, $args = array(), $format = 'html') { |
|
55 | 55 | // $view is one of: |
56 | 56 | // 'epobject_id' - display the pings for one epobject. |
57 | 57 | // 'recent' - to get the most recent pings to anywhere. |
@@ -64,18 +64,18 @@ discard block |
||
64 | 64 | if ($view == 'epobject_id' || $view == 'recent') { |
65 | 65 | |
66 | 66 | // What function do we call for this view? |
67 | - $function = '_get_trackbacks_by_'.$view; |
|
67 | + $function = '_get_trackbacks_by_' . $view; |
|
68 | 68 | // Get all the data that's to be rendered. |
69 | 69 | $trackbackdata = $this->$function($args); |
70 | 70 | |
71 | 71 | } else { |
72 | - $PAGE->error_message ("You haven't specified a valid view type."); |
|
72 | + $PAGE->error_message("You haven't specified a valid view type."); |
|
73 | 73 | return false; |
74 | 74 | } |
75 | 75 | |
76 | - $data = array ( |
|
76 | + $data = array( |
|
77 | 77 | 'data' => $trackbackdata, |
78 | - 'info' => array ( |
|
78 | + 'info' => array( |
|
79 | 79 | 'view' => $view |
80 | 80 | ) |
81 | 81 | ); |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $this->render($view, $data, $format); |
87 | 87 | } |
88 | 88 | |
89 | - public function render($view, $data, $format='html') { |
|
89 | + public function render($view, $data, $format = 'html') { |
|
90 | 90 | |
91 | 91 | if ($format != 'html') { |
92 | 92 | $format = 'html'; |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | // We currently only have one kind of trackback template, so |
96 | 96 | // we're ignoring $view here I'm afraid... |
97 | 97 | |
98 | - include (INCLUDESPATH."easyparliament/templates/$format/trackbacks" . ".php"); |
|
98 | + include (INCLUDESPATH . "easyparliament/templates/$format/trackbacks" . ".php"); |
|
99 | 99 | |
100 | 100 | } |
101 | 101 | |
@@ -131,14 +131,14 @@ discard block |
||
131 | 131 | |
132 | 132 | |
133 | 133 | // Still here? Then we're trackbacking to a valid hansard item. |
134 | - $url = $trackbackdata['url']; |
|
135 | - $source_ip = $trackbackdata['source_ip']; |
|
134 | + $url = $trackbackdata['url']; |
|
135 | + $source_ip = $trackbackdata['source_ip']; |
|
136 | 136 | // These all strip_tags too. |
137 | - $title = trim_characters(html_entity_decode($trackbackdata['title']), 0, 255); |
|
138 | - $excerpt = trim_characters(html_entity_decode($trackbackdata['excerpt']), 0, 255); |
|
139 | - $blog_name = trim_characters(html_entity_decode($trackbackdata['blog_name']), 0, 255); |
|
137 | + $title = trim_characters(html_entity_decode($trackbackdata['title']), 0, 255); |
|
138 | + $excerpt = trim_characters(html_entity_decode($trackbackdata['excerpt']), 0, 255); |
|
139 | + $blog_name = trim_characters(html_entity_decode($trackbackdata['blog_name']), 0, 255); |
|
140 | 140 | |
141 | - $visible = $this->moderate_trackbacks ? 0 : 1; |
|
141 | + $visible = $this->moderate_trackbacks ? 0 : 1; |
|
142 | 142 | |
143 | 143 | $q = $this->db->query("INSERT INTO trackbacks |
144 | 144 | (epobject_id, blog_name, title, excerpt, url, source_ip, posted, visible) |
@@ -198,8 +198,8 @@ discard block |
||
198 | 198 | "); |
199 | 199 | |
200 | 200 | if ($q->rows() > 0) { |
201 | - for ($row=0; $row<$q->rows(); $row++) { |
|
202 | - $trackbackdata[] = array ( |
|
201 | + for ($row = 0; $row < $q->rows(); $row++) { |
|
202 | + $trackbackdata[] = array( |
|
203 | 203 | 'trackback_id' => $q->field($row, 'trackback_id'), |
204 | 204 | 'epobject_id' => $q->field($row, 'epobject_id'), |
205 | 205 | 'blog_name' => $q->field($row, 'blog_name'), |
@@ -247,8 +247,8 @@ discard block |
||
247 | 247 | "); |
248 | 248 | |
249 | 249 | if ($q->rows() > 0) { |
250 | - for ($row=0; $row<$q->rows(); $row++) { |
|
251 | - $trackbackdata[] = array ( |
|
250 | + for ($row = 0; $row < $q->rows(); $row++) { |
|
251 | + $trackbackdata[] = array( |
|
252 | 252 | 'trackback_id' => $q->field($row, 'trackback_id'), |
253 | 253 | 'epobject_id' => $q->field($row, 'epobject_id'), |
254 | 254 | 'blog_name' => $q->field($row, 'blog_name'), |
@@ -277,13 +277,13 @@ discard block |
||
277 | 277 | // This page just does XML. |
278 | 278 | |
279 | 279 | if ($error) { |
280 | - echo '<?xml version="1.0" encoding="utf-8"?'.">\n"; |
|
280 | + echo '<?xml version="1.0" encoding="utf-8"?' . ">\n"; |
|
281 | 281 | echo "<response>\n"; |
282 | 282 | echo "<error>1</error>\n"; |
283 | 283 | echo "<message>$error_message</message>\n"; |
284 | 284 | echo "</response>"; |
285 | 285 | } else { |
286 | - echo '<?xml version="1.0" encoding="utf-8"?'.">\n"; |
|
286 | + echo '<?xml version="1.0" encoding="utf-8"?' . ">\n"; |
|
287 | 287 | echo "<response>\n"; |
288 | 288 | echo "<error>0</error>\n"; |
289 | 289 | echo "</response>"; |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | |
3 | 3 | class GLOSSARYLIST { |
4 | 4 | |
5 | - public function render($data, $format='html', $template='glossary') { |
|
5 | + public function render($data, $format = 'html', $template = 'glossary') { |
|
6 | 6 | // Once we have the data that's to be rendered, |
7 | 7 | // include the template. |
8 | 8 | |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | $format = 'html'; |
11 | 11 | } |
12 | 12 | |
13 | - include (INCLUDESPATH."easyparliament/templates/$format/$template.php"); |
|
13 | + include (INCLUDESPATH . "easyparliament/templates/$format/$template.php"); |
|
14 | 14 | |
15 | 15 | } |
16 | 16 |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | <input type="text" name="q" value="<?= _htmlentities($search_keyword) ?>" class="form-control"> |
5 | 5 | <input type="submit" class="button" value="Search"> |
6 | 6 | </p> |
7 | - <?php if (isset($warnings) ) { ?> |
|
7 | + <?php if (isset($warnings)) { ?> |
|
8 | 8 | <p class="error"> |
9 | 9 | <?= $warnings ?> |
10 | 10 | </p> |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | <p> |
19 | 19 | <ul class="search-result-display-options"> |
20 | 20 | <li><a href="#options" class="search-options-toggle js-toggle-search-options">Advanced search</a></li> |
21 | - <?php if ( $is_adv ) { ?> |
|
21 | + <?php if ($is_adv) { ?> |
|
22 | 22 | <?= $search_phrase ? '<li>Exactly: ' . _htmlentities($search_phrase) . '</li>' : '' ?> |
23 | 23 | <?= $search_exclude ? '<li>Excluding: ' . _htmlentities($search_exclude) . '</li>' : '' ?> |
24 | 24 | <?= $search_from ? '<li>From: ' . _htmlentities($search_from) . '</li>' : '' ?> |
@@ -4,7 +4,7 @@ |
||
4 | 4 | <p class="search-result__description"> |
5 | 5 | <?php $details = $member->getMostRecentMembership(); ?> |
6 | 6 | <?= $details['left_house'] != '9999-12-31' ? 'Former ' : '' ?><?= $details['party'] ? $details['party'] . ' ' : '' ?><?= $details['rep_name'] ?><?= $details['cons'] ? ', ' . $details['cons'] : ''?> |
7 | - <?php if ( $details['entered_house'] || ( $details['left_house'] && $details['left_house'] != '9999-12-31' ) ) { ?> |
|
7 | + <?php if ($details['entered_house'] || ($details['left_house'] && $details['left_house'] != '9999-12-31')) { ?> |
|
8 | 8 | , <?= format_date($details['entered_house'], SHORTDATEFORMAT) ?> – <?= $details['left_house'] != '9999-12-31' ? format_date($details['left_house'], SHORTDATEFORMAT) : '' ?> |
9 | 9 | <?php } ?> |
10 | 10 | </p> |
@@ -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,25 +90,25 @@ 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 ) { ?> |
|
111 | + <?php if ($house != 2) { ?> |
|
112 | 112 | <?= isset($speaker['office']) ? ' - ' . join('; ', $speaker['office']) : '' ?> |
113 | 113 | <?php } ?> |
114 | 114 | <?php } else { // no $pid ?> |
@@ -116,7 +116,7 @@ discard block |
||
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') ?> |
@@ -111,7 +111,8 @@ |
||
111 | 111 | <?php if ( $house != 2 ) { ?> |
112 | 112 | <?= isset($speaker['office']) ? ' - ' . join('; ', $speaker['office']) : '' ?> |
113 | 113 | <?php } ?> |
114 | - <?php } else { // no $pid ?> |
|
114 | + <?php } else { |
|
115 | +// no $pid ?> |
|
115 | 116 | <?= $speaker['name'] ?> |
116 | 117 | <?php } ?> |
117 | 118 | </td> |
@@ -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> |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | Based on postcode <strong><?= $mp_data['postcode'] ?></strong> |
27 | 27 | <a href="<?= $mp_data['change_url'] ?>">(Change postcode)</a> |
28 | 28 | </p> |
29 | - <?php if ( isset( $mp_data ) && $type != 'mlas' ) { ?> |
|
29 | + <?php if (isset($mp_data) && $type != 'mlas') { ?> |
|
30 | 30 | <h3>Your <?= $mp_data['former'] ? $mp_data['former'] . ' ' : '' ?><?= $rep_name ?> is</h3> |
31 | 31 | </div> |
32 | 32 | <a href="<?= $mp_data['mp_url'] ?>" class="people-list__person"> |
@@ -34,23 +34,23 @@ discard block |
||
34 | 34 | <h2 class="people-list__person__name"><?= $mp_data['name'] ?></h2> |
35 | 35 | <p class="people-list__person__memberships"> |
36 | 36 | <span class="people-list__person__constituency"><?= $mp_data['constituency'] ?></span> |
37 | - <span class="people-list__person__party <?= strtolower( $mp_data['party'] ) ?>"><?= $mp_data['party'] ?></span> |
|
37 | + <span class="people-list__person__party <?= strtolower($mp_data['party']) ?>"><?= $mp_data['party'] ?></span> |
|
38 | 38 | </p> |
39 | 39 | </a> |
40 | 40 | <?php } |
41 | - if ( isset($reps) ) { |
|
42 | - if ( isset($mp_data) && $type != 'mlas' ) { ?> |
|
41 | + if (isset($reps)) { |
|
42 | + if (isset($mp_data) && $type != 'mlas') { ?> |
|
43 | 43 | <div class="people-list__your-mp__replist-header"> |
44 | 44 | <?php } ?> |
45 | 45 | <h3>Your <?=$former ?> <?= $rep_plural == 'MSPs' ? 'regional ' : '' ?><?= $rep_plural ?> are</h3> |
46 | 46 | </div> |
47 | - <?php foreach ( $reps as $rep ) { ?> |
|
47 | + <?php foreach ($reps as $rep) { ?> |
|
48 | 48 | <a href="<?= $rep['mp_url'] ?>" class="people-list__person"> |
49 | 49 | <img class="people-list__person__image" src="<?= $rep['image'] ?>"> |
50 | 50 | <h2 class="people-list__person__name"><?= $rep['name'] ?></h2> |
51 | 51 | <p class="people-list__person__memberships"> |
52 | 52 | <span class="people-list__person__constituency"><?= $rep['constituency'] ?></span> |
53 | - <span class="people-list__person__party <?= strtolower( $rep['party'] ) ?>"><?= $rep['party'] ?></span> |
|
53 | + <span class="people-list__person__party <?= strtolower($rep['party']) ?>"><?= $rep['party'] ?></span> |
|
54 | 54 | </p> |
55 | 55 | </a> |
56 | 56 | <?php } ?> |
@@ -65,9 +65,9 @@ discard block |
||
65 | 65 | <div class="search-page__section search-page__section--search"> |
66 | 66 | <div class="search-page__section__primary"> |
67 | 67 | <p class="search-page-main-inputs"> |
68 | - <?php if ( $type == 'peers' ) { ?> |
|
68 | + <?php if ($type == 'peers') { ?> |
|
69 | 69 | <label for="find-mp-by-name-or-postcode">Find <?= $rep_plural ?> by name:</label> |
70 | - <?php } elseif ( $type == 'mlas' || $type == 'msps' ) { ?> |
|
70 | + <?php } elseif ($type == 'mlas' || $type == 'msps') { ?> |
|
71 | 71 | <label for="find-mp-by-name-or-postcode">Find your <?= $rep_name ?> by postcode:</label> |
72 | 72 | <?php } else { ?> |
73 | 73 | <label for="find-mp-by-name-or-postcode">Find your <?= $rep_name ?> by name or postcode:</label> |
@@ -108,12 +108,12 @@ discard block |
||
108 | 108 | <div class="search-page__section__primary"> |
109 | 109 | <h2>All <?= $rep_plural ?></h2> |
110 | 110 | |
111 | - <?php if ( $type != 'peers' ) { ?> |
|
111 | + <?php if ($type != 'peers') { ?> |
|
112 | 112 | <ul class="search-result-display-options"> |
113 | - <?php if ( $order == 'given_name' ) { ?> |
|
113 | + <?php if ($order == 'given_name') { ?> |
|
114 | 114 | <li><strong>Sorted by</strong> First name</li> |
115 | 115 | <li>Sort by <a href="<?= $urls['by_last'] ?>">Last name</a> / <a href="<?= $urls['by_party'] ?>">Party</a></li> |
116 | - <?php } else if ( $order == 'party' ) { ?> |
|
116 | + <?php } else if ($order == 'party') { ?> |
|
117 | 117 | <li><strong>Sorted by</strong> Party</li> |
118 | 118 | <li>Sort by <a href="<?= $urls['by_first'] ?>">First name</a> / <a href="<?= $urls['by_last'] ?>">Last name</a></li> |
119 | 119 | <?php } else { ?> |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | </ul> |
124 | 124 | <?php } else { ?> |
125 | 125 | <ul class="search-result-display-options"> |
126 | - <?php if ( $order == 'party' ) { ?> |
|
126 | + <?php if ($order == 'party') { ?> |
|
127 | 127 | <li><strong>Sorted by</strong> Party</li> |
128 | 128 | <li>Sort by <a href="<?= $urls['by_name'] ?>">Name</a></li> |
129 | 129 | <?php } else { ?> |
@@ -173,10 +173,10 @@ discard block |
||
173 | 173 | } |
174 | 174 | } |
175 | 175 | $initial_link = ''; |
176 | - foreach ( $data as $person ) { |
|
176 | + foreach ($data as $person) { |
|
177 | 177 | if ($order != 'party') { |
178 | - $initial = substr( strtoupper($person[$a_to_z_key]), 0, 1); |
|
179 | - if ( $initial != $current_initial ) { |
|
178 | + $initial = substr(strtoupper($person[$a_to_z_key]), 0, 1); |
|
179 | + if ($initial != $current_initial) { |
|
180 | 180 | $current_initial = $initial; |
181 | 181 | $initial_link = "name=\"$initial\" "; |
182 | 182 | } else { |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | <img class="people-list__person__image" src="<?= $person['image'] ?>"> |
189 | 189 | <h2 class="people-list__person__name"><?= ucfirst($person['name']) ?></h2> |
190 | 190 | <p class="people-list__person__memberships"> |
191 | - <?php if ( $person['constituency'] ) { ?> |
|
191 | + <?php if ($person['constituency']) { ?> |
|
192 | 192 | <span class="people-list__person__constituency"><?= $person['constituency'] ?></span> |
193 | 193 | <?php } ?> |
194 | 194 | <span class="people-list__person__party <?= strtolower($person['party']) ?>"><?= $person['party'] ?></span> |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | <a href="<?= $urls['by_csv'] ?>">Download this list as a CSV</a> |
207 | 207 | suitable for Excel |
208 | 208 | </p> |
209 | - <?php if ( $type == 'mps' ) { ?> |
|
209 | + <?php if ($type == 'mps') { ?> |
|
210 | 210 | <form method="get" action="<?= $urls['plain'] ?>" class="sidebar-item-with-icon sidebar-item-with-icon--date"> |
211 | 211 | <p> |
212 | 212 | Or view a past list |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | }) |
251 | 251 | }); |
252 | 252 | </script> |
253 | - <?php } else if ( $type == 'msps' ) { ?> |
|
253 | + <?php } else if ($type == 'msps') { ?> |
|
254 | 254 | <p class="past-list-dates" id="past-list-dates"> |
255 | 255 | <a href="<?= $urls['plain'] ?>?date=2011-05-05">MSPs at 2011 election</a> |
256 | 256 | <a href="<?= $urls['plain'] ?>?date=2007-05-03">MSPs at 2007 election</a> |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | </p> |
265 | 265 | <?php } ?> |
266 | 266 | |
267 | - <?php include( dirname(__FILE__) . '/../sidebar/looking_for.php' ) ?> |
|
267 | + <?php include(dirname(__FILE__) . '/../sidebar/looking_for.php') ?> |
|
268 | 268 | </div> |
269 | 269 | </div> |
270 | 270 |
@@ -44,11 +44,11 @@ |
||
44 | 44 | ?></dt> |
45 | 45 | <dd> |
46 | 46 | <div class="appearance-date"> |
47 | - <div class="day"><?php echo format_date($row['hdate'], 'j' ) ?></div><!-- |
|
47 | + <div class="day"><?php echo format_date($row['hdate'], 'j') ?></div><!-- |
|
48 | 48 | <?php if ($year < $cur_year) { ?> |
49 | - --><div class="month"><?php echo format_date($row['hdate'], 'M y' ) ?></div> |
|
49 | + --><div class="month"><?php echo format_date($row['hdate'], 'M y') ?></div> |
|
50 | 50 | <?php } else { ?> |
51 | - --><div class="month"><?php echo format_date($row['hdate'], 'M' ) ?></div> |
|
51 | + --><div class="month"><?php echo format_date($row['hdate'], 'M') ?></div> |
|
52 | 52 | <?php } ?> |
53 | 53 | </div> |
54 | 54 |