Completed
Pull Request — master (#1322)
by Nick
11:36 queued 06:31
created
www/docs/glossary/index.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 }
8 8
 
9 9
 include_once '../../includes/easyparliament/init.php';
10
-include_once INCLUDESPATH."easyparliament/glossary.php";
10
+include_once INCLUDESPATH . "easyparliament/glossary.php";
11 11
 
12 12
 $args = array(
13 13
     'sort'				=> "regexp_replace",
@@ -48,12 +48,12 @@  discard block
 block discarded – undo
48 48
 }
49 49
 
50 50
 if ($term) {
51
-    $DATA->set_page_metadata($this_page, 'title', $term['title'].': Glossary item');
51
+    $DATA->set_page_metadata($this_page, 'title', $term['title'] . ': Glossary item');
52 52
     $DATA->set_page_metadata($this_page, 'heading', $term['title']);
53 53
 }
54 54
 else {
55
-    $DATA->set_page_metadata ($this_page, 'title', $GLOSSARY->current_letter.': Glossary index');
56
-    $DATA->set_page_metadata ($this_page, 'heading', 'Glossary index');
55
+    $DATA->set_page_metadata($this_page, 'title', $GLOSSARY->current_letter . ': Glossary index');
56
+    $DATA->set_page_metadata($this_page, 'heading', 'Glossary index');
57 57
 }
58 58
 
59 59
 $PAGE->page_start();
@@ -72,13 +72,13 @@  discard block
 block discarded – undo
72 72
     $URL->update(array("gl" => $GLOSSARY->next_term['glossary_id']));
73 73
     $next_link = $URL->generate('url');
74 74
 
