@@ -1,11 +1,11 @@ discard block |
||
1 | 1 | <div class="regional-header regional-header--<?= $current_assembly ?>"> |
2 | 2 | <div class="regional-header__overlay"></div> |
3 | - <div class="person-header <?= $this_page ?> <?= (isset($data['photo_attribution_text'])?'has-data-attribution':'') ?>"> |
|
3 | + <div class="person-header <?= $this_page ?> <?= (isset($data['photo_attribution_text']) ? 'has-data-attribution' : '') ?>"> |
|
4 | 4 | <div class="full-page__row"> |
5 | 5 | <div class="full-page__unit"> |
6 | 6 | <div class="person-header__content"> |
7 | 7 | <div class="person-name"> |
8 | - <?php if ( $image ) { ?> |
|
8 | + <?php if ($image) { ?> |
|
9 | 9 | <div class="mp-image"> |
10 | 10 | <img src="<?= $image['url'] ?>" height="48"> |
11 | 11 | </div> |
@@ -17,10 +17,10 @@ discard block |
||
17 | 17 | <?php } ?> |
18 | 18 | </div> |
19 | 19 | </div> |
20 | - <?php if($image && $image['exists']): ?> |
|
21 | - <?php if(isset($data['photo_attribution_text'])) { ?> |
|
20 | + <?php if ($image && $image['exists']): ?> |
|
21 | + <?php if (isset($data['photo_attribution_text'])) { ?> |
|
22 | 22 | <div class="person-data-attribution"> |
23 | - <?php if(isset($data['photo_attribution_link'])) { ?> |
|
23 | + <?php if (isset($data['photo_attribution_link'])) { ?> |
|
24 | 24 | Profile photo: <a href="<?= $data['photo_attribution_link'] ?>"><?= $data['photo_attribution_text'] ?></a> |
25 | 25 | <?php } else { ?> |
26 | 26 | Profile photo: <?= $data['photo_attribution_text'] ?> |
@@ -38,10 +38,10 @@ discard block |
||
38 | 38 | </div> |
39 | 39 | <?php endif; ?> |
40 | 40 | <div class="person-constituency"> |
41 | - <?php if ( $constituency && $this_page != 'peer' && $this_page != 'royal' ) { ?> |
|
41 | + <?php if ($constituency && $this_page != 'peer' && $this_page != 'royal') { ?> |
|
42 | 42 | <span class="constituency"><?= $constituency ?></span> |
43 | 43 | <?php } ?> |
44 | - <?php if ( $party ) { ?> |
|
44 | + <?php if ($party) { ?> |
|
45 | 45 | <span class="party <?= $party_short ?>"><?= $party ?></span> |
46 | 46 | <?php } ?> |
47 | 47 | </div> |
@@ -22,12 +22,14 @@ discard block |
||
22 | 22 | <div class="person-data-attribution"> |
23 | 23 | <?php if(isset($data['photo_attribution_link'])) { ?> |
24 | 24 | Profile photo: <a href="<?= $data['photo_attribution_link'] ?>"><?= $data['photo_attribution_text'] ?></a> |
25 | - <?php } else { ?> |
|
25 | + <?php } |
|
26 | +else { ?> |
|
26 | 27 | Profile photo: <?= $data['photo_attribution_text'] ?> |
27 | 28 | <?php } ?> |
28 | 29 | </div> |
29 | 30 | <?php } ?> |
30 | - <?php else: ?> |
|
31 | + <?php else { |
|
32 | + : ?> |
|
31 | 33 | <div class="person-data-attribution"> |
32 | 34 | We’re missing a photo of <?= $full_name ?>. If you have a |
33 | 35 | photo <em>that you can release under a Creative Commons Attribution-ShareAlike |
@@ -36,7 +38,9 @@ discard block |
||
36 | 38 | Please do not email us about copyrighted photos elsewhere on the internet; we can’t |
37 | 39 | use them. |
38 | 40 | </div> |
39 | - <?php endif; ?> |
|
41 | + <?php endif; |
|
42 | +} |
|
43 | +?> |
|
40 | 44 | <div class="person-constituency"> |
41 | 45 | <?php if ( $constituency && $this_page != 'peer' && $this_page != 'royal' ) { ?> |
42 | 46 | <span class="constituency"><?= $constituency ?></span> |
@@ -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 |
@@ -47,7 +47,8 @@ discard block |
||
47 | 47 | <div class="day"><?php echo format_date($row['hdate'], 'j' ) ?></div><!-- |
48 | 48 | <?php if ($year < $cur_year) { ?> |
49 | 49 | --><div class="month"><?php echo format_date($row['hdate'], 'M y' ) ?></div> |
50 | - <?php } else { ?> |
|
50 | + <?php } |
|
51 | +else { ?> |
|
51 | 52 | --><div class="month"><?php echo format_date($row['hdate'], 'M' ) ?></div> |
52 | 53 | <?php } ?> |
53 | 54 | </div> |
@@ -61,7 +62,8 @@ discard block |
||
61 | 62 | |
62 | 63 | <?php |
63 | 64 | |
64 | -} else { ?> |
|
65 | +} |
|
66 | +else { ?> |
|
65 | 67 | <p>No data to display.</p> |
66 | 68 | <?php |
67 | 69 | } |
@@ -13,7 +13,7 @@ |
||
13 | 13 | |
14 | 14 | <div class="row"> |
15 | 15 | <span class="label">Website</span> |
16 | - <span class="formw"><?= $website == '' ? 'none' : '<a href="' . _htmlentities($website) . '">'. _htmlentities($website) . '</a>' ?></span> |
|
16 | + <span class="formw"><?= $website == '' ? 'none' : '<a href="' . _htmlentities($website) . '">' . _htmlentities($website) . '</a>' ?></span> |
|
17 | 17 | </div> |
18 | 18 | |
19 | 19 | <div class="row"> |
@@ -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> |
@@ -30,7 +30,8 @@ discard block |
||
30 | 30 | <meta property="og:image:width" content="1000"> |
31 | 31 | <meta property="og:image:height" content="500"> |
32 | 32 | <meta property="og:type" content="profile"> |
33 | - <?php } else { ?> |
|
33 | + <?php } |
|
34 | +else { ?> |
|
34 | 35 | <meta property="og:type" content="website"> |
35 | 36 | <meta property="og:image" content="https://<?= DOMAIN ?>/images/facebook-avatar.png"> |
36 | 37 | <meta property="og:image:width" content="200"> |
@@ -174,11 +175,14 @@ discard block |
||
174 | 175 | <div class="banner__content"> |
175 | 176 | <?php if ($country == 'NZ') { ?> |
176 | 177 | You’re in New Zealand, so check out <a href="http://www.theyworkforyou.co.nz">TheyWorkForYou.co.nz</a> |
177 | - <?php } elseif ($country == 'AU') { ?> |
|
178 | + <?php } |
|
179 | +elseif ($country == 'AU') { ?> |
|
178 | 180 | You’re in Australia, so check out <a href="http://www.openaustralia.org">OpenAustralia</a>, a TheyWorkForYou for down under |
179 | - <?php } elseif ($country == 'IE') { ?> |
|
181 | + <?php } |
|
182 | +elseif ($country == 'IE') { ?> |
|
180 | 183 | Check out <a href="https://www.kildarestreet.com/">KildareStreet</a>, a TheyWorkForYou for the Houses of the Oireachtas |
181 | - <?php } elseif ($country == 'CA') { ?> |
|
184 | + <?php } |
|
185 | +elseif ($country == 'CA') { ?> |
|
182 | 186 | Check out <a href="https://openparliament.ca/">OpenParliament.ca</a> |
183 | 187 | <?php } ?> |
184 | 188 | </div> |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | // $data['info'] may have 'onday', a 'yyyy-mm-dd' date which indicates |
24 | 24 | // which date will be highlighted (otherwise, today is). |
25 | 25 | |
26 | -include_once INCLUDESPATH."easyparliament/recess.php"; |
|
26 | +include_once INCLUDESPATH . "easyparliament/recess.php"; |
|
27 | 27 | global $PAGE, $DATA, $this_page, $hansardmajors; |
28 | 28 | |
29 | 29 | twfy_debug("TEMPLATE", "hansard_calendar.php"); |
@@ -40,13 +40,13 @@ discard block |
||
40 | 40 | |
41 | 41 | |
42 | 42 | // Create array containing abbreviations of days of week. |
43 | - $daysOfWeek = array('Mon','Tue','Wed','Thu','Fri','Sat','Sun'); |
|
43 | + $daysOfWeek = array('Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'); |
|
44 | 44 | |
45 | 45 | // What is the first day of the month in question? |
46 | - $firstDayOfMonth = mktime(0,0,0,$month,1,$year); |
|
46 | + $firstDayOfMonth = mktime(0, 0, 0, $month, 1, $year); |
|
47 | 47 | |
48 | 48 | // How many days does this month contain? |
49 | - $numberDays = date('t',$firstDayOfMonth); |
|
49 | + $numberDays = date('t', $firstDayOfMonth); |
|
50 | 50 | |
51 | 51 | // Retrieve some information about the first day of the |
52 | 52 | // month in question. |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | if (isset($data['info']['onday'])) { |
61 | 61 | // 'onday' is like 'yyyy-mm-dd'. |
62 | 62 | $datebits = explode('-', $data['info']['onday']); |
63 | - if (count($datebits)>2 && $datebits[0] == $year && $datebits[1] == $month) { |
|
63 | + if (count($datebits) > 2 && $datebits[0] == $year && $datebits[1] == $month) { |
|
64 | 64 | $toDay = $datebits[2]; |
65 | 65 | } else { |
66 | 66 | $toDay = ''; |
@@ -149,11 +149,11 @@ discard block |
||
149 | 149 | // sittings - e.g. WH is only Tuesday-Thursday |
150 | 150 | if ($currentDay == $toDay) { |
151 | 151 | print '<td class="on"'; |
152 | - if ($recess[0] && $recess[0]!=1) print ' title="'.$recess[0].'"'; |
|
152 | + if ($recess[0] && $recess[0] != 1) print ' title="' . $recess[0] . '"'; |
|
153 | 153 | print '>'; |
154 | 154 | } elseif ($recess[0]) { |
155 | 155 | print '<td class="no"'; |
156 | - if ($recess[0]!=1) print ' title="'.$recess[0].'"'; |
|
156 | + if ($recess[0] != 1) print ' title="' . $recess[0] . '"'; |
|
157 | 157 | print '>'; |
158 | 158 | } else { |
159 | 159 | print '<td>'; |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | |
162 | 162 | // Is the $currentDay a member of $dates? If so, |
163 | 163 | // the day should be linked. |
164 | - if (in_array($currentDay,$dates)) { |
|
164 | + if (in_array($currentDay, $dates)) { |
|
165 | 165 | |
166 | 166 | $date = sprintf("%04d-%02d-%02d", $year, $month, $currentDay); |
167 | 167 |
@@ -62,17 +62,20 @@ discard block |
||
62 | 62 | $datebits = explode('-', $data['info']['onday']); |
63 | 63 | if (count($datebits)>2 && $datebits[0] == $year && $datebits[1] == $month) { |
64 | 64 | $toDay = $datebits[2]; |
65 | - } else { |
|
65 | + } |
|
66 | + else { |
|
66 | 67 | $toDay = ''; |
67 | 68 | } |
68 | - } else { |
|
69 | + } |
|
70 | + else { |
|
69 | 71 | // If this calendar is for this current, real world, month |
70 | 72 | // we get the value of today, so we can highlight it. |
71 | 73 | $nowDateComponents = getdate(); |
72 | 74 | |
73 | 75 | if ($nowDateComponents['year'] == $year && $nowDateComponents['mon'] == $month) { |
74 | 76 | $toDay = $nowDateComponents['mday']; |
75 | - } else { |
|
77 | + } |
|
78 | + else { |
|
76 | 79 | $toDay = ''; |
77 | 80 | } |
78 | 81 | } |
@@ -135,12 +138,17 @@ discard block |
||
135 | 138 | } |
136 | 139 | |
137 | 140 | $recess_major = 1; # For all of UK Parliament |
138 | - if ($hansardmajors[$data['info']['major']]['location'] == 'NI') |
|
139 | - $recess_major = 5; |
|
140 | - elseif ($hansardmajors[$data['info']['major']]['location'] == 'Scotland') |
|
141 | - $recess_major = 4; # For all of Scotland |
|
142 | - elseif ($data['info']['major'] == 101) |
|
143 | - $recess_major = 101; # Lords slightly different |
|
141 | + if ($hansardmajors[$data['info']['major']]['location'] == 'NI') { |
|
142 | + $recess_major = 5; |
|
143 | + } |
|
144 | + elseif ($hansardmajors[$data['info']['major']]['location'] == 'Scotland') { |
|
145 | + $recess_major = 4; |
|
146 | + } |
|
147 | + # For all of Scotland |
|
148 | + elseif ($data['info']['major'] == 101) { |
|
149 | + $recess_major = 101; |
|
150 | + } |
|
151 | + # Lords slightly different |
|
144 | 152 | $recess = recess_prettify($currentDay, $month, $year, $recess_major); |
145 | 153 | |
146 | 154 | // Is this day actually Today in the real world? |
@@ -149,13 +157,19 @@ discard block |
||
149 | 157 | // sittings - e.g. WH is only Tuesday-Thursday |
150 | 158 | if ($currentDay == $toDay) { |
151 | 159 | print '<td class="on"'; |
152 | - if ($recess[0] && $recess[0]!=1) print ' title="'.$recess[0].'"'; |
|
160 | + if ($recess[0] && $recess[0]!=1) { |
|
161 | + print ' title="'.$recess[0].'"'; |
|
162 | + } |
|
153 | 163 | print '>'; |
154 | - } elseif ($recess[0]) { |
|
164 | + } |
|
165 | + elseif ($recess[0]) { |
|
155 | 166 | print '<td class="no"'; |
156 | - if ($recess[0]!=1) print ' title="'.$recess[0].'"'; |
|
167 | + if ($recess[0]!=1) { |
|
168 | + print ' title="'.$recess[0].'"'; |
|
169 | + } |
|
157 | 170 | print '>'; |
158 | - } else { |
|
171 | + } |
|
172 | + else { |
|
159 | 173 | print '<td>'; |
160 | 174 | } |
161 | 175 | |
@@ -167,14 +181,16 @@ discard block |
||
167 | 181 | |
168 | 182 | if ($currentDay == $toDay) { |
169 | 183 | print '<span>' . $currentDay . '</span></td>'; |
170 | - } else { |
|
184 | + } |
|
185 | + else { |
|
171 | 186 | $DAYURL->insert(array('d'=>$date)); |
172 | 187 | print "<a href=\"" . $DAYURL->generate() . "\">$currentDay</a></td>"; |
173 | 188 | } |
174 | 189 | |
175 | 190 | // $currentDay is not a member of $dates. |
176 | 191 | |
177 | - } else { |
|
192 | + } |
|
193 | + else { |
|
178 | 194 | |
179 | 195 | print '<span>' . $currentDay . '</span></td>'; |
180 | 196 | } |
@@ -212,7 +228,8 @@ discard block |
||
212 | 228 | print '<p><a href="' . $URL->generate() . '">See all of ' . $year . '</a></p>'; |
213 | 229 | } |
214 | 230 | } |
215 | -} else { |
|
231 | +} |
|
232 | +else { |
|
216 | 233 | ?> |
217 | 234 | <p>There is no data, sorry.</p> |
218 | 235 | <?php |
@@ -43,7 +43,8 @@ |
||
43 | 43 | </form> |
44 | 44 | |
45 | 45 | <a href="<?= $fb_login_url ?>">Log in with Facebook!</a> </div> <!-- end .main --> |
46 | - <?php } else { ?> |
|
46 | + <?php } |
|
47 | +else { ?> |
|
47 | 48 | |
48 | 49 | // ASK FOR POSTCODE |
49 | 50 | <?php } ?> |
@@ -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 |
@@ -14,7 +14,8 @@ discard block |
||
14 | 14 | <a class="homepage-search__change-postcode" href="<?= $mp_data['change_url'] ?>">Change postcode</a> |
15 | 15 | </div> |
16 | 16 | </div> |
17 | - <?php } else { ?> |
|
17 | + <?php } |
|
18 | +else { ?> |
|
18 | 19 | <h1>Does your MP represent you?</h1> |
19 | 20 | <div class="row collapse"> |
20 | 21 | <form action="/postcode/" class="mp-search__form" onsubmit="trackFormSubmit(this, 'PostcodeSearch', 'Submit', 'Home'); return false;"> |
@@ -47,7 +48,8 @@ discard block |
||
47 | 48 | <div class="homepage-in-the-news homepage-content-section"> |
48 | 49 | <?php if ( count($featured) > 0 ) { |
49 | 50 | include 'homepage/featured.php'; |
50 | - } else { ?> |
|
51 | + } |
|
52 | + else { ?> |
|
51 | 53 | No debates found. |
52 | 54 | <?php } ?> |
53 | 55 | |
@@ -148,10 +150,10 @@ discard block |
||
148 | 150 | <p class="meta"><?php |
149 | 151 | $meta_items = array(); |
150 | 152 | $meta_items[] = $events[$i]['debate_type']; |
151 | - if( isset($events[$i]['time_start']) && $events[$i]['time_start'] != '00:00:00' ){ |
|
153 | + if( isset($events[$i]['time_start']) && $events[$i]['time_start'] != '00:00:00' ) { |
|
152 | 154 | $times = format_time($events[$i]['time_start'], 'g:i a'); |
153 | 155 | |
154 | - if( isset($events[$i]['time_end']) && $events[$i]['time_end'] != '00:00:00' ){ |
|
156 | + if( isset($events[$i]['time_end']) && $events[$i]['time_end'] != '00:00:00' ) { |
|
155 | 157 | $times = $times . ' - ' . format_time($events[$i]['time_end'], 'g:i a'); |
156 | 158 | } |
157 | 159 | $meta_items[] = $times; |
@@ -169,7 +171,8 @@ discard block |
||
169 | 171 | <?php } ?> |
170 | 172 | </div> |
171 | 173 | <?php } ?> |
172 | - <?php } else { |
|
174 | + <?php } |
|
175 | +else { |
|
173 | 176 | list($recess, $from, $to) = recess_prettify(date('j'), date('n'), date('Y'), 1); |
174 | 177 | if ( $recess ) { ?> |
175 | 178 | <p> |
@@ -177,7 +180,8 @@ discard block |
||
177 | 180 | Follow us on <a href="https://twitter.com/theyworkforyou">Twitter</a> and you'll |
178 | 181 | be the first to know when they're back in session. |
179 | 182 | </p> |
180 | - <?php } else { ?> |
|
183 | + <?php } |
|
184 | +else { ?> |
|
181 | 185 | <p> |
182 | 186 | We don’t have details of any upcoming events. |
183 | 187 | </p> |
@@ -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 |
@@ -39,14 +39,16 @@ |
||
39 | 39 | |
40 | 40 | if ($info['view'] == 'recent') { |
41 | 41 | $title = $info['num'] . ' most recent trackbacks'; |
42 | - } else { |
|
42 | + } |
|
43 | + else { |
|
43 | 44 | $title = 'Some sites linking to this page'; |
44 | 45 | } |
45 | 46 | |
46 | 47 | if (!$PAGE->within_stripe()) { |
47 | 48 | $PAGE->stripe_start(); |
48 | 49 | $stripe_must_be_ended = true; |
49 | - } else { |
|
50 | + } |
|
51 | + else { |
|
50 | 52 | $stripe_must_be_ended = false; |
51 | 53 | } |
52 | 54 | ?> |