Completed
Branch master (cfcf82)
by Nick
04:51
created
www/docs/freeourbills/sharethis.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 ";
39 39
     $subject = "Help make the laws we have to obey better! - TheyWorkForYou.com";
40 40
 
41
-    print '<a href="mailto:?subject=' . rawurlencode($subject) . '&body='. rawurlencode($email) . '">Click here to open a new email and invite your friends, family and colleagues to get involved.</a>';
41
+    print '<a href="mailto:?subject=' . rawurlencode($subject) . '&body=' . rawurlencode($email) . '">Click here to open a new email and invite your friends, family and colleagues to get involved.</a>';
42 42
 }
43 43
 
44 44
 function freeourbills_share_page() {
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     print '<p><a href="/freeourbills/doshare"';
59 59
     #print 'onclick="share(this); return false;"';
60 60
     print ' title="' .
61
-        _('E-mail this, post to del.icio.us, etc.'). '" class="share_link" rel="nofollow">'.
62
-        _('Share this'). '</a></p>';
61
+        _('E-mail this, post to del.icio.us, etc.') . '" class="share_link" rel="nofollow">' .
62
+        _('Share this') . '</a></p>';
63 63
     #freeourbills_share_form();
64 64
 }
Please login to merge, or discard this patch.
www/docs/index-election.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 $HANSARDURL = new URL('hansard');
73 73
 $MPURL = new URL('yourmp');
74 74
 
75
-$PAGE->block_start(array ('id'=>'intro', 'title'=>'Election special! Find out how they performed for YOU:'));
75
+$PAGE->block_start(array('id'=>'intro', 'title'=>'Election special! Find out how they performed for YOU:'));
76 76
 ?>
77 77
                         <ol>
78 78
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     } else {
90 90
         $CHANGEURL = new URL('userchangepc');
91 91
     }
92
-    $MEMBER = new MEMBER(array ('postcode'=>$THEUSER->postcode(), 'house'=>1));
92
+    $MEMBER = new MEMBER(array('postcode'=>$THEUSER->postcode(), 'house'=>1));
93 93
     $mpname = $MEMBER->full_name();
94 94
     ?>
95 95
       <p><a href="<?php echo $MPURL->generate(); ?>"><strong>Find out more about how <?php echo $mpname; ?>, your ex-MP, represented you over the last parliament</strong></a><br>
@@ -185,11 +185,11 @@  discard block
 block discarded – undo
185 185
 //$PAGE->block_end();
186 186
 