75
-    $nextprev = array (
76
-        'next'	=> array (
75
+    $nextprev = array(
76
+        'next'	=> array(
77 77
             'url'	=> $next_link,
78 78
             'title'	=> 'Next term',
79 79
             'body'	=> $GLOSSARY->next_term['title']
80 80
         ),
81
-        'prev'	=> array (
81
+        'prev'	=> array(
82 82
             'url'	=> $previous_link,
83 83
             'title'	=> 'Previous term',
84 84
             'body'	=> $GLOSSARY->previous_term['title']
@@ -111,8 +111,8 @@  discard block
 block discarded – undo
111 111
     }
112 112
 }
113 113
 
114
-$PAGE->stripe_end(array (
115
-    array (
114
+$PAGE->stripe_end(array(
115
+    array(
116 116
         'type'		=> 'nextprev',
117 117
         'content'	=> ''
118 118
     )
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,10 +40,12 @@  discard block
 block discarded – undo
40 40
 if (isset($az) && array_key_exists($az, $GLOSSARY->alphabet)) {
41 41
     $GLOSSARY->current_letter = $az;
42 42
 // Otherwise make it the first letter of the current term
43
-} elseif (isset($term)) {
43
+}
44
+elseif (isset($term)) {
44 45
     $GLOSSARY->current_letter = strtoupper($term['title']{0});
45 46
 // Otherwise make it "A" by default
46
-} else {
47
+}
48
+else {
47 49
     $GLOSSARY->current_letter = "A";
48 50
 }
49 51
 
@@ -95,7 +97,8 @@  discard block
 block discarded – undo
95 97
 
96 98
     $PAGE->glossary_display_term($GLOSSARY);
97 99
 
98
-} else {
100
+}
101
+else {
99 102
 
100 103
 
101 104
     // Display the results
Please login to merge, or discard this patch.
www/docs/bills/2005-06/legislative-and-regulatory-reform/index.php 2 patches
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -2,10 +2,10 @@  discard block
 block discarded – undo
2 2
 
3 3
 $this_page = 'bill_index';
4 4
 include_once '../../../../includes/easyparliament/init.php';
5
-$DATA->set_page_metadata($this_page, 'heading','Legislative and Regulatory Reform Bill');
5
+$DATA->set_page_metadata($this_page, 'heading', 'Legislative and Regulatory Reform Bill');
6 6
 $PAGE->page_start();
7 7
 $PAGE->stripe_start();
8
-$PAGE->block_start(array ('title'=>'House of Commons - Normal Run'));
8
+$PAGE->block_start(array('title'=>'House of Commons - Normal Run'));
9 9
 ?>
10 10
 <ul>
11 11
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     parse_bill('2006141.txt');
46 46
     $amendments = read_amendments('amendments.txt'); # The amendments, by number
47 47
     parse_amendments();
48
-    $out = $title."\n\n";
48
+    $out = $title . "\n\n";
49 49
     $out .= "Page,Line\n";
50 50
     foreach ($bill as $page_num => $page) {
51 51
         foreach ($page as $line_num => $line) {
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 print '</ul>';
60 60
 $PAGE->block_end();
61 61
 $includes = array(
62
-    array (
62
+    array(
63 63
         'type' => 'include',
64 64
         'content' => 'bills_intro'
65 65
     ),
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     $intitle = true;
78 78
     $title = '';
79 79
     foreach ($f as $r) {
80
-        if ($line<1) {
80
+        if ($line < 1) {
81 81
             $line++;
82 82
             continue;
83 83
         }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
             }
97 97
             continue;
98 98
         }
99
-        if (substr($r, 0, 8)=='Bill 141') continue;
99
+        if (substr($r, 0, 8) == 'Bill 141') continue;
100 100
         if (preg_match('#\s+([1-4]?[05])$#', $r, $m)) {
101 101
             if ($line != $m[1]) {
102 102
                 print "ERROR! $line $m[1] $r";
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
         if ($r == "\n") {
142 142
             continue;
143 143
         }
144
-        if ($line<1) {
144
+        if ($line < 1) {
145 145
             $line++;
146 146
             continue;
147 147
         }
@@ -155,8 +155,8 @@  discard block
 block discarded – undo
155 155
             $number = $m[1];
156 156
             $amendments[$number] = '';
157 157
         } elseif (preg_match('#To move the following Clause#', $r)) {
158
-            preg_match('#\n(.*?)$#', $amendments[$number-1], $m);
159
-            $amendments[$number-1] = preg_replace('#\n(.*?)$#', '', $amendments[$number-1]);
158
+            preg_match('#\n(.*?)$#', $amendments[$number - 1], $m);
159
+            $amendments[$number - 1] = preg_replace('#\n(.*?)$#', '', $amendments[$number - 1]);
160 160
             $amendments[$number] .= '*' . trim($m[1]) . "*\n$r";
161 161
         } else {
162 162
             $amendments[$number] .= $r;
@@ -180,9 +180,9 @@  discard block
 block discarded – undo
180 180
             $page = $m[1]; $line = $m[2]; $clause = $m[3];
181 181
             $from_text = $m[4]; $end_line = $m[5]; $insert = $m[6];
182 182
             unset($amendments[$num]);
183
-            $bill[$page][$line] = str_replace($from_text, "$from_text <del title='$num'>", $bill[$page][$line]) . '</del><ins title="'.$num.'">' . $insert . '</ins>';
184
-            for ($i=$line+1; $i<=$end_line; $i++) {
185
-                $bill[$page][$i] = '<del title="'.$num.'">' . $bill[$page][$i] . '</del>';
183
+            $bill[$page][$line] = str_replace($from_text, "$from_text <del title='$num'>", $bill[$page][$line]) . '</del><ins title="' . $num . '">' . $insert . '</ins>';
184
+            for ($i = $line + 1; $i <= $end_line; $i++) {
185
+                $bill[$page][$i] = '<del title="' . $num . '">' . $bill[$page][$i] . '</del>';
186 186
             }
187 187
         }
188 188
         # Page  4, line 9 [Clause 6], leave out from `under' to `creating' and insert `this Part making provision'
@@ -199,10 +199,10 @@  discard block
 block discarded – undo
199 199
             $insert = $m[7];
200 200
             unset($amendments[$num]);
201 201
             $bill[$page][$from_line] = str_replace($from_text, "$from_text <del title='$num'>", $bill[$page][$from_line]) . '</del>';
202
-            for ($i=$from_line+1; $i<$to_line; $i++) {
203
-                $bill[$page][$i] = '<del title="'.$num.'">' . $bill[$page][$i] . '</del>';
202
+            for ($i = $from_line + 1; $i < $to_line; $i++) {
203
+                $bill[$page][$i] = '<del title="' . $num . '">' . $bill[$page][$i] . '</del>';
204 204
             }
205
-            $bill[$page][$to_line] = '<del title="'.$num.'">' . str_replace($to_text, "</del><ins title='$num'>$insert</ins> $to_text", $bill[$page][$to_line]);
205
+            $bill[$page][$to_line] = '<del title="' . $num . '">' . str_replace($to_text, "</del><ins title='$num'>$insert</ins> $to_text", $bill[$page][$to_line]);
206 206
         }
207 207
         # Page  3, line 13 [Clause 4], leave out from beginning to `confer' and insert `An order under this Part may not make provision to'
208 208
         if (preg_match('#Page\s+(\d+), line (\d+) \[Clause (\d+)\], leave out from beginning to `(.*?)\' and insert `(.*?)\'#s', $amendment, $m)) {
@@ -223,15 +223,15 @@  discard block
 block discarded – undo
223 223
             $page = $m[1]; $line = $m[3]; $clause = $m[2];
224 224
             $insert = isset($m[4]) ? $m[4] : null;
225 225
             unset($amendments[$num]);
226
-            $bill[$page][$line] = '<del title="'.$num.'">'.$bill[$page][$line].'</del>';
227
-            if ($insert) $bill[$page][$line] .= '<ins title="'.$num.'">'.$insert.'</ins>';
226
+            $bill[$page][$line] = '<del title="' . $num . '">' . $bill[$page][$line] . '</del>';
227
+            if ($insert) $bill[$page][$line] .= '<ins title="' . $num . '">' . $insert . '</ins>';
228 228
         }
229 229
         # Page 8, line 24 [Clause 14], at end insert-- `...'
230 230
         if (preg_match('#Page\s+(\d+), line (\d+) \[Clause (\d+)\], (?:at end|after subsection \(\d+\)) insert--\s+`(.*?)\'#s', $amendment, $m)) {
231 231
             $page = $m[1]; $line = $m[2]; $clause = $m[3];
232 232
             $insert = $m[4];
233 233
             unset($amendments[$num]);
234
-            $bill[$page][$line] .= '<ins title="'.$num.'">'.$insert.'</ins>';
234
+            $bill[$page][$line] .= '<ins title="' . $num . '">' . $insert . '</ins>';
235 235
         }
236 236
         # Title, line    1, leave out `reforming legislation' and insert `...'
237 237
         if (preg_match('#Title, line.*?, leave out `(.*?)\' and insert `(.*?)\'#s', $amendment, $m)) {
@@ -247,14 +247,14 @@  discard block
 block discarded – undo
247 247
             foreach ($clauses[$clause] as $subclause_num => $subclause) {
248 248
                 foreach ($subclause as $subsubclause_num => $subsubclause) {
249 249
                     $startP = $subsubclause['startP'];
250
-                    if ($startP==$page && $subsubclause['startL']==$line) {
250
+                    if ($startP == $page && $subsubclause['startL'] == $line) {
251 251
                         if ($startP == $subsubclause['endP']) {
252 252
                             unset($amendments[$num]);
253
-                            for ($i = $subsubclause['startL']; $i<=$subsubclause['endL']; $i++) {
254
-                                $bill[$page][$i] = '<del title="'.$num.'">' . $bill[$page][$i] . '</del>';
253
+                            for ($i = $subsubclause['startL']; $i <= $subsubclause['endL']; $i++) {
254
+                                $bill[$page][$i] = '<del title="' . $num . '">' . $bill[$page][$i] . '</del>';
255 255
                             }
256 256
                             if ($insert) {
257
-                                $bill[$page][$i-1] .= "<ins title='$num'>$insert</ins>";
257
+                                $bill[$page][$i - 1] .= "<ins title='$num'>$insert</ins>";
258 258
                             }
259 259
                         }
260 260
                     }
@@ -270,21 +270,21 @@  discard block
 block discarded – undo
270 270
             foreach ($clauses[$clause] as $subclause_num => $subclause) {
271 271
                 foreach ($subclause as $subsubclause_num => $subsubclause) {
272 272
                     $startP = $subsubclause['startP'];
273
-                    if ($startP==$page && $subsubclause['startL']==$line) {
273
+                    if ($startP == $page && $subsubclause['startL'] == $line) {
274 274
                         if ($startP == $subsubclause['endP']) {
275 275
                             unset($amendments[$num]);
276 276
                             $finished = true;
277 277
                         }
278 278
                     }
279 279
                     if ($finished) {
280
-                        for ($i = $subsubclause['startL']; $i<=$subsubclause['endL']; $i++) {
281
-                            $bill[$page][$i] = '<del title="'.$num.'">' . $bill[$page][$i] . '</del>';
280
+                        for ($i = $subsubclause['startL']; $i <= $subsubclause['endL']; $i++) {
281
+                            $bill[$page][$i] = '<del title="' . $num . '">' . $bill[$page][$i] . '</del>';
282 282
                         }
283 283
                     }
284 284
                 }
285 285
                 if ($finished) {
286 286
                     if ($insert) {
287
-                        $bill[$page][$i-1] .= "<ins title='$num'>$insert</ins>";
287
+                        $bill[$page][$i - 1] .= "<ins title='$num'>$insert</ins>";
288 288
                     }
289 289
                     break;
290 290
                 }
@@ -296,16 +296,16 @@  discard block
 block discarded – undo
296 296
             $finished = false;
297 297
             foreach ($clauses[$clause] as $subclause_num => $subclause) {
298 298
                 foreach ($subclause as $subsubclause_num => $subsubclause) {
299
-                    if ($subsubclause['startP']==$page && $subsubclause['startL']==$line) {
299
+                    if ($subsubclause['startP'] == $page && $subsubclause['startL'] == $line) {
300 300
                         unset($amendments[$num]);
301 301
                         $finished = true;
302 302
                     }
303 303
                     if ($finished) {
304
-                        for ($p = $subsubclause['startP']; $p<=$subsubclause['endP']; $p++) {
305
-                            if ($p>$subsubclause['startP']) $starti = 1;
304
+                        for ($p = $subsubclause['startP']; $p <= $subsubclause['endP']; $p++) {
305
+                            if ($p > $subsubclause['startP']) $starti = 1;
306 306
                             else $starti = $subsubclause['startL'];
307
-                            for ($i = $starti; $i<=$subsubclause['endL']; $i++) { # XXX Doesn't really work spanning pages
308
-                                $bill[$p][$i] = '<del title="'.$num.'">' . $bill[$p][$i] . '</del>';
307
+                            for ($i = $starti; $i <= $subsubclause['endL']; $i++) { # XXX Doesn't really work spanning pages
308
+                                $bill[$p][$i] = '<del title="' . $num . '">' . $bill[$p][$i] . '</del>';
309 309
                             }
310 310
                         }
311 311
                     }
Please login to merge, or discard this patch.
Braces   +23 added lines, -9 removed lines patch added patch discarded remove patch
@@ -39,7 +39,8 @@  discard block
 block discarded – undo
39 39
 
40 40
 if (file_exists('diff.html')) {
41 41
     $out = file_get_contents('diff.html');
42
-} else {
42
+}
43
+else {
43 44
     $bill = array(); # The bill, page by page, line by line
44 45
     $clauses = array(); # The bill, clause by clause, sub-clause by sub-clause, paragraph by paragraph. Yuk.
45 46
     parse_bill('2006141.txt');
@@ -96,7 +97,9 @@  discard block
 block discarded – undo
96 97
             }
97 98
             continue;
98 99
         }
99
-        if (substr($r, 0, 8)=='Bill 141') continue;
100
+        if (substr($r, 0, 8)=='Bill 141') {
101
+            continue;
102
+        }
100 103
         if (preg_match('#\s+([1-4]?[05])$#', $r, $m)) {
101 104
             if ($line != $m[1]) {
102 105
                 print "ERROR! $line $m[1] $r";
@@ -151,14 +154,17 @@  discard block
 block discarded – undo
151 154
         }
152 155
         if (preg_match('#^\S#', $r)) {
153 156
             $proposer = $r;
154
-        } elseif (preg_match('#^\s+(\d+)$#', $r, $m)) {
157
+        }
158
+        elseif (preg_match('#^\s+(\d+)$#', $r, $m)) {
155 159
             $number = $m[1];
156 160
             $amendments[$number] = '';
157
-        } elseif (preg_match('#To move the following Clause#', $r)) {
161
+        }
162
+        elseif (preg_match('#To move the following Clause#', $r)) {
158 163
             preg_match('#\n(.*?)$#', $amendments[$number-1], $m);
159 164
             $amendments[$number-1] = preg_replace('#\n(.*?)$#', '', $amendments[$number-1]);
160 165
             $amendments[$number] .= '*' . trim($m[1]) . "*\n$r";
161
-        } else {
166
+        }
167
+        else {
162 168
             $amendments[$number] .= $r;
163 169
         }
164 170
     }
@@ -224,7 +230,9 @@  discard block
 block discarded – undo
224 230
             $insert = isset($m[4]) ? $m[4] : null;
225 231
             unset($amendments[$num]);
226 232
             $bill[$page][$line] = '<del title="'.$num.'">'.$bill[$page][$line].'</del>';
227
-            if ($insert) $bill[$page][$line] .= '<ins title="'.$num.'">'.$insert.'</ins>';
233
+            if ($insert) {
234
+                $bill[$page][$line] .= '<ins title="'.$num.'">'.$insert.'</ins>';
235
+            }
228 236
         }
229 237
         # Page 8, line 24 [Clause 14], at end insert-- `...'
230 238
         if (preg_match('#Page\s+(\d+), line (\d+) \[Clause (\d+)\], (?:at end|after subsection \(\d+\)) insert--\s+`(.*?)\'#s', $amendment, $m)) {
@@ -302,8 +310,12 @@  discard block
 block discarded – undo
302 310
                     }
303 311
                     if ($finished) {
304 312
                         for ($p = $subsubclause['startP']; $p<=$subsubclause['endP']; $p++) {
305
-                            if ($p>$subsubclause['startP']) $starti = 1;
306
-                            else $starti = $subsubclause['startL'];
313
+                            if ($p>$subsubclause['startP']) {
314
+                                $starti = 1;
315
+                            }
316
+                            else {
317
+                                $starti = $subsubclause['startL'];
318
+                            }
307 319
                             for ($i = $starti; $i<=$subsubclause['endL']; $i++) { # XXX Doesn't really work spanning pages
308 320
                                 $bill[$p][$i] = '<del title="'.$num.'">' . $bill[$p][$i] . '</del>';
309 321
                             }
@@ -321,7 +333,9 @@  discard block
 block discarded – undo
321 333
             foreach ($clauses[$clause] as $subclause_num => $subclause) {
322 334
                 foreach ($subclause as $subsubclause_num => $subsubclause) {
323 335
                     if ($subsubclause['endP'] > $page) { $page = $subsubclause['endP']; $line = 0; }
324
-                    if ($subsubclause['endL'] > $line) $line = $subsubclause['endL'];
336
+                    if ($subsubclause['endL'] > $line) {
337
+                        $line = $subsubclause['endL'];
338
+                    }
325 339
                 }
326 340
             }
327 341
             $bill[$page][$line] .= "<ins title='$num'>$amendment</ins>\n\n";
Please login to merge, or discard this patch.
www/docs/calendar/index.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,13 +5,16 @@  discard block
 block discarded – undo
5 5
 $date = get_http_var('d');
6 6
 if (!$date || !preg_match('#^\d\d\d\d-\d\d-\d\d$#', $date)) {
7 7
     calendar_summary();
8
-} elseif ($date == date('Y-m-d')) {
8
+}
9
+elseif ($date == date('Y-m-d')) {
9 10
     $this_page = 'calendar_today';
10 11
     calendar_date($date);
11
-} elseif ($date > date('Y-m-d')) {
12
+}
13
+elseif ($date > date('Y-m-d')) {
12 14
     $this_page = 'calendar_future';
13 15
     calendar_date($date);
14
-} else {
16
+}
17
+else {
15 18
     $this_page = 'calendar_past';
16 19
     calendar_date($date);
17 20
 }
@@ -35,7 +38,8 @@  discard block
 block discarded – undo
35 38
 
36 39
     if ($min_future_date == date('Y-m-d')) {
37 40
         $this_page = 'calendar_today';
38
-    } else {
41
+    }
42
+    else {
39 43
         $this_page = 'calendar_future';
40 44
     }
41 45
 
Please login to merge, or discard this patch.
www/docs/admin/websites.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     $sysretval = 0;
108 108
     $personid = get_http_var('editperson');
109 109
 
110
-    $q  = $db->query("DELETE FROM personinfo WHERE data_key = 'mp_website' AND personinfo.person_id = :person_id", array(
110
+    $q = $db->query("DELETE FROM personinfo WHERE data_key = 'mp_website' AND personinfo.person_id = :person_id", array(
111 111
         ':person_id' => $personid
112 112
         ));
113 113
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
     if ($q->success()) {
122 122
         exec($scriptpath . "/db2xml.pl --update_person --personid=" . escapeshellarg($personid) . " --debug", $exec_output);
123 123
         $out = '<p id="warning">';
124
-        foreach ($exec_output as $message) {$out .= $message . "<br>";}
124
+        foreach ($exec_output as $message) {$out .= $message . "<br>"; }
125 125
         $out .= '</p>';
126 126
         # ../../../scripts/db2xml.pl  --update_person --personid=10001
127 127
     }
@@ -140,9 +140,9 @@  discard block
 block discarded – undo
140 140
 
141 141
     $rettext .= '<div id="subnav_websites">';
142 142
     foreach ($subnav as $label => $path) {
143
-        $rettext .=  '<a href="'. $path . '">'. $label .'</a>';
143
+        $rettext .= '<a href="' . $path . '">' . $label . '</a>';
144 144
     }
145
-    $rettext .=  '</div>';
145
+    $rettext .= '</div>';
146 146
 
147 147
     return $rettext;
148 148
 }
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,8 @@  discard block
 block discarded – undo
22 22
 
23 23
 if (get_http_var('editperson')) {
24 24
     $out .= edit_member_form();
25
-} else {
25
+}
26
+else {
26 27
     $out .= list_members();
27 28
 }
28 29
 
@@ -86,7 +87,8 @@  discard block
 block discarded – undo
86 87
         $out .= ' <small>[<a href="websites.php?editperson=' . $q->field($row, 'person_id') . '"';
87 88
         if ($mp_website) {
88 89
             $out .= ' title="Change URL ' . $mp_website . '">Edit URL</a>]</small>';
89
-        } else {
90
+        }
91
+        else {
90 92
             $out .= '>Add URL</a>]</small>';
91 93
         }
92 94
         $out .= ' ' . $name;
Please login to merge, or discard this patch.
www/docs/admin/popularsearches.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 include_once '../../includes/easyparliament/init.php';
4
-include_once (INCLUDESPATH."easyparliament/searchlog.php");
4
+include_once (INCLUDESPATH . "easyparliament/searchlog.php");
5 5
 
6 6
 $this_page = "admin_popularsearches";
7 7
 
@@ -14,14 +14,14 @@  discard block
 block discarded – undo
14 14
 
15 15
 $rows = array();
16 16
 foreach ($search_popular as $row) {
17
-    $rows[] = array (
18
-        '<a href="'.$row['url'].'">' . _htmlentities($row['query']) . '</a>',
17
+    $rows[] = array(
18
+        '<a href="' . $row['url'] . '">' . _htmlentities($row['query']) . '</a>',
19 19
         $row['c'],
20 20
     );
21 21
 }
22 22
 
23
-$tabledata = array (
24
-    'header' => array (
23
+$tabledata = array(
24
+    'header' => array(
25 25
         'Query',
26 26
         'Count'
27 27
     ),
Please login to merge, or discard this patch.
www/docs/admin/searchlogs.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 include_once '../../includes/easyparliament/init.php';
4
-include_once (INCLUDESPATH."easyparliament/searchlog.php");
4
+include_once (INCLUDESPATH . "easyparliament/searchlog.php");
5 5
 
6 6
 $this_page = "admin_searchlogs";
7 7
 
@@ -18,8 +18,8 @@  discard block
 block discarded – undo
18 18
     $host = trim_characters($host, strlen($host) - 25, 100);
19 19
     $time = relative_time($row['query_time']);
20 20
     $time = str_replace(" ago", "", $time);
21
-    $rows[] = array (
22
-        '<a href="'.$row['url'].'">' . _htmlentities($row['query']) . '</a>',
21
+    $rows[] = array(
22
+        '<a href="' . $row['url'] . '">' . _htmlentities($row['query']) . '</a>',
23 23
         $row['page_number'],
24 24
         $row['count_hits'],
25 25
         $host,
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
     );
28 28
 }
29 29
 
30
-$tabledata = array (
31
-    'header' => array (
30
+$tabledata = array(
31
+    'header' => array(
32 32
         'Query',
33 33
         'Page',
34 34
         'Hits',
Please login to merge, or discard this patch.
www/docs/admin/failedsearches.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 include_once '../../includes/easyparliament/init.php';
4
-include_once (INCLUDESPATH."easyparliament/searchlog.php");
4
+include_once (INCLUDESPATH . "easyparliament/searchlog.php");
5 5
 
6 6
 $this_page = "admin_failedsearches";
7 7
 
@@ -20,17 +20,17 @@  discard block
 block discarded – undo
20 20
     $max_time = relative_time($row['max_time']);
21 21
     $min_time = str_replace(" ago", "", $min_time);
22 22
     $max_time = str_replace(" ago", "", $max_time);
23
-    $rows[] = array (
23
+    $rows[] = array(
24 24
         $row['count_ips'],
25 25
         $row['group_count'],
26
-        '<a href="'.$row['url'].'">'._htmlentities($row['query']).'</a>',
26
+        '<a href="' . $row['url'] . '">' . _htmlentities($row['query']) . '</a>',
27 27
         $max_time,
28 28
         $min_time,
29 29
     );
30 30
 }
31 31
 
32
-$tabledata = array (
33
-    'header' => array (
32
+$tabledata = array(
33
+    'header' => array(
34 34
         'Distinct IPs',
35 35
         'Number of times',
36 36
         'Query',
Please login to merge, or discard this patch.
www/docs/admin/index.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 include_once '../../includes/easyparliament/init.php';
4
-include_once (INCLUDESPATH."easyparliament/commentreportlist.php");
4
+include_once (INCLUDESPATH . "easyparliament/commentreportlist.php");
5 5
 
6 6
 $this_page = "admin_home";
7 7
 
@@ -22,11 +22,11 @@  discard block
 block discarded – undo
22 22
 $q = $db->query("SELECT COUNT(*) AS count FROM users WHERE confirmed = '0'");
23 23
 $unconfirmedusers = $q->field(0, 'count');
24 24
 
25
-$olddate = gmdate("Y-m-d H:i:s", time()-86400);
25
+$olddate = gmdate("Y-m-d H:i:s", time() - 86400);
26 26
 $q = $db->query("SELECT COUNT(*) AS count FROM users WHERE lastvisit > '$olddate'");
27 27
 $dayusers = $q->field(0, 'count');
28 28
 
29
-$olddate = gmdate("Y-m-d H:i:s", time()-86400*7);
29
+$olddate = gmdate("Y-m-d H:i:s", time() - 86400 * 7);
30 30
 $q = $db->query("SELECT COUNT(*) AS count FROM users WHERE lastvisit > '$olddate'");
31 31
 $weekusers = $q->field(0, 'count');
32 32
 ?>
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 $rows = array();
62 62
 $USERURL = new URL('userview');
63 63
 
64
-for ($row=0; $row<$q->rows(); $row++) {
64
+for ($row = 0; $row < $q->rows(); $row++) {
65 65
 
66 66
     $user_id = $q->field($row, 'user_id');
67 67
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         $name = _htmlspecialchars($q->field($row, 'firstname') . ' ' . $q->field($row, 'lastname'));
77 77
     }
78 78
 
79
-    $rows[] = array (
79
+    $rows[] = array(
80 80
         $name,
81 81
         '<a href="mailto:' . $q->field($row, 'email') . '">' . $q->field($row, 'email') . '</a>',
82 82
         $confirmed,
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
     );
85 85
 }
86 86
 
87
-$tabledata = array (
88
-    'header' => array (
87
+$tabledata = array(
88
+    'header' => array(
89 89
         'Name',
90 90
         'Email',
91 91
         'Confirmed?',
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,8 @@
 block discarded – undo
71 71
         $confirmed = 'Yes';
72 72
         $name = '<a href="' . $USERURL->generate() . '">' . _htmlspecialchars($q->field($row, 'firstname'))
73 73
             . ' ' . _htmlspecialchars($q->field($row, 'lastname')) . '</a>';
74
-    } else {
74
+    }
75
+    else {
75 76
         $confirmed = 'No';
76 77
         $name = _htmlspecialchars($q->field($row, 'firstname') . ' ' . $q->field($row, 'lastname'));
77 78
     }
Please login to merge, or discard this patch.
www/docs/admin/badusers.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 include_once '../../includes/easyparliament/init.php';
4
-include_once (INCLUDESPATH."easyparliament/commentreportlist.php");
4
+include_once (INCLUDESPATH . "easyparliament/commentreportlist.php");
5 5
 
6 6
 $this_page = "admin_badusers";
7 7
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 $rows = array();
33 33
 $USERURL = new URL('userview');
34 34
 
35
-for ($row=0; $row<$q->rows(); $row++) {
35
+for ($row = 0; $row < $q->rows(); $row++) {
36 36
 
37 37
     $user_id = $q->field($row, 'user_id');
38 38
 
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
     $totalcomments = $r->field(0, 'totalcount');
45 45
 
46
-    $percentagedeleted = ( $q->field($row, 'deletedcount') / $totalcomments ) * 100;
46
+    $percentagedeleted = ($q->field($row, 'deletedcount') / $totalcomments) * 100;
47 47
 
48 48
 
49 49
     // Get complaints made about this user's comments, but not upheld.
@@ -59,17 +59,17 @@  discard block
 block discarded – undo
59 59
 
60 60
     $USERURL->insert(array('u'=>$user_id));
61 61
 
62
-    $rows[] = array (
62
+    $rows[] = array(
63 63
         '<a href="' . $USERURL->generate() . '">' . $q->field($row, 'firstname') . ' ' . $q->field($row, 'lastname') . '</a>',
64 64
         $totalcomments,
65 65
         $q->field($row, 'deletedcount'),
66
-        $percentagedeleted.'%',
66
+        $percentagedeleted . '%',
67 67
         $notupheldcount
68 68
     );
69 69
 }
70 70
 
71
-$tabledata = array (
72
-    'header' => array (
71
+$tabledata = array(
72
+    'header' => array(
73 73
         'Name',
74 74
         'Total comments',
75 75
         'Number deleted',
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 $rows = array();
106 106
 $USERURL = new URL('userview');
107 107
 
108
-for ($row=0; $row<$q->rows(); $row++) {
108
+for ($row = 0; $row < $q->rows(); $row++) {
109 109
 
110 110
     $user_id = $q->field($row, 'user_id');
111 111
 
@@ -117,15 +117,15 @@  discard block
 block discarded – undo
117 117
                     WHERE	user_id = '$user_id'
118 118
                     AND		upheld = '1'");
119 119
 
120
-    $rows[] = array (
120
+    $rows[] = array(
121 121
         '<a href="' . $USERURL->generate() . '">' . $q->field($row, 'firstname') . ' ' . $q->field($row, 'lastname') . '</a>',
122 122
         $q->field($row, 'rejectedcount'),
123 123
         $r->field(0, 'upheldcount')
124 124
     );
125 125
 
126 126
 }
127
-$tabledata = array (
128
-    'header' => array (
127
+$tabledata = array(
128
+    'header' => array(
129 129
         'Name',
130 130
         'Reports not upheld',
131 131
         'Reports upheld'
Please login to merge, or discard this patch.