@@ -100,11 +100,11 @@ |
||
100 | 100 | _api_getHansard_year('WMS', $y); |
101 | 101 | } |
102 | 102 | function api_getWMS_search($s) { |
103 | - _api_getHansard_search( array( |
|
103 | + _api_getHansard_search(array( |
|
104 | 104 | 's' => $s, |
105 | 105 | 'pid' => get_http_var('person'), |
106 | 106 | 'type' => 'wms', |
107 | - ) ); |
|
107 | + )); |
|
108 | 108 | } |
109 | 109 | function api_getWMS_person($pid) { |
110 | 110 | _api_getHansard_search(array( |
@@ -57,11 +57,11 @@ |
||
57 | 57 | _api_getHansard_year('WRANS', $y); |
58 | 58 | } |
59 | 59 | function api_getWrans_search($s) { |
60 | - _api_getHansard_search( array( |
|
60 | + _api_getHansard_search(array( |
|
61 | 61 | 's' => $s, |
62 | 62 | 'pid' => get_http_var('person'), |
63 | 63 | 'type' => 'wrans', |
64 | - ) ); |
|
64 | + )); |
|
65 | 65 | } |
66 | 66 | function api_getWrans_person($pid) { |
67 | 67 | _api_getHansard_search(array( |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | |
3 | 3 | class GLOSSARYLIST { |
4 | 4 | |
5 | - public function render($data, $format='html', $template='glossary') { |
|
5 | + public function render($data, $format = 'html', $template = 'glossary') { |
|
6 | 6 | // Once we have the data that's to be rendered, |
7 | 7 | // include the template. |
8 | 8 | |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | $format = 'html'; |
11 | 11 | } |
12 | 12 | |
13 | - include (INCLUDESPATH."easyparliament/templates/$format/$template.php"); |
|
13 | + include (INCLUDESPATH . "easyparliament/templates/$format/$template.php"); |
|
14 | 14 | |
15 | 15 | } |
16 | 16 |
@@ -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 | ?> |
@@ -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> |
@@ -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'] |