@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | }(document, 'script', 'facebook-jssdk')); |
159 | 159 | </script> |
160 | 160 | |
161 | - <?php if ( $banner_text ) { ?> |
|
161 | + <?php if ($banner_text) { ?> |
|
162 | 162 | <div class="banner"> |
163 | 163 | <div class="full-page__row"> |
164 | 164 | <div class="banner__content"> |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | <img src="/style/img/[email protected]" width="24" height="24" alt=""><span>Your Profile</span> |
228 | 228 | </a> |
229 | 229 | <ul id="nav-user"> |
230 | - <?php foreach ($user_nav_links as $nav_link){ ?> |
|
230 | + <?php foreach ($user_nav_links as $nav_link) { ?> |
|
231 | 231 | <li><a href="<?= $nav_link['href']; ?>" title="<?= $nav_link['title']; ?>" class="<?= $nav_link['classes']; ?>"><?= $nav_link['text'] ?></a></li> |
232 | 232 | <?php } ?> |
233 | 233 | </ul> |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | <div class="full-page legacy-page static-page"> |
249 | 249 | <div class="full-page__row"> |
250 | 250 | <div class="panel"> |
251 | - <?php foreach ( $page_errors as $error ) { ?> |
|
251 | + <?php foreach ($page_errors as $error) { ?> |
|
252 | 252 | <p><?= $error['text'] ?></p> |
253 | 253 | <?php } ?> |
254 | 254 | </div> |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | <div class="panel panel--flushtop clearfix"> |
46 | 46 | <div class="row nested-row"> |
47 | 47 | <div class="homepage-in-the-news homepage-content-section"> |
48 | - <?php if ( count($featured) > 0 ) { |
|
48 | + <?php if (count($featured) > 0) { |
|
49 | 49 | include 'homepage/featured.php'; |
50 | 50 | } else { ?> |
51 | 51 | No debates found. |
@@ -108,14 +108,14 @@ discard block |
||
108 | 108 | <div class="homepage-recently homepage-content-section"> |
109 | 109 | <h2>Recently in Parliament</h2> |
110 | 110 | <ul class="recently__list"><?php |
111 | - foreach ( $debates['recent'] as $recent ) { |
|
111 | + foreach ($debates['recent'] as $recent) { |
|
112 | 112 | include 'homepage/recent-debates.php'; |
113 | 113 | } |
114 | 114 | ?></ul> |
115 | 115 | </div> |
116 | 116 | <div class="homepage-upcoming homepage-content-section"> |
117 | 117 | <h2>Upcoming</h2> |
118 | - <?php if ( count($calendar) ) { ?> |
|
118 | + <?php if (count($calendar)) { ?> |
|
119 | 119 | <div class="upcoming__controls"> |
120 | 120 | <!-- |
121 | 121 | These controls should make the upcoming section slide to the next day. |
@@ -134,24 +134,24 @@ discard block |
||
134 | 134 | </div> |
135 | 135 | </div> |
136 | 136 | <?php $first = true; $count = 0; |
137 | - foreach ( $calendar as $date => $places ) { |
|
137 | + foreach ($calendar as $date => $places) { |
|
138 | 138 | $count++; ?> |
139 | 139 | <div class="cal-wrapper <?= $first ? 'visible' : 'hidden' ?>" id="day-<?= $count ?>" data-count="<?= $count ?>" data-date="<?= format_date($date, SHORTDATEFORMAT); ?>"> |
140 | 140 | <?php foreach ($places as $place => $events) { ?> |
141 | 141 | <?php $first = false; ?> |
142 | 142 | <h3><?= $place ?></h3> |
143 | 143 | <ul class="upcoming__list"> |
144 | - <?php for ( $i = 0; $i < 3; $i++ ) { |
|
145 | - if ( isset( $events[$i] ) ) { ?> |
|
144 | + <?php for ($i = 0; $i < 3; $i++) { |
|
145 | + if (isset($events[$i])) { ?> |
|
146 | 146 | <li> |
147 | 147 | <h4 class="upcoming__title"><a href="<?= $events[$i]['link_external'] ?>"><?= $events[$i]['title'] ?></a></h4> |
148 | 148 | <p class="meta"><?php |
149 | 149 | $meta_items = array(); |
150 | 150 | $meta_items[] = $events[$i]['debate_type']; |
151 | - if( isset($events[$i]['time_start']) && $events[$i]['time_start'] != '00:00:00' ){ |
|
151 | + if (isset($events[$i]['time_start']) && $events[$i]['time_start'] != '00:00:00') { |
|
152 | 152 | $times = format_time($events[$i]['time_start'], 'g:i a'); |
153 | 153 | |
154 | - if( isset($events[$i]['time_end']) && $events[$i]['time_end'] != '00:00:00' ){ |
|
154 | + if (isset($events[$i]['time_end']) && $events[$i]['time_end'] != '00:00:00') { |
|
155 | 155 | $times = $times . ' - ' . format_time($events[$i]['time_end'], 'g:i a'); |
156 | 156 | } |
157 | 157 | $meta_items[] = $times; |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | <?php } ?> |
164 | 164 | <?php } ?> |
165 | 165 | </ul> |
166 | - <?php if ( count($events) - 3 > 0 ) { ?> |
|
166 | + <?php if (count($events) - 3 > 0) { ?> |
|
167 | 167 | <a href="/calendar/?d=<?= format_date($date, 'Y-m-d') ?>" class="upcoming__more">And <?= count($events) - 3 ?> more</a><!-- (just links to relevant upcoming page) --> |
168 | 168 | <?php } ?> |
169 | 169 | <?php } ?> |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | <?php } ?> |
172 | 172 | <?php } else { |
173 | 173 | list($recess, $from, $to) = recess_prettify(date('j'), date('n'), date('Y'), 1); |
174 | - if ( $recess ) { ?> |
|
174 | + if ($recess) { ?> |
|
175 | 175 | <p> |
176 | 176 | Parliament is on holiday until <?= format_date($to, LONGERDATEFORMAT) ?>. |
177 | 177 | Follow us on <a href="https://twitter.com/theyworkforyou">Twitter</a> and you'll |
@@ -148,10 +148,10 @@ |
||
148 | 148 | <p class="meta"><?php |
149 | 149 | $meta_items = array(); |
150 | 150 | $meta_items[] = $events[$i]['debate_type']; |
151 | - if( isset($events[$i]['time_start']) && $events[$i]['time_start'] != '00:00:00' ){ |
|
151 | + if( isset($events[$i]['time_start']) && $events[$i]['time_start'] != '00:00:00' ) { |
|
152 | 152 | $times = format_time($events[$i]['time_start'], 'g:i a'); |
153 | 153 | |
154 | - if( isset($events[$i]['time_end']) && $events[$i]['time_end'] != '00:00:00' ){ |
|
154 | + if( isset($events[$i]['time_end']) && $events[$i]['time_end'] != '00:00:00' ) { |
|
155 | 155 | $times = $times . ' - ' . format_time($events[$i]['time_end'], 'g:i a'); |
156 | 156 | } |
157 | 157 | $meta_items[] = $times; |
@@ -42,7 +42,7 @@ |
||
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 |
@@ -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 | 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> |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | if (!$comment['visible']) { |
85 | 85 | $reporthtml = ''; |
86 | 86 | } elseif (($this_page != 'commentreport' && |
87 | - $this_page != 'addcomment' && |
|
87 | + $this_page != 'addcomment' && |
|
88 | 88 | $this_page != 'admin_commentreport') |
89 | 89 | && $THEUSER->is_able_to('reportcomment') |
90 | 90 | && $THEUSER->user_id() != $comment['user_id'] |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | $date = format_date($date, SHORTDATEFORMAT); |
120 | 120 | $time = format_time($time, TIMEFORMAT); |
121 | 121 | ?> |
122 | - <p class="credit"><a href="<?php echo $USERURL->generate(); ?>" title="See information about this user"><strong><?php echo _htmlentities($comment['firstname']) .' '. _htmlentities($comment['lastname']); ?></strong></a><br> |
|
122 | + <p class="credit"><a href="<?php echo $USERURL->generate(); ?>" title="See information about this user"><strong><?php echo _htmlentities($comment['firstname']) . ' ' . _htmlentities($comment['lastname']); ?></strong></a><br> |
|
123 | 123 | <small>Posted on <?php echo $date; |
124 | 124 | |
125 | 125 | if (isset($comment['url'])) { |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | |
128 | 128 | } else { |
129 | 129 | // There won't be a URL when we're just previewing a comment. |
130 | - print ' '.$time; |
|
130 | + print ' ' . $time; |
|
131 | 131 | } |
132 | 132 | ?> <?php echo $reporthtml; ?></small></p> |
133 | 133 | |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | $body = prepare_comment_for_display($comment['body']); // In utility.php |
140 | 140 | echo "<p class=\"comment\">$body</p>\n"; |
141 | 141 | } else { |
142 | - print '<p class="comment"><em>This annotation has been removed</em></p>'."\n"; |
|
142 | + print '<p class="comment"><em>This annotation has been removed</em></p>' . "\n"; |
|
143 | 143 | } |
144 | 144 | |
145 | 145 | ?> |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | </div> |
7 | 7 | |
8 | 8 | <?php |
9 | - if ( isset($content['data']['data']) ) { |
|
9 | + if (isset($content['data']['data'])) { |
|
10 | 10 | $data = $content['data']['data']; |
11 | 11 | include '_business_list.php'; ?> |
12 | 12 | <div class="business-section__secondary"> |
@@ -17,11 +17,11 @@ discard block |
||
17 | 17 | <?php |
18 | 18 | $calendar = $content['calendar']['years']; |
19 | 19 | include '_calendar_section.php'; |
20 | - if ( !isset($no_survey) ) { |
|
21 | - include( dirname(__FILE__) . '/../sidebar/looking_for.php' ); |
|
20 | + if (!isset($no_survey)) { |
|
21 | + include(dirname(__FILE__) . '/../sidebar/looking_for.php'); |
|
22 | 22 | } |
23 | 23 | ?> |
24 | - <?php if ( isset($content['rssurl']) ) { ?> |
|
24 | + <?php if (isset($content['rssurl'])) { ?> |
|
25 | 25 | <p class="rss-feed"> |
26 | 26 | <a href="<?= WEBPATH . $content['rssurl'] ?>">RSS feed of <?= $title ?></a> |
27 | 27 | </p> |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | <ul class="business-list"> |
25 | 25 | <?php |
26 | 26 | $first = 0; |
27 | - foreach ( $rows as $row ) { ?> |
|
27 | + foreach ($rows as $row) { ?> |
|
28 | 28 | <li> |
29 | 29 | <a href="<?= $row['url'] ?>" class="business-list__title"> |
30 | 30 | <h3> |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | </div> |
43 | 43 | <div class="business-section__secondary"> |
44 | 44 | <div class="calendar__controls"> |
45 | - <?php if ( isset($prev) ) { ?> |
|
45 | + <?php if (isset($prev)) { ?> |
|
46 | 46 | <a href="<?= $prev['url'] ?>" class="calendar__controls__previous">←</a> |
47 | 47 | <?php } else { ?> |
48 | 48 | <span class="calendar__controls__previous"> </span> |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | <span class="calendar__controls__current"> |
51 | 51 | <?= $session ?> session |
52 | 52 | </span> |
53 | - <?php if ( isset($next) ) { ?> |
|
53 | + <?php if (isset($next)) { ?> |
|
54 | 54 | <a href="<?= $next['url'] ?>" class="calendar__controls__next">→</a> |
55 | 55 | <?php } else { ?> |
56 | 56 | <span class="calendar__controls__next"> </span> |
@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | <ul class="business-list"> |
25 | 25 | <?php |
26 | 26 | $first = 0; |
27 | - foreach ( $content['rows'] as $row ) { |
|
28 | - if ( $row['htype'] == 10 ) { |
|
29 | - if ( !$first ) { |
|
27 | + foreach ($content['rows'] as $row) { |
|
28 | + if ($row['htype'] == 10) { |
|
29 | + if (!$first) { |
|
30 | 30 | print '</li>'; |
31 | 31 | $first = 1; |
32 | 32 | } ?> |
@@ -37,16 +37,16 @@ discard block |
||
37 | 37 | </h3> |
38 | 38 | </a> |
39 | 39 | <p class="business-list__meta"> |
40 | - <?php if ( isset($row['sitting']) ) { ?> |
|
40 | + <?php if (isset($row['sitting'])) { ?> |
|
41 | 41 | <?= make_ranking($row['sitting']) ?> sitting · |
42 | 42 | <?php } ?> |
43 | - <?= format_date($row['hdate'], LONGERDATEFORMAT ) ?> |
|
44 | - <?php if ( $row['contentcount'] > 0 ) { ?> |
|
43 | + <?= format_date($row['hdate'], LONGERDATEFORMAT) ?> |
|
44 | + <?php if ($row['contentcount'] > 0) { ?> |
|
45 | 45 | · <?= $row['contentcount'] == 1 ? '1 speech' : $row['contentcount'] . ' speeches' ?> |
46 | 46 | <?php } ?> |
47 | 47 | </p> |
48 | 48 | <p class="business-list__excerpt"> |
49 | - <?= trim_characters($row['excerpt'], 0, 200 ) ?> |
|
49 | + <?= trim_characters($row['excerpt'], 0, 200) ?> |
|
50 | 50 | </p> |
51 | 51 | <?php } else { ?> |
52 | 52 | <ul> |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | <?= $row['contentcount'] == 1 ? '1 speech' : $row['contentcount'] . ' speeches' ?> |
62 | 62 | </p> |
63 | 63 | <?php } ?> |
64 | - <?php if ( isset($row['excerpt']) ) { ?> |
|
64 | + <?php if (isset($row['excerpt'])) { ?> |
|
65 | 65 | <p class="business-list__excerpt"> |
66 | 66 | <?= trim_characters($row['excerpt'], 0, 200) ?> |
67 | 67 | </p> |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | </ul> |
74 | 74 | </div> |
75 | 75 | |
76 | - <?php if ( isset($content['info']['committee']) ) { |
|
76 | + <?php if (isset($content['info']['committee'])) { |
|
77 | 77 | $committee = $content['info']['committee']; |
78 | 78 | ?> |
79 | 79 | <div class="business-section__secondary"> |
@@ -85,13 +85,13 @@ discard block |
||
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> |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <a href="<?= $item['list_url'] ?>" class="business-list__title"> |
2 | 2 | <h3> |
3 | - <?php if ( isset( $item['parent'] ) ) { ?> |
|
3 | + <?php if (isset($item['parent'])) { ?> |
|
4 | 4 | <?= $item['parent']['body'] ?> |
5 | 5 | <br><?= $item['body'] ?> |
6 | 6 | <?php } else { ?> |
@@ -9,14 +9,14 @@ discard block |
||
9 | 9 | </h3> |
10 | 10 | <span class="business-list__meta"> |
11 | 11 | <?= format_date($item['hdate'], LONGERDATEFORMAT) ?> |
12 | - <?= isset($item['contentcount']) ? '· ' . $item['contentcount'] . ( $item['contentcount'] == 1 ? ' speech' : ' speeches' ) : '' ?> |
|
12 | + <?= isset($item['contentcount']) ? '· ' . $item['contentcount'] . ($item['contentcount'] == 1 ? ' speech' : ' speeches') : '' ?> |
|
13 | 13 | </span> |
14 | 14 | </a> |
15 | -<?php if ( isset( $item['child'] ) ) { ?> |
|
15 | +<?php if (isset($item['child'])) { ?> |
|
16 | 16 | <p class="business-list__excerpt"> |
17 | - <?php if ( isset($item['child']['speaker']) && count($item['child']['speaker']) > 0 ) { ?> |
|
17 | + <?php if (isset($item['child']['speaker']) && count($item['child']['speaker']) > 0) { ?> |
|
18 | 18 | <a href="<?= $item['child']['speaker']['url'] ?>"><?= $item['child']['speaker']['name'] ?></a> |
19 | 19 | <?php } ?> |
20 | - <?= strip_tags(trim_characters( $item['child']['body'], 0, 200 )) ?> |
|
20 | + <?= strip_tags(trim_characters($item['child']['body'], 0, 200)) ?> |
|
21 | 21 | </p> |
22 | 22 | <?php } ?> |