@@ -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(); |
@@ -25,8 +25,8 @@ |
||
25 | 25 | print "<h2 class='calendar'>$chamber"; |
26 | 26 | if (in_array($major[$i], $data['majors'])) { |
27 | 27 | $URL = new URL($hansardmajors[$major[$i]]['page_all']); |
28 | - $URL->insert( array( 'd' => $date ) ); |
|
29 | - print ' <a href="' . $URL->generate() . '">See this day →</a>'; |
|
28 | + $URL->insert(array('d' => $date)); |
|
29 | + print ' <a href="'.$URL->generate().'">See this day →</a>'; |
|
30 | 30 | } |
31 | 31 | print "</h2>\n"; |
32 | 32 | print $list[$i] ? "<ul class='calendar'>\n" : "<dl class='calendar'>\n"; |
@@ -18,10 +18,13 @@ |
||
18 | 18 | # Content goes here |
19 | 19 | foreach ($data['dates'] as $date => $day_events) { |
20 | 20 | foreach ($order as $i => $chamber) { |
21 | - if (!array_key_exists($chamber, $day_events)) |
|
22 | - continue; |
|
21 | + if (!array_key_exists($chamber, $day_events)) { |
|
22 | + continue; |
|
23 | + } |
|
23 | 24 | $events = $day_events[$chamber]; |
24 | - if ($plural[$i]) $chamber .= 's'; |
|
25 | + if ($plural[$i]) { |
|
26 | + $chamber .= 's'; |
|
27 | + } |
|
25 | 28 | print "<h2 class='calendar'>$chamber"; |
26 | 29 | if (in_array($major[$i], $data['majors'])) { |
27 | 30 | $URL = new URL($hansardmajors[$major[$i]]['page_all']); |
@@ -11,10 +11,10 @@ discard block |
||
11 | 11 | </div> |
12 | 12 | <div class="row"> |
13 | 13 | <div class="medium-9 columns"> |
14 | - <?php if ( count($data['regional']) > 0 ) { ?> |
|
14 | + <?php if (count($data['regional']) > 0) { ?> |
|
15 | 15 | <ul class="homepage-rep-list"> |
16 | 16 | <li>Your Regional MSPs:</li> |
17 | - <?php foreach ( $data['regional'] as $msp ) { ?> |
|
17 | + <?php foreach ($data['regional'] as $msp) { ?> |
|
18 | 18 | <li class="homepage-rep-list__rep"><a href="/msp/?p=<?= $msp['person_id'] ?>"><?= $msp['name'] ?></a></li> |
19 | 19 | <?php } ?> |
20 | 20 | </ul> |
@@ -57,8 +57,8 @@ discard block |
||
57 | 57 | <div class="panel panel--flushtop clearfix"> |
58 | 58 | <div class="row nested-row"> |
59 | 59 | <div class="homepage-in-the-news homepage-content-section"> |
60 | - <?php if ( $featured ) { |
|
61 | - include dirname(__FILE__) . "/../homepage/featured.php"; |
|
60 | + <?php if ($featured) { |
|
61 | + include dirname(__FILE__)."/../homepage/featured.php"; |
|
62 | 62 | } ?> |
63 | 63 | </div> |
64 | 64 | <div class="homepage-create-alert homepage-content-section"> |
@@ -102,8 +102,8 @@ discard block |
||
102 | 102 | <div class="homepage-recently homepage-content-section"> |
103 | 103 | <h2>Recently in Parliament</h2> |
104 | 104 | <ul class="recently__list"><?php |
105 | - foreach ( $debates['recent'] as $recent ) { |
|
106 | - include dirname(__FILE__) . '/../homepage/recent-debates.php'; |
|
105 | + foreach ($debates['recent'] as $recent) { |
|
106 | + include dirname(__FILE__).'/../homepage/recent-debates.php'; |
|
107 | 107 | } |
108 | 108 | ?></ul> |
109 | 109 | </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"> |
@@ -24,28 +24,28 @@ |
||
24 | 24 | foreach ($data['rows'] as $n => $row) { |
25 | 25 | echo '<dt>'; |
26 | 26 | if (isset($row['parent']) && count($row['parent']) > 0) { |
27 | - echo ('<strong>' . $row['parent']['body'] . '</strong>'); |
|
27 | + echo ('<strong>'.$row['parent']['body'].'</strong>'); |
|
28 | 28 | } |
29 | 29 | echo '</dt> <dd>'; |
30 | 30 | if (isset($row['speaker']) && count($row['speaker'])) { |
31 | - echo "<em>" . ucfirst($row['speaker']['name']) . "</em>: "; |
|
31 | + echo "<em>".ucfirst($row['speaker']['name'])."</em>: "; |
|
32 | 32 | } |
33 | 33 | |
34 | - echo '“' . $row['extract'] . "”</dd>\n"; |
|
34 | + echo '“'.$row['extract']."”</dd>\n"; |
|
35 | 35 | echo '<dd><em><small>This speech is '; |
36 | - if ($row['hpos']-$want['hpos']>0) { |
|
37 | - echo ($row['hpos']-$want['hpos']) . ' later than'; |
|
36 | + if ($row['hpos'] - $want['hpos'] > 0) { |
|
37 | + echo ($row['hpos'] - $want['hpos']).' later than'; |
|
38 | 38 | } else { |
39 | - echo ($want['hpos']-$row['hpos']) . ' earlier than'; |
|
39 | + echo ($want['hpos'] - $row['hpos']).' earlier than'; |
|
40 | 40 | } |
41 | 41 | echo ' the one you want – '; |
42 | - if ($row['video_status']&8 || !($row['video_status']&1)) { |
|
42 | + if ($row['video_status'] & 8 || !($row['video_status'] & 1)) { |
|
43 | 43 | echo ' it doesn\'t have any video'; |
44 | - } elseif ($row['video_status']&4) { |
|
44 | + } elseif ($row['video_status'] & 4) { |
|
45 | 45 | echo ' it has already been matched'; |
46 | - } elseif ($row['video_status']&1) { |
|
46 | + } elseif ($row['video_status'] & 1) { |
|
47 | 47 | # Only for Commons currently |
48 | - echo ' if you prefer, <a target="_top" onclick="t = parent.document[\'video\'].currentTime(); this.href += t;" href="/video/?gid=debate/' . $row['gid'] . '&file=' . $want['file'] . '&start=">switch to matching this speech instead</a>'; |
|
48 | + echo ' if you prefer, <a target="_top" onclick="t = parent.document[\'video\'].currentTime(); this.href += t;" href="/video/?gid=debate/'.$row['gid'].'&file='.$want['file'].'&start=">switch to matching this speech instead</a>'; |
|
49 | 49 | } |
50 | 50 | echo '</small></em></dd>'; |
51 | 51 | } |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | if (count($data) > 0) { |
39 | 39 | |
40 | 40 | if ($info['view'] == 'recent') { |
41 | - $title = $info['num'] . ' most recent trackbacks'; |
|
41 | + $title = $info['num'].' most recent trackbacks'; |
|
42 | 42 | } else { |
43 | 43 | $title = 'Some sites linking to this page'; |
44 | 44 | } |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | ?> |
65 | 65 | <dt><a href="<?php echo _htmlentities($trackback['url']); ?>"><?php echo _htmlentities($trackback['title']); ?></a></dt> |
66 | 66 | <dd><?php echo _htmlentities($trackback['excerpt']); ?><br> |
67 | - <small>At <?php echo _htmlentities($trackback['blog_name']); ?> on <?php echo $date . ' ' . $time; ?></small> |
|
67 | + <small>At <?php echo _htmlentities($trackback['blog_name']); ?> on <?php echo $date.' '.$time; ?></small> |
|
68 | 68 | </dd> |
69 | 69 | <?php |
70 | 70 |
@@ -113,7 +113,7 @@ |
||
113 | 113 | </div> |
114 | 114 | |
115 | 115 | <ul class="debate-speech__meta debate-speech__links"> |
116 | - <?php if ( $division['debate_url'] ) { ?> |
|
116 | + <?php if ($division['debate_url']) { ?> |
|
117 | 117 | <li class="link-to-speech"> |
118 | 118 | <a class="link debate-speech__meta__link" href="<?= $division['debate_url'] ?>">Show full debate</a> |
119 | 119 | </li> |
@@ -9,10 +9,10 @@ |
||
9 | 9 | ?> |
10 | 10 | <ul class="division-list"> |
11 | 11 | <?php foreach ($votes as $vote) { |
12 | - $voter = sprintf('<a href="/mp/?p=%d">%s</a>', $vote['person_id'], $vote['name']); |
|
13 | - if ($vote['teller']) { |
|
14 | - $tellers[] = $voter; |
|
15 | - } else { ?> |
|
12 | + $voter = sprintf('<a href="/mp/?p=%d">%s</a>', $vote['person_id'], $vote['name']); |
|
13 | + if ($vote['teller']) { |
|
14 | + $tellers[] = $voter; |
|
15 | + } else { ?> |
|
16 | 16 | <li><?= $voter ?></li> |
17 | 17 | <?php |
18 | 18 | } |
@@ -7,9 +7,9 @@ discard block |
||
7 | 7 | </div> |
8 | 8 | <div class="business-section__primary"> |
9 | 9 | <?php |
10 | - if ( isset($divisions) && $divisions ) { |
|
11 | - $current_date = ''; |
|
12 | - ?> |
|
10 | + if ( isset($divisions) && $divisions ) { |
|
11 | + $current_date = ''; |
|
12 | + ?> |
|
13 | 13 | <ul class="business-list"> |
14 | 14 | <?php foreach ($divisions as $division) { ?> |
15 | 15 | <li id="<?= $division['division_id'] ?>"> |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | <h3><?= format_date($division['date'], LONGERDATEFORMAT) ?></h3> |
19 | 19 | </span> |
20 | 20 | <?php |
21 | - $current_date = $division['date']; |
|
21 | + $current_date = $division['date']; |
|
22 | 22 | } ?> |
23 | 23 | <a href="/divisions/<?= $division['division_id'] ?>" class="business-list__title"> |
24 | 24 | <h3><?= $division['division_title'] ?></h3> |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | </div> |
8 | 8 | <div class="business-section__primary"> |
9 | 9 | <?php |
10 | - if ( isset($divisions) && $divisions ) { |
|
10 | + if (isset($divisions) && $divisions) { |
|
11 | 11 | $current_date = ''; |
12 | 12 | ?> |
13 | 13 | <ul class="business-list"> |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | <br> |
30 | 30 | <span class="business-list__meta"> |
31 | 31 | <?= $division['summary'] ?> |
32 | - <?= $division['mp_vote'] !== '' ? '. <b>Your MP, ' . $mp_name . ', ' . $division['mp_vote'] . '.</b>': '' ?> |
|
32 | + <?= $division['mp_vote'] !== '' ? '. <b>Your MP, '.$mp_name.', '.$division['mp_vote'].'.</b>' : '' ?> |
|
33 | 33 | </span> |
34 | 34 | </p> |
35 | 35 | </li> |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | if (isset($data['comments']) && count($data['comments']) > 0) { |
15 | 15 | $title = 'Most recent annotations'; |
16 | 16 | if (isset($data['full_name'])) { |
17 | - $title .= ' on things by ' . $data['full_name']; |
|
17 | + $title .= ' on things by '.$data['full_name']; |
|
18 | 18 | } |
19 | 19 | $PAGE->block_start(array('id'=>'recentcomments', 'title'=>$title)); |
20 | 20 | |
@@ -33,11 +33,11 @@ discard block |
||
33 | 33 | $date = format_date($date, SHORTDATEFORMAT); |
34 | 34 | $time = format_time($time, TIMEFORMAT); |
35 | 35 | |
36 | - $count = $n+1; |
|
36 | + $count = $n + 1; |
|
37 | 37 | |
38 | 38 | $USERURL->insert(array('u'=>$comment['user_id'])); |
39 | 39 | |
40 | - ?><a name="c<?php echo $count; ?>"></a><strong><?php echo _htmlentities($comment['firstname'] . ' ' . $comment['lastname']); ?>:</strong> <?php echo $commenttext; ?> <small>(<?php echo relative_time($comment['posted']); ?>)</small><br><a href="<?php echo $comment['url']; ?>">Read annotation</a> | <a href="<?php echo $USERURL->generate(); ?>" title="See more information about this user">All by this user</a> </li> |
|
40 | + ?><a name="c<?php echo $count; ?>"></a><strong><?php echo _htmlentities($comment['firstname'].' '.$comment['lastname']); ?>:</strong> <?php echo $commenttext; ?> <small>(<?php echo relative_time($comment['posted']); ?>)</small><br><a href="<?php echo $comment['url']; ?>">Read annotation</a> | <a href="<?php echo $USERURL->generate(); ?>" title="See more information about this user">All by this user</a> </li> |
|
41 | 41 | <?php |
42 | 42 | } |
43 | 43 | ?> |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | if ($this_page == 'home') { |
48 | 48 | $MOREURL = new URL('comments_recent'); |
49 | 49 | ?> |
50 | - <p><a href="<?php echo $MOREURL->generate(); ?>#c<?php echo count($data['comments'])+1; ?>">See more annotations posted recently</a></p> |
|
50 | + <p><a href="<?php echo $MOREURL->generate(); ?>#c<?php echo count($data['comments']) + 1; ?>">See more annotations posted recently</a></p> |
|
51 | 51 | <?php |
52 | 52 | } |
53 | 53 | if ($this_page != 'home') $PAGE->page_links($data); |
@@ -18,7 +18,9 @@ discard block |
||
18 | 18 | } |
19 | 19 | $PAGE->block_start(array('id'=>'recentcomments', 'title'=>$title)); |
20 | 20 | |
21 | - if ($this_page != 'home') $PAGE->page_links($data); |
|
21 | + if ($this_page != 'home') { |
|
22 | + $PAGE->page_links($data); |
|
23 | + } |
|
22 | 24 | $USERURL = new URL('userview'); |
23 | 25 | ?> |
24 | 26 | <ul> |
@@ -50,7 +52,9 @@ discard block |
||
50 | 52 | <p><a href="<?php echo $MOREURL->generate(); ?>#c<?php echo count($data['comments'])+1; ?>">See more annotations posted recently</a></p> |
51 | 53 | <?php |
52 | 54 | } |
53 | - if ($this_page != 'home') $PAGE->page_links($data); |
|
55 | + if ($this_page != 'home') { |
|
56 | + $PAGE->page_links($data); |
|
57 | + } |
|
54 | 58 | $PAGE->block_end(); |
55 | 59 | } |
56 | 60 | ?> |