187 187
 $PAGE->stripe_end(array(
188
-    array (
188
+    array(
189 189
         'type' => 'include',
190 190
         'content' => 'whatisthissite'
191 191
     ),
192
-    array (
192
+    array(
193 193
         'type' => 'include',
194 194
         'content' => 'sitenews_recent'
195 195
     )
Please login to merge, or discard this patch.
www/docs/user/password/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
 
91 91
 
92 92
 
93
-function display_page ($errors=array()) {
93
+function display_page($errors = array()) {
94 94
     global $this_page, $PAGE;
95 95
 
96 96
     if (isset($errors["sending"])) {
Please login to merge, or discard this patch.
www/docs/user/confirm/index.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         }
69 69
 
70 70
         $PAGE->stripe_end(array(
71
-            array (
71
+            array(
72 72
                 'type'		=> 'include',
73 73
                 'content'	=> 'userconfirmed'
74 74
             )
@@ -80,10 +80,10 @@  discard block
 block discarded – undo
80 80
     // The user's first visit to this page, and they have a registration token.
81 81
     // So let's confirm them and hope they get logged in...
82 82
 
83
-    if (get_http_var('c') == 'email' ) {
84
-        $success = $THEUSER->confirm_email( get_http_var('t') );
83
+    if (get_http_var('c') == 'email') {
84
+        $success = $THEUSER->confirm_email(get_http_var('t'));
85 85
     } else {
86
-        $success = $THEUSER->confirm( get_http_var('t') );
86
+        $success = $THEUSER->confirm(get_http_var('t'));
87 87
     }
88 88
 
89 89
     if (!$success) {
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 
103 103
     $this_page = 'userconfirmfailed';
104 104
 
105
-    if ( !$PAGE->page_started() ) {
105
+    if (!$PAGE->page_started()) {
106 106
         $PAGE->page_start();
107 107
 
108 108
         $PAGE->stripe_start();
Please login to merge, or discard this patch.
www/docs/user/prompt/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 $anchor = '#addcomment';
21 21
 
22 22
 $URL = new URL('userjoin');
23
-$URL->insert(array('ret'=>$returl.$anchor));
23
+$URL->insert(array('ret'=>$returl . $anchor));
24 24
 $joinurl = $URL->generate();
25 25
 
26 26
 
Please login to merge, or discard this patch.
www/docs/404.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 <?php
33 33
 
34 34
 $includes = array(
35
-    array (
35
+    array(
36 36
         'type' => 'include',
37 37
         'content' => 'whatisthissite'
38 38
     ),
Please login to merge, or discard this patch.
www/docs/random/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 $q = $db->query("select gid from hansard where htype in (10,11) and major=1 and hdate='$date' order by rand() limit 1");
15 15
 $gid = $q->field(0, 'gid');
16 16
 
17
-$args = array (
17
+$args = array(
18 18
     'gid' => fix_gid_from_db($gid),
19 19
     'sort' => 'regexp_replace',
20 20
 );
Please login to merge, or discard this patch.
www/docs/vote/index.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         voteerror("Your browser must be able to accept cookies before you can register a vote.");
32 32
     } else {
33 33
         // Delete the test cookie.
34
-        setcookie ('testcookie', '');
34
+        setcookie('testcookie', '');
35 35
     }
36 36
     // On with the voting...!
37 37
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     // We need to check the user can accept cookies, so...
41 41
 
42 42
     // Set a cookie
43
-    setcookie ('testcookie', 'true');
43
+    setcookie('testcookie', 'true');
44 44
 
45 45
     $ret = get_http_var('ret');
46 46
     $id = get_http_var('id');
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 
68 68
     $PAGE->page_start();
69 69
 
70
-    $message = array (
70
+    $message = array(
71 71
         'title'	=> 'Sorry',
72 72
         'text'	=> $text
73 73
     );
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
         $prev_epvotes[] = $epobject_id;
159 159
         $new_cookie = implode('+', $prev_epvotes);
160 160
 
161
-        setcookie ("epvotes", $new_cookie, time()+60*60*24*365, "/", COOKIEDOMAIN);
161
+        setcookie("epvotes", $new_cookie, time() + 60 * 60 * 24 * 365, "/", COOKIEDOMAIN);
162 162
 
163 163
 
164 164
     } else {
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 
190 190
 $PAGE->page_start();
191 191
 
192
-$message = array (
192
+$message = array(
193 193
     'title'	=> "Thanks for your vote",
194 194
     'text'	=> "<strong>Would you like to ask a question like this yourself?</strong> Use our <a href=\"http://www.whatdotheyknow.com\">Freedom of Information site</a>."
195 195
 );
Please login to merge, or discard this patch.
www/docs/boundaries/index.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         WHERE constituency IN ('" . join("','", $a) . "')
70 70
         AND ( ( house = 3 and left_house = '2011-03-24' ) or ( house = 4 and left_house = '2011-03-23') )");
71 71
     $mreg = array();
72
-    for ($i=0; $i<$q->rows(); $i++) {
72
+    for ($i = 0; $i < $q->rows(); $i++) {
73 73
         $cons = $q->field($i, 'constituency');
74 74
         $house = $q->field($i, 'house');
75 75
         if (($house == 4 && $cons == $current['SPC']) || ($house == 3 && $cons == $current['NIE'])) {
@@ -134,8 +134,8 @@  discard block
 block discarded – undo
134 134
 <li>You were in the <strong><?=$current['SPC']?></strong> constituency, in the <strong><?=$current['SPE']?></strong> region; your constituency MSP was <a href='<?=$mp_url?>'><?=$name?></a>, and your regional MSPs were <?php
135 135
         foreach ($mreg as $k => $n) {
136 136
             print "<a href='/msp/" . make_member_url($n, '', 4) . "'>$n</a>";
137
-            if ($k < count($mreg)-2) print ', ';
138
-            elseif ($k == count($mreg)-2) print ' and ';
137
+            if ($k < count($mreg) - 2) print ', ';
138
+            elseif ($k == count($mreg) - 2) print ' and ';
139 139
         }
140 140
         echo '.</li>';
141 141
     } elseif ($country == 'N') {
Please login to merge, or discard this patch.
Braces   +7 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,7 +21,8 @@  discard block
 block discarded – undo
21 21
 if ($pc) {
22 22
     # current will have WMC key. If Scottish, has SPC and SPE too. If NI, has NIE.
23 23
     $mapit = mapit_call('postcode', $pc);
24
-    if (is_object($mapit)) { # RABX error returns an object
24
+    if (is_object($mapit)) {
25
+# RABX error returns an object
25 26
         print '<p class="error">Afraid we couldn&rsquo;t find that postcode.</p>';
26 27
         $pc = '';
27 28
     }
@@ -134,8 +135,11 @@  discard block
 block discarded – undo
134 135
 <li>You were in the <strong><?=$current['SPC']?></strong> constituency, in the <strong><?=$current['SPE']?></strong> region; your constituency MSP was <a href='<?=$mp_url?>'><?=$name?></a>, and your regional MSPs were <?php
135 136
         foreach ($mreg as $k => $n) {
136 137
             print "<a href='/msp/" . make_member_url($n, '', 4) . "'>$n</a>";
137
-            if ($k < count($mreg)-2) print ', ';
138
-            elseif ($k == count($mreg)-2) print ' and ';
138
+            if ($k < count($mreg)-2) {
139
+                print ', ';
140
+            } elseif ($k == count($mreg)-2) {
141
+                print ' and ';
142
+            }
139 143
         }
140 144
         echo '.</li>';
141 145
     } elseif ($country == 'N') {
Please login to merge, or discard this patch.