@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | } |
70 | 70 | |
71 | 71 | if (isset($comment['comment_id'])) { |
72 | - $id = 'c' . $comment['comment_id']; |
|
72 | + $id = 'c'.$comment['comment_id']; |
|
73 | 73 | } else { |
74 | 74 | $id = ''; |
75 | 75 | } |
@@ -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'] |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | 'ret' => $comment['url'] |
101 | 101 | )); |
102 | 102 | |
103 | - $reporthtml = '(<a href="' . $URL->generate() . '" title="Notify moderators that this annotation should be deleted">Report this annotation</a>)'; |
|
103 | + $reporthtml = '(<a href="'.$URL->generate().'" title="Notify moderators that this annotation should be deleted">Report this annotation</a>)'; |
|
104 | 104 | |
105 | 105 | } elseif ($comment['modflagged']) { |
106 | 106 | $reporthtml = '(This annotation has been reported to moderators)'; |
@@ -119,11 +119,11 @@ 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'])) { |
126 | - print ' <a href="' . $comment['url'] . '" title="Link to this annotation">' . $time . '</a>'; |
|
126 | + print ' <a href="'.$comment['url'].'" title="Link to this annotation">'.$time.'</a>'; |
|
127 | 127 | |
128 | 128 | } else { |
129 | 129 | // There won't be a URL when we're just previewing a comment. |
@@ -1,5 +1,5 @@ discard block |
||
1 | - <?php if ( isset($mini_survey) ) { |
|
2 | - if ( $mini_survey['show'] ) { ?> |
|
1 | + <?php if (isset($mini_survey)) { |
|
2 | + if ($mini_survey['show']) { ?> |
|
3 | 3 | <form class="minisurvey" method="post" action="<?=OPTION_SURVEY_URL?>"> |
4 | 4 | <p>Did you find what you were looking for?</p> |
5 | 5 | <input type="hidden" name="sourceidentifier" value="twfy-mini-2"> |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | |
18 | 18 | <input type="submit" value="Submit answer"> |
19 | 19 | </form> |
20 | - <?php } else if ( $mini_survey['answered'] ) { ?> |
|
20 | + <?php } else if ($mini_survey['answered']) { ?> |
|
21 | 21 | <p>Thanks for answering</p> |
22 | 22 | <?php } ?> |
23 | 23 | <?php } ?> |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $USERURL->insert(array('u'=>$comment['user_id'])); |
78 | 78 | ?> |
79 | 79 | <div class="comment"> |
80 | - <p><a href="<?php echo $USERURL->generate(); ?>" title="See information about this user"><strong><?php echo _htmlentities($comment['firstname']) .' '. _htmlentities($comment['lastname']); ?></strong></a><br> |
|
80 | + <p><a href="<?php echo $USERURL->generate(); ?>" title="See information about this user"><strong><?php echo _htmlentities($comment['firstname']).' '._htmlentities($comment['lastname']); ?></strong></a><br> |
|
81 | 81 | <?php |
82 | 82 | // Make URLs into links and do <br>s. |
83 | 83 | $body = prepare_comment_for_display($comment['body']); // In utility.php |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | } |
106 | 106 | |
107 | 107 | if (($this_page != 'commentreport' && |
108 | - $this_page != 'addcomment' && |
|
108 | + $this_page != 'addcomment' && |
|
109 | 109 | $this_page != 'admin_commentreport') |
110 | 110 | && $THEUSER->is_able_to('reportcomment') |
111 | 111 | && !$comment['modflagged'] |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | <meta name="keywords" content="<?= _htmlentities($meta_keywords); ?>"> |
12 | 12 | <?php |
13 | 13 | if (!empty($robots)) { |
14 | - echo '<meta name="robots" content="' . $robots . '">'; |
|
14 | + echo '<meta name="robots" content="'.$robots.'">'; |
|
15 | 15 | } |
16 | 16 | ?> |
17 | 17 | |
@@ -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"> |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | <img src="/style/img/[email protected]" width="24" height="24" alt=""><span>Your Profile</span> |
235 | 235 | </a> |
236 | 236 | <ul id="nav-user"> |
237 | - <?php foreach ($user_nav_links as $nav_link){ ?> |
|
237 | + <?php foreach ($user_nav_links as $nav_link) { ?> |
|
238 | 238 | <li><a href="<?= $nav_link['href']; ?>" title="<?= $nav_link['title']; ?>" class="<?= $nav_link['classes']; ?>"><?= $nav_link['text'] ?></a></li> |
239 | 239 | <?php } ?> |
240 | 240 | </ul> |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | <div class="full-page legacy-page static-page"> |
256 | 256 | <div class="full-page__row"> |
257 | 257 | <div class="panel"> |
258 | - <?php foreach ( $page_errors as $error ) { ?> |
|
258 | + <?php foreach ($page_errors as $error) { ?> |
|
259 | 259 | <p><?= $error['text'] ?></p> |
260 | 260 | <?php } ?> |
261 | 261 | </div> |
@@ -41,7 +41,7 @@ |
||
41 | 41 | <div class="row nested-row"> |
42 | 42 | <div class="homepage-in-the-news homepage-content-section"> |
43 | 43 | <?php if ( $featured ) { |
44 | - include dirname(__FILE__) . "/../homepage/featured.php"; |
|
44 | + include dirname(__FILE__) . "/../homepage/featured.php"; |
|
45 | 45 | } ?> |
46 | 46 | </div> |
47 | 47 | <div class="homepage-create-alert homepage-content-section"> |
@@ -4,10 +4,10 @@ discard block |
||
4 | 4 | <div class="hero__mp-search__wrap"> |
5 | 5 | <h1>Do your MLAs represent you?</h1> |
6 | 6 | <div class="row collapse"> |
7 | - <?php if ( count($data['regional']) > 0 ) { ?> |
|
7 | + <?php if (count($data['regional']) > 0) { ?> |
|
8 | 8 | <ul class="homepage-rep-list"> |
9 | 9 | <li>Your MLAs: </li> |
10 | - <?php foreach ( $data['regional'] as $mla ) { ?> |
|
10 | + <?php foreach ($data['regional'] as $mla) { ?> |
|
11 | 11 | <li class="homepage-rep-list__rep"><a href="/mla/?p=<?= $mla['person_id'] ?>"><?= $mla['name'] ?></a></li> |
12 | 12 | <?php } ?> |
13 | 13 | </ul> |
@@ -40,8 +40,8 @@ discard block |
||
40 | 40 | <div class="panel panel--flushtop clearfix"> |
41 | 41 | <div class="row nested-row"> |
42 | 42 | <div class="homepage-in-the-news homepage-content-section"> |
43 | - <?php if ( $featured ) { |
|
44 | - include dirname(__FILE__) . "/../homepage/featured.php"; |
|
43 | + <?php if ($featured) { |
|
44 | + include dirname(__FILE__)."/../homepage/featured.php"; |
|
45 | 45 | } ?> |
46 | 46 | </div> |
47 | 47 | <div class="homepage-create-alert homepage-content-section"> |
@@ -85,8 +85,8 @@ discard block |
||
85 | 85 | <div class="homepage-recently homepage-content-section"> |
86 | 86 | <h2>Recently in the Northern Ireland Assembly</h2> |
87 | 87 | <ul class="recently__list"><?php |
88 | - foreach ( $debates['recent'] as $recent ) { |
|
89 | - include dirname(__FILE__) . '/../homepage/recent-debates.php'; |
|
88 | + foreach ($debates['recent'] as $recent) { |
|
89 | + include dirname(__FILE__).'/../homepage/recent-debates.php'; |
|
90 | 90 | } |
91 | 91 | ?></ul> |
92 | 92 | </div> |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | ?> |
35 | 35 | <dt><a href="<?php echo $row['listurl']; ?>"><?php |
36 | 36 | if (isset($row['parent']) && count($row['parent']) > 0) { |
37 | - echo ('<strong>' . $row['parent']['body'] . '</strong>'); |
|
37 | + echo ('<strong>'.$row['parent']['body'].'</strong>'); |
|
38 | 38 | } |
39 | 39 | echo '</a>'; |
40 | 40 | if (isset($row['video_status']) && ($row['video_status'] == 5 || $row['video_status'] == 7)) { |
@@ -44,17 +44,17 @@ discard block |
||
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 | |
55 | 55 | <p>“<?php |
56 | 56 | |
57 | - echo $row['extract'] . "”</p></dd>\n"; |
|
57 | + echo $row['extract']."”</p></dd>\n"; |
|
58 | 58 | } |
59 | 59 | ?> |
60 | 60 | </dl> |
@@ -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,22 +161,22 @@ 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 | |
168 | 168 | if ($currentDay == $toDay) { |
169 | - print '<span>' . $currentDay . '</span></td>'; |
|
169 | + print '<span>'.$currentDay.'</span></td>'; |
|
170 | 170 | } else { |
171 | 171 | $DAYURL->insert(array('d'=>$date)); |
172 | - print "<a href=\"" . $DAYURL->generate() . "\">$currentDay</a></td>"; |
|
172 | + print "<a href=\"".$DAYURL->generate()."\">$currentDay</a></td>"; |
|
173 | 173 | } |
174 | 174 | |
175 | 175 | // $currentDay is not a member of $dates. |
176 | 176 | |
177 | 177 | } else { |
178 | 178 | |
179 | - print '<span>' . $currentDay . '</span></td>'; |
|
179 | + print '<span>'.$currentDay.'</span></td>'; |
|
180 | 180 | } |
181 | 181 | // Increment counters |
182 | 182 | |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | $year = $years[0]; |
210 | 210 | $URL = new URL($hansardmajors[$data['info']['major']]['page_year']); |
211 | 211 | $URL->insert(array('y'=>$year)); |
212 | - print '<p><a href="' . $URL->generate() . '">See all of ' . $year . '</a></p>'; |
|
212 | + print '<p><a href="'.$URL->generate().'">See all of '.$year.'</a></p>'; |
|
213 | 213 | } |
214 | 214 | } |
215 | 215 | } else { |
@@ -135,12 +135,16 @@ discard block |
||
135 | 135 | } |
136 | 136 | |
137 | 137 | $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 |
|
138 | + if ($hansardmajors[$data['info']['major']]['location'] == 'NI') { |
|
139 | + $recess_major = 5; |
|
140 | + } elseif ($hansardmajors[$data['info']['major']]['location'] == 'Scotland') { |
|
141 | + $recess_major = 4; |
|
142 | + } |
|
143 | + # For all of Scotland |
|
144 | + elseif ($data['info']['major'] == 101) { |
|
145 | + $recess_major = 101; |
|
146 | + } |
|
147 | + # Lords slightly different |
|
144 | 148 | $recess = recess_prettify($currentDay, $month, $year, $recess_major); |
145 | 149 | |
146 | 150 | // Is this day actually Today in the real world? |
@@ -149,11 +153,15 @@ discard block |
||
149 | 153 | // sittings - e.g. WH is only Tuesday-Thursday |
150 | 154 | if ($currentDay == $toDay) { |
151 | 155 | print '<td class="on"'; |
152 | - if ($recess[0] && $recess[0]!=1) print ' title="'.$recess[0].'"'; |
|
156 | + if ($recess[0] && $recess[0]!=1) { |
|
157 | + print ' title="'.$recess[0].'"'; |
|
158 | + } |
|
153 | 159 | print '>'; |
154 | 160 | } elseif ($recess[0]) { |
155 | 161 | print '<td class="no"'; |
156 | - if ($recess[0]!=1) print ' title="'.$recess[0].'"'; |
|
162 | + if ($recess[0]!=1) { |
|
163 | + print ' title="'.$recess[0].'"'; |
|
164 | + } |
|
157 | 165 | print '>'; |
158 | 166 | } else { |
159 | 167 | print '<td>'; |
@@ -61,23 +61,23 @@ |
||
61 | 61 | <?php else: ?> |
62 | 62 | <ul class="vote-descriptions"> |
63 | 63 | <?php |
64 | - $policy_ids = array(); |
|
65 | - |
|
66 | - foreach ($positions as $position) { |
|
67 | - if (!in_array($position['policy_id'], $policy_ids)) { |
|
68 | - $description = ucfirst($position['desc']); |
|
69 | - $link = sprintf( |
|
70 | - '%s/divisions?policy=%s', |
|
71 | - $member_url, |
|
72 | - $position['policy_id'] |
|
73 | - ); |
|
74 | - $show_link = $position['position'] != 'has never voted on'; |
|
75 | - $key_vote = $position; |
|
76 | - include(dirname(__DIR__) . '/mp/_vote_description.php'); |
|
77 | - |
|
78 | - $policy_ids[] = $position['policy_id']; |
|
79 | - } |
|
80 | - } ?> |
|
64 | + $policy_ids = array(); |
|
65 | + |
|
66 | + foreach ($positions as $position) { |
|
67 | + if (!in_array($position['policy_id'], $policy_ids)) { |
|
68 | + $description = ucfirst($position['desc']); |
|
69 | + $link = sprintf( |
|
70 | + '%s/divisions?policy=%s', |
|
71 | + $member_url, |
|
72 | + $position['policy_id'] |
|
73 | + ); |
|
74 | + $show_link = $position['position'] != 'has never voted on'; |
|
75 | + $key_vote = $position; |
|
76 | + include(dirname(__DIR__) . '/mp/_vote_description.php'); |
|
77 | + |
|
78 | + $policy_ids[] = $position['policy_id']; |
|
79 | + } |
|
80 | + } ?> |
|
81 | 81 | </ul> |
82 | 82 | |
83 | 83 | <?php endif; ?> |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | ); |
74 | 74 | $show_link = $position['position'] != 'has never voted on'; |
75 | 75 | $key_vote = $position; |
76 | - include(dirname(__DIR__) . '/mp/_vote_description.php'); |
|
76 | + include(dirname(__DIR__).'/mp/_vote_description.php'); |
|
77 | 77 | |
78 | 78 | $policy_ids[] = $position['policy_id']; |
79 | 79 | } |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | <ul class="business-list"> |
110 | 110 | <?php foreach ($business as $item): ?> |
111 | 111 | <li> |
112 | - <?php include(dirname(__DIR__) . '/section/_business_list_item.php'); ?> |
|
112 | + <?php include(dirname(__DIR__).'/section/_business_list_item.php'); ?> |
|
113 | 113 | </li> |
114 | 114 | <?php endforeach; ?> |
115 | 115 | </ul> |
@@ -58,10 +58,12 @@ |
||
58 | 58 | to <a href="<?= $member_url ?>/votes">see all their votes</a>. |
59 | 59 | </p> |
60 | 60 | |
61 | - <?php else: ?> |
|
61 | + <?php else { |
|
62 | + : ?> |
|
62 | 63 | <ul class="vote-descriptions"> |
63 | 64 | <?php |
64 | 65 | $policy_ids = array(); |
66 | +} |
|
65 | 67 | |
66 | 68 | foreach ($positions as $position) { |
67 | 69 | if (!in_array($position['policy_id'], $policy_ids)) { |
@@ -39,20 +39,20 @@ |
||
39 | 39 | |
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 | - $member_name = $comment['speaker']['name'] . ': '; |
|
42 | + $member_name = $comment['speaker']['name'].': '; |
|
43 | 43 | } else { |
44 | 44 | $member_name = ''; |
45 | 45 | } |
46 | 46 | |
47 | - $user_name = _htmlentities($comment['firstname'] . ' ' . $comment['lastname']); |
|
47 | + $user_name = _htmlentities($comment['firstname'].' '.$comment['lastname']); |
|
48 | 48 | |
49 | 49 | // We're grouping things by epobject_id, so we're going to display the number |
50 | 50 | // of comments on this epobject. |
51 | 51 | $plural = $comment['total_comments'] == 1 ? ' annotation' : ' annotations'; |
52 | 52 | |
53 | - echo "\t\t\t\t<p><a href=\"$comment[url]\">$comment[total_comments]$plural</a> to <strong>" . $member_name . $hansardtext . "</strong><br>\n"; |
|
53 | + echo "\t\t\t\t<p><a href=\"$comment[url]\">$comment[total_comments]$plural</a> to <strong>".$member_name.$hansardtext."</strong><br>\n"; |
|
54 | 54 | echo "\t\t\t\t<small>(posted on $date)</small><br>\n"; |
55 | - echo "\t\t\t\t" . prepare_comment_for_display($comment['body']) . "</p>"; ?> |
|
55 | + echo "\t\t\t\t".prepare_comment_for_display($comment['body'])."</p>"; ?> |
|
56 | 56 | |
57 | 57 | <?php |
58 | 58 | $PAGE->stripe_end(); |