@@ -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 | ?> |
@@ -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> |
@@ -10,7 +10,8 @@ |
||
10 | 10 | <?= trim_characters($recent['child']['body'], 0, 200) ?> |
11 | 11 | </p> |
12 | 12 | </li> |
13 | - <?php } else { ?> |
|
13 | + <?php } |
|
14 | +else { ?> |
|
14 | 15 | <li class="parliamentary-excerpt"> |
15 | 16 | <h3 class="excerpt__title"><?= $recent['desc'] ?></h3> |
16 | 17 | <?php foreach ( $recent['data'] as $date => $details ) { ?> |
@@ -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 | ?> |
@@ -39,13 +39,16 @@ discard block |
||
39 | 39 | // If we're just previewing a comment, we passed in 'preview' => true. |
40 | 40 | $subheading = 'Your annotation would look like this:'; |
41 | 41 | |
42 | -} elseif ($this_page == 'addcomment') { |
|
42 | +} |
|
43 | +elseif ($this_page == 'addcomment') { |
|
43 | 44 | $subheading = 'Previous annotations'; |
44 | 45 | |
45 | -} elseif ($this_page == 'commentreport' || $this_page == 'admin_commentreport') { |
|
46 | +} |
|
47 | +elseif ($this_page == 'commentreport' || $this_page == 'admin_commentreport') { |
|
46 | 48 | $subheading = ""; |
47 | 49 | |
48 | -} else { |
|
50 | +} |
|
51 | +else { |
|
49 | 52 | $subheading = 'Annotations'; |
50 | 53 | } |
51 | 54 | |
@@ -70,7 +73,8 @@ discard block |
||
70 | 73 | |
71 | 74 | if (isset($comment['comment_id'])) { |
72 | 75 | $id = 'c' . $comment['comment_id']; |
73 | - } else { |
|
76 | + } |
|
77 | + else { |
|
74 | 78 | $id = ''; |
75 | 79 | } |
76 | 80 | |
@@ -83,7 +87,8 @@ discard block |
||
83 | 87 | |
84 | 88 | if (!$comment['visible']) { |
85 | 89 | $reporthtml = ''; |
86 | - } elseif (($this_page != 'commentreport' && |
|
90 | + } |
|
91 | + elseif (($this_page != 'commentreport' && |
|
87 | 92 | $this_page != 'addcomment' && |
88 | 93 | $this_page != 'admin_commentreport') |
89 | 94 | && $THEUSER->is_able_to('reportcomment') |
@@ -102,9 +107,11 @@ discard block |
||
102 | 107 | |
103 | 108 | $reporthtml = '(<a href="' . $URL->generate() . '" title="Notify moderators that this annotation should be deleted">Report this annotation</a>)'; |
104 | 109 | |
105 | - } elseif ($comment['modflagged']) { |
|
110 | + } |
|
111 | + elseif ($comment['modflagged']) { |
|
106 | 112 | $reporthtml = '(This annotation has been reported to moderators)'; |
107 | - } else { |
|
113 | + } |
|
114 | + else { |
|
108 | 115 | // When previewing a comment... |
109 | 116 | $reporthtml = ''; |
110 | 117 | } |
@@ -125,7 +132,8 @@ discard block |
||
125 | 132 | if (isset($comment['url'])) { |
126 | 133 | print ' <a href="' . $comment['url'] . '" title="Link to this annotation">' . $time . '</a>'; |
127 | 134 | |
128 | - } else { |
|
135 | + } |
|
136 | + else { |
|
129 | 137 | // There won't be a URL when we're just previewing a comment. |
130 | 138 | print ' '.$time; |
131 | 139 | } |
@@ -138,7 +146,8 @@ discard block |
||
138 | 146 | // Make URLs into links and do <br>s. |
139 | 147 | $body = prepare_comment_for_display($comment['body']); // In utility.php |
140 | 148 | echo "<p class=\"comment\">$body</p>\n"; |
141 | - } else { |
|
149 | + } |
|
150 | + else { |
|
142 | 151 | print '<p class="comment"><em>This annotation has been removed</em></p>'."\n"; |
143 | 152 | } |
144 | 153 |
@@ -40,7 +40,8 @@ |
||
40 | 40 | // Get the name of the member whose epobject was commented upon (if any). |
41 | 41 | if (isset($comment['speaker']) && $comment['speaker']['name'] != '') { |
42 | 42 | $member_name = $comment['speaker']['name'] . ': '; |
43 | - } else { |
|
43 | + } |
|
44 | + else { |
|
44 | 45 | $member_name = ''; |
45 | 46 | } |
46 | 47 |
@@ -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> |
@@ -27,7 +27,8 @@ |
||
27 | 27 | </p> |
28 | 28 | <?php } ?> |
29 | 29 | </div> |
30 | - <?php } else { ?> |
|
30 | + <?php } |
|
31 | +else { ?> |
|
31 | 32 | <div class="business-section__primary"> |
32 | 33 | None. |
33 | 34 | </div> |