@@ -7,7 +7,7 @@ |
||
7 | 7 | |
8 | 8 | $PAGE->page_start(); |
9 | 9 | $PAGE->stripe_start(); |
10 | -$PAGE->block_start(array ('id'=>'intro', 'title'=>'We need your help:')); |
|
10 | +$PAGE->block_start(array('id'=>'intro', 'title'=>'We need your help:')); |
|
11 | 11 | |
12 | 12 | echo '<div id="foi2009">'; |
13 | 13 | echo $foi2009_message; |
@@ -14,7 +14,7 @@ |
||
14 | 14 | } elseif ($constituency == "") { |
15 | 15 | $errors['pc'] = "Sorry, " . _htmlentities($pc) . " isn't a known postcode"; |
16 | 16 | twfy_debug ('MP', "Can't display an MP, as submitted postcode didn't match a constituency"); |
17 | - } else { |
|
17 | + } else { |
|
18 | 18 | $MEMBER = new MEMBER(array('constituency' => $constituency)); |
19 | 19 | if ($MEMBER->person_id()) { |
20 | 20 | // This will cookie the postcode. |
@@ -5,7 +5,9 @@ |
||
5 | 5 | |
6 | 6 | $pc = get_http_var('pc'); |
7 | 7 | $pc = preg_replace('#[^a-z0-9 ]#i', '', $pc); |
8 | -if (!$pc) exit; |
|
8 | +if (!$pc) { |
|
9 | + exit; |
|
10 | +} |
|
9 | 11 | |
10 | 12 | if (validate_postcode($pc)) { |
11 | 13 | $constituency = strtolower(MySociety\TheyWorkForYou\Utility\Postcode::postcodeToConstituency($pc)); |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | include_once '../../includes/easyparliament/init.php'; |
4 | -include_once INCLUDESPATH."easyparliament/member.php"; |
|
4 | +include_once INCLUDESPATH . "easyparliament/member.php"; |
|
5 | 5 | |
6 | 6 | $pc = get_http_var('pc'); |
7 | 7 | $pc = preg_replace('#[^a-z0-9 ]#i', '', $pc); |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | $errors['pc'] = "Sorry, we couldn't check your postcode right now. Please use the 'All Mps' link above to browse MPs"; |
14 | 14 | } elseif ($constituency == "") { |
15 | 15 | $errors['pc'] = "Sorry, " . _htmlentities($pc) . " isn't a known postcode"; |
16 | - twfy_debug ('MP', "Can't display an MP, as submitted postcode didn't match a constituency"); |
|
16 | + twfy_debug('MP', "Can't display an MP, as submitted postcode didn't match a constituency"); |
|
17 | 17 | } else { |
18 | 18 | $MEMBER = new MEMBER(array('constituency' => $constituency)); |
19 | 19 | if ($MEMBER->person_id()) { |
@@ -27,5 +27,5 @@ discard block |
||
27 | 27 | } |
28 | 28 | } else { |
29 | 29 | $errors['pc'] = "Sorry, " . _htmlentities($pc) . " isn't a valid postcode"; |
30 | - twfy_debug ('MP', "Can't display an MP because the submitted postcode wasn't of a valid form."); |
|
30 | + twfy_debug('MP', "Can't display an MP because the submitted postcode wasn't of a valid form."); |
|
31 | 31 | } |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | <?php |
17 | 17 | } |
18 | 18 | |
19 | -$PAGE->block_start(array ('title'=>'Share the \'Free our Bills!\' campaign')); |
|
19 | +$PAGE->block_start(array('title'=>'Share the \'Free our Bills!\' campaign')); |
|
20 | 20 | freeourbills_styles(); |
21 | 21 | |
22 | 22 | freeourbills_share_page(); |
@@ -25,4 +25,4 @@ discard block |
||
25 | 25 | |
26 | 26 | $PAGE->block_end(); |
27 | 27 | $PAGE->stripe_end(); |
28 | -$PAGE->page_end (); |
|
28 | +$PAGE->page_end(); |
@@ -144,4 +144,4 @@ |
||
144 | 144 | <?php |
145 | 145 | #$PAGE->block_end(); |
146 | 146 | $PAGE->stripe_end(); |
147 | -$PAGE->page_end (); |
|
147 | +$PAGE->page_end(); |
@@ -138,4 +138,4 @@ |
||
138 | 138 | 'type' => 'html', |
139 | 139 | 'content' => '<p align="center"><img title="Duck-billed platypus" src="bill3.jpg" alt="" hspace="10"></p>' |
140 | 140 | ))); |
141 | -$PAGE->page_end (); |
|
141 | +$PAGE->page_end(); |
@@ -16,8 +16,9 @@ discard block |
||
16 | 16 | $email = get_http_var('email'); |
17 | 17 | $sign = get_http_var('sign'); |
18 | 18 | $pid = get_http_var('pid'); |
19 | -if (!$pid || !ctype_digit($pid)) print 'not valid'; |
|
20 | -else { |
|
19 | +if (!$pid || !ctype_digit($pid)) { |
|
20 | + print 'not valid'; |
|
21 | +} else { |
|
21 | 22 | $authed = auth_verify_with_shared_secret($email, OPTION_AUTH_SHARED_SECRET, $sign); |
22 | 23 | if ($authed) { |
23 | 24 | $db = new ParlDB; |
@@ -26,10 +27,11 @@ discard block |
||
26 | 27 | ':criteria' => 'speaker:' . $pid |
27 | 28 | )); |
28 | 29 | $already_signed = $q->rows(); |
29 | - if ($already_signed) |
|
30 | - print "already signed"; |
|
31 | - else |
|
32 | - print "not signed"; |
|
30 | + if ($already_signed) { |
|
31 | + print "already signed"; |
|
32 | + } else { |
|
33 | + print "not signed"; |
|
34 | + } |
|
33 | 35 | } else { |
34 | 36 | print "not authed"; |
35 | 37 | } |
@@ -44,8 +44,9 @@ |
||
44 | 44 | $pagetitle .= " page $pagenum"; |
45 | 45 | } |
46 | 46 | $num = get_http_var('n'); |
47 | - if (!is_numeric($num) || $num <= 0) |
|
48 | - $num = 20; |
|
47 | + if (!is_numeric($num) || $num <= 0) { |
|
48 | + $num = 20; |
|
49 | + } |
|
49 | 50 | |
50 | 51 | $DATA->set_page_metadata($this_page, 'title', $pagetitle); |
51 | 52 |
@@ -2,8 +2,8 @@ discard block |
||
2 | 2 | # vim:sw=4:ts=4:et:nowrap |
3 | 3 | |
4 | 4 | include_once '../../../includes/easyparliament/init.php'; |
5 | -include_once INCLUDESPATH."easyparliament/member.php"; |
|
6 | -include_once INCLUDESPATH."easyparliament/glossary.php"; |
|
5 | +include_once INCLUDESPATH . "easyparliament/member.php"; |
|
6 | +include_once INCLUDESPATH . "easyparliament/glossary.php"; |
|
7 | 7 | |
8 | 8 | if (!DEVSITE) { |
9 | 9 | header('Cache-Control: max-age=86400'); # Once a day |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | |
50 | 50 | $DATA->set_page_metadata($this_page, 'title', $pagetitle); |
51 | 51 | |
52 | - $args = array ( |
|
52 | + $args = array( |
|
53 | 53 | 's' => $searchstring, |
54 | 54 | 'p' => $pagenum, |
55 | 55 | 'pop' => 1, |
@@ -2,12 +2,12 @@ discard block |
||
2 | 2 | |
3 | 3 | $this_page = 'hansard_bugs'; |
4 | 4 | include_once '../../includes/easyparliament/init.php'; |
5 | -$DATA->set_page_metadata($this_page, 'heading','Official Hansard problems'); |
|
5 | +$DATA->set_page_metadata($this_page, 'heading', 'Official Hansard problems'); |
|
6 | 6 | |
7 | 7 | $PAGE->page_start(); |
8 | 8 | $PAGE->stripe_start(); |
9 | 9 | |
10 | -$PAGE->block_start(array ('title'=>'Things currently noticeable to the user')); |
|
10 | +$PAGE->block_start(array('title'=>'Things currently noticeable to the user')); |
|
11 | 11 | ?> |
12 | 12 | |
13 | 13 | <style type="text/css"> |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | |
111 | 111 | <?php |
112 | 112 | $PAGE->block_end(); |
113 | -$PAGE->block_start(array ('title'=>'Things not noticeable to the user')); |
|
113 | +$PAGE->block_start(array('title'=>'Things not noticeable to the user')); |
|
114 | 114 | ?> |
115 | 115 | |
116 | 116 | <ul> |
@@ -33,8 +33,9 @@ |
||
33 | 33 | if (isset($arr[3])) { |
34 | 34 | print '<a href="'.$link.'/questions">Written Questions</a>'; |
35 | 35 | } |
36 | - if (count($arr)==2) |
|
37 | - print ' | '; |
|
36 | + if (count($arr)==2) { |
|
37 | + print ' | '; |
|
38 | + } |
|
38 | 39 | if (isset($arr[4])) { |
39 | 40 | print '<a href="'.$link.'/statements">Written Ministerial Statements</a>'; |
40 | 41 | } |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | group by body, major |
17 | 17 | order by body'); |
18 | 18 | $data = array(); |
19 | -for ($i=0; $i<$q->rows(); $i++) { |
|
19 | +for ($i = 0; $i < $q->rows(); $i++) { |
|
20 | 20 | $body = $q->field($i, 'body'); |
21 | 21 | $major = $q->field($i, 'major'); |
22 | 22 | $data[$body][$major] = true; |
@@ -26,17 +26,17 @@ discard block |
||
26 | 26 | |
27 | 27 | print '<ul>'; |
28 | 28 | foreach ($data as $body => $arr) { |
29 | - $link = strtolower(str_replace(' ','_',$body)); |
|
29 | + $link = strtolower(str_replace(' ', '_', $body)); |
|
30 | 30 | print '<li>'; |
31 | 31 | print $body; |
32 | 32 | print ' — '; |
33 | 33 | if (isset($arr[3])) { |
34 | - print '<a href="'.$link.'/questions">Written Questions</a>'; |
|
34 | + print '<a href="' . $link . '/questions">Written Questions</a>'; |
|
35 | 35 | } |
36 | - if (count($arr)==2) |
|
36 | + if (count($arr) == 2) |
|
37 | 37 | print ' | '; |
38 | 38 | if (isset($arr[4])) { |
39 | - print '<a href="'.$link.'/statements">Written Ministerial Statements</a>'; |
|
39 | + print '<a href="' . $link . '/statements">Written Ministerial Statements</a>'; |
|
40 | 40 | } |
41 | 41 | print '</li>'; |
42 | 42 | } |