Passed
Pull Request — master (#1700)
by Struan
04:10
created
classes/SectionView/SectionView.php 2 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -512,7 +512,7 @@
 block discarded – undo
512 512
             if ($row['totalcomments'] > 1) {
513 513
                 $morecount = $row['totalcomments'] - 1;
514 514
                 $plural = $morecount == 1 ? 'annotation' : 'annotations';
515
-                $linktext = "Read $morecount more $plural";
515
+                $linktext = "read $morecount more $plural";
516 516
             }
517 517
 
518 518
         } else {
Please login to merge, or discard this patch.
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
             $data = $this->addCommonData($data);
39 39
         } elseif ($date = get_http_var('d')) {
40 40
             $data = $this->display_day($date);
41
-            if ( !isset($data['template']) ) {
41
+            if (!isset($data['template'])) {
42 42
                 $data['template'] = 'section/day';
43 43
             }
44 44
             $data = $this->addCommonData($data);
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
             $data = $this->display_section_or_speech();
47 47
         } else {
48 48
             $data = $this->display_front();
49
-            if ( !isset($data['template']) ) {
49
+            if (!isset($data['template'])) {
50 50
                 $data['template'] = 'section/recent';
51 51
             }
52 52
             $data['search_sections'] = $this->getSearchSections();
@@ -68,10 +68,10 @@  discard block
 block discarded – undo
68 68
         $data['recess_major'] = $this->getRecessMajor();
69 69
 
70 70
         $nextprev = $DATA->page_metadata($this_page, 'nextprev');
71
-        if ( isset($nextprev['next']['url']) ) {
71
+        if (isset($nextprev['next']['url'])) {
72 72
             $data['next'] = $nextprev['next'];
73 73
         }
74
-        if ( isset($nextprev['prev']['url']) ) {
74
+        if (isset($nextprev['prev']['url'])) {
75 75
             $data['prev'] = $nextprev['prev'];
76 76
         }
77 77
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         if (!isset($data['title']) && $parent_page != '') {
81 81
             $data['title'] = $DATA->page_metadata($parent_page, 'title');
82 82
         }
83
-        if ( $parent_page ) {
83
+        if ($parent_page) {
84 84
             $data['parent_title'] = $DATA->page_metadata($parent_page, 'title');
85 85
         }
86 86
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 
97 97
         $urls = array_merge($urls, $this->getViewUrls());
98 98
 
99
-        if ( isset($data['info']['page']) ) {
99
+        if (isset($data['info']['page'])) {
100 100
             $day = new \MySociety\TheyWorkForYou\Url($data['info']['page']);
101 101
             $urls['day'] = $day;
102 102
         }
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
             $DATA->set_page_metadata($this_page, 'title', $year);
141 141
         }
142 142
 
143
-        $args = array ( 'year' => $year );
143
+        $args = array('year' => $year);
144 144
         $data = $this->list->display('calendar', $args, 'none');
145 145
         return $data;
146 146
     }
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
     protected function display_column($date, $column) {
149 149
         global $this_page;
150 150
         $this_page = $this->page_base;
151
-        $args = array( 'date' => $date, 'column' => $column );
151
+        $args = array('date' => $date, 'column' => $column);
152 152
         $content = $this->list->display('column', $args, 'none');
153 153
 
154 154
         $data = array();
@@ -168,12 +168,12 @@  discard block
 block discarded – undo
168 168
     protected function display_day($date) {
169 169
         global $this_page;
170 170
         $this_page = $this->page_base . 'day';
171
-        $args = array ( 'date' => get_http_var('d') );
171
+        $args = array('date' => get_http_var('d'));
172 172
         $data = $this->list->display('date', $args, 'none');
173 173
         list($year, $month, $day) = explode('-', $date);
174
-        $args = array( 'year' => $year, 'month' => $month, 'day' => $day);
174
+        $args = array('year' => $year, 'month' => $month, 'day' => $day);
175 175
         $calendar = $this->list->display('calendar', $args, 'none');
176
-        if ( isset($calendar['years']) ) {
176
+        if (isset($calendar['years'])) {
177 177
             $data['calendar'] = $calendar['years'];
178 178
         }
179 179
         return $data;
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
         global $DATA, $this_page, $THEUSER;
184 184
 
185 185
         # += as we *don't* want to override any already supplied argument
186
-        $args += array (
186
+        $args += array(
187 187
             'gid' => get_http_var('id'),
188 188
             's' => get_http_var('s'), // Search terms to be highlighted.
189 189
             'member_id' => get_http_var('m'), // Member's speeches to be highlighted.
@@ -200,14 +200,14 @@  discard block
 block discarded – undo
200 200
             if ($this->major == 6) {
201 201
                 # Magically (as in I can't remember quite why), pbc_clause will
202 202
                 # contain the new URL without any change...
203
-                $URL->remove( array('id') );
203
+                $URL->remove(array('id'));
204 204
             } else {
205
-                $URL->insert( array('id'=>$e->getMessage()) );
205
+                $URL->insert(array('id'=>$e->getMessage()));
206 206
             }
207 207
             # put the search term back in so highlighting works.
208 208
             # NB: as we don't see the # part of the URL we lose this :(
209
-            if ( $args['s'] !== '' ) {
210
-                $URL->insert( array('s'=>$args['s']) );
209
+            if ($args['s'] !== '') {
210
+                $URL->insert(array('s'=>$args['s']));
211 211
             }
212 212
             redirect($URL->generate('none'), 301);
213 213
         }
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
         if (array_key_exists('text_heading', $data['info'])) {
285 285
             // avoid having Clause 1 etc as the alert text search string on PBC pages as it's
286 286
             // almost certainly not what the person wants
287
-            if ( $this->major == 6 ) {
287
+            if ($this->major == 6) {
288 288
                 $data['email_alert_text'] = $data['section_title'];
289 289
             } else {
290 290
                 $data['email_alert_text'] = $data['info']['text_heading'];
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
             $body = preg_replace('#<phrase class="honfriend" id="uk.org.publicwhip/member/(\d+)" name="([^"]*?)">(.*?\s*\((.*?)\))</phrase>#', '<a href="/mp/?m=$1" title="Our page on $2 - \'$3\'">$4</a>', $body);
332 332
             $body = preg_replace('#<phrase class="honfriend" name="([^"]*?)" person_id="uk.org.publicwhip/person/(\d+)">(.*?\s*\((.*?)\))</phrase>#', '<a href="/mp/?p=$2" title="Our page on $1 - \'$3\'">$4</a>', $body);
333 333
             $body = preg_replace_callback('#<phrase class="offrep" id="(.*?)/(\d+)-(\d+)-(\d+)\.(.*?)">(.*?)</phrase>#', function($matches) {
334
-                return '<a href="/search/?pop=1&s=date:' . $matches[2] . $matches[3] . $matches[4] . '+column:' . $matches[5] . '+section:' . $matches[1] .'">' . str_replace("Official Report", "Hansard", $matches[6]) . '</a>';
334
+                return '<a href="/search/?pop=1&s=date:' . $matches[2] . $matches[3] . $matches[4] . '+column:' . $matches[5] . '+section:' . $matches[1] . '">' . str_replace("Official Report", "Hansard", $matches[6]) . '</a>';
335 335
             }, $body);
336 336
             #$body = preg_replace('#<phrase class="offrep" id="((.*?)/(\d+)-(\d+)-(\d+)\.(.*?))">(.*?)</phrase>#e', "\"<a href='/search/?pop=1&amp;s=date:$3$4$5+column:$6+section:$2&amp;match=$1'>\" . str_replace('Official Report', 'Hansard', '$7') . '</a>'", $body);
337 337
             $bodies[] = $body;
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
         $data['section_title'] = '';
365 365
         $subsection_title = '';
366 366
         $rows = count($data['rows']);
367
-        for ($i=0; $i<$rows; $i++) {
367
+        for ($i = 0; $i < $rows; $i++) {
368 368
             $row = $data['rows'][$i];
369 369
             $htype = $row['htype'];
370 370
             // HPOS should be defined below if it's needed; otherwise default to 0
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
                 # Voting links
388 388
                 $data['rows'][$i]['voting_data'] = '';
389 389
                 if (isset($row['votes'])) {
390
-                    $data['rows'][$i]['voting_data'] = $this->generate_votes( $row['votes'], $row['epobject_id'], $row['gid'] );
390
+                    $data['rows'][$i]['voting_data'] = $this->generate_votes($row['votes'], $row['epobject_id'], $row['gid']);
391 391
                 }
392 392
 
393 393
                 # Annotation link
@@ -424,62 +424,62 @@  discard block
 block discarded – undo
424 424
 
425 425
     private function getCountryDetails() {
426 426
         $details = array(
427
-            1 => array (
427
+            1 => array(
428 428
                 'country' => 'UK',
429 429
                 'assembly' => 'uk-commons',
430 430
                 'location' => '&ndash; in the House of Commons'
431 431
             ),
432
-            2 => array (
432
+            2 => array(
433 433
                 'country' => 'UK',
434 434
                 'assembly' => 'uk-commons',
435 435
                 'location' => '&ndash; in Westminster Hall'
436 436
             ),
437
-            3 => array (
437
+            3 => array(
438 438
                 'country' => 'UK',
439 439
                 'assembly' => 'uk-commons',
440 440
                 'location' => 'written question &ndash; answered'
441 441
             ),
442
-            4 => array (
442
+            4 => array(
443 443
                 'country' => 'UK',
444 444
                 'assembly' => 'uk-commons',
445 445
                 'location' => 'written statement &ndash; made'
446 446
             ),
447
-            5 => array (
447
+            5 => array(
448 448
                 'country' => 'NORTHERN IRELAND',
449 449
                 'assembly' => 'ni',
450 450
                 'location' => '&ndash; in the Northern Ireland Assembly'
451 451
             ),
452
-            6 => array (
452
+            6 => array(
453 453
                 'country' => 'UK',
454 454
                 'assembly' => 'uk-commons',
455 455
                 'location' => '&ndash; in a Public Bill Committee'
456 456
             ),
457
-            7 => array (
457
+            7 => array(
458 458
                 'country' => 'SCOTLAND',
459 459
                 'assembly' => 'scotland',
460 460
                 'location' => '&ndash; in the Scottish Parliament'
461 461
             ),
462
-            8 => array (
462
+            8 => array(
463 463
                 'country' => 'SCOTLAND',
464 464
                 'assembly' => 'scotland',
465 465
                 'location' => '&ndash; Scottish Parliament written question &ndash; answered'
466 466
             ),
467
-            9 => array (
467
+            9 => array(
468 468
                 'country' => 'LONDON',
469 469
                 'assembly' => 'london-assembly',
470 470
                 'location' => 'Questions to the Mayor of London &ndash; answered'
471 471
             ),
472
-            10 => array (
472
+            10 => array(
473 473
                 'country' => 'WALES',
474 474
                 'assembly' => 'senedd',
475 475
                 'location' => '&ndash; in the Welsh Parliament'
476 476
             ),
477
-            11 => array (
477
+            11 => array(
478 478
                 'country' => 'WALES',
479 479
                 'assembly' => 'senedd',
480 480
                 'location' => '&ndash; Senedd Cymru'
481 481
             ),
482
-            101 => array (
482
+            101 => array(
483 483
                 'country' => 'UK',
484 484
                 'assembly' => 'uk-lords',
485 485
                 'location' => '&ndash; in the House of Lords'
@@ -512,7 +512,7 @@  discard block
 block discarded – undo
512 512
         global $DATA, $this_page;
513 513
         $this_page = $this->page_base . 'front';
514 514
         $data = array();
515
-        if ( $this->index_template ) {
515
+        if ($this->index_template) {
516 516
             $data['template'] = $this->index_template;
517 517
         }
518 518
 
@@ -522,7 +522,7 @@  discard block
 block discarded – undo
522 522
 
523 523
         $content['calendar'] = $class->display('calendar', array('months' => 1), 'none');
524 524
 
525
-        if ( $rssurl = $DATA->page_metadata($this_page, 'rss') ) {
525
+        if ($rssurl = $DATA->page_metadata($this_page, 'rss')) {
526 526
             $content['rssurl'] = $rssurl;
527 527
         }
528 528
 
@@ -537,7 +537,7 @@  discard block
 block discarded – undo
537 537
     }
538 538
 
539 539
     //$totalcomments, $comment, $commenturl
540
-    function generate_commentteaser ($row) {
540
+    function generate_commentteaser($row) {
541 541
         // Returns HTML for the one fragment of comment and link for the sidebar.
542 542
         // $totalcomments is the number of comments this item has on it.
543 543
         // $comment is an array like:
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/static/linktous.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
     </form>
25 25
 </div>
26 26
 <!-- TheyWorkForYou box, end -->
27
-END;
27
+end;
28 28
 print $link_to_us_form;
29 29
 ?>
30 30
 
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/scotland/index.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
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">
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,10 +11,10 @@  discard block
 block discarded – undo
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,7 +57,7 @@  discard block
 block discarded – undo
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 ) {
60
+                        <?php if ($featured) {
61 61
                              include dirname(__FILE__) . "/../homepage/featured.php";
62 62
                         } ?>
63 63
                     </div>
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 
105 105
                         <h2>Recently in Parliament</h2>
106 106
                         <ul class="recently__list"><?php
107
-                            foreach ( $debates['recent'] as $recent ) {
107
+                            foreach ($debates['recent'] as $recent) {
108 108
                                 include dirname(__FILE__) . '/../homepage/recent-debates.php';
109 109
                             }
110 110
                         ?></ul>
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/section/_section_content.php 3 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@
 block discarded – undo
157 157
               <?php # XXX
158 158
                 if ($data['info']['major'] == 8 && preg_match('#\d{4}-\d\d-\d\d\.(.*?)\.q#', $speech['gid'], $m)) {
159 159
                     ?><p class="debate-speech__question_id"><small>
160
-                    <?= "Question $m[1]" ?>
160
+                    <?= "question $m[1]" ?>
161 161
                     </small></p>
162 162
               <?php } ?>
163 163
             </h2>
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@  discard block
 block discarded – undo
12 12
         if ($hansardmajors[$data['info']['major']]['location'] == 'Scotland') {
13 13
             $body = preg_replace('# (S\d[O0WF]-\d+)[, ]#', ' <a href="/spwrans/?spid=$1">$1</a> ', $body);
14 14
             $body = preg_replace_callback('#<citation id="uk\.org\.publicwhip/(.*?)/(.*?)">\[(.*?)\]</citation>#', function($matches) {
15
-                   if ($matches[1] == 'spor') {
16
-                       $href_segment = 'sp/?g';
17
-                   } elseif ($matches[1] == 'spwa') {
15
+                    if ($matches[1] == 'spor') {
16
+                        $href_segment = 'sp/?g';
17
+                    } elseif ($matches[1] == 'spwa') {
18 18
                         $href_segment = 'spwrans/?';
19 19
                     } else {
20 20
                         $href_segment = 'debates/?';
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
                     $after_mp = $speech['after_mp'];
192 192
                 }
193 193
                 include dirname(__FILE__) . '/../divisions/_your_mp.php';
194
-              } ?>
194
+                } ?>
195 195
                 <div class="debate-speech__division__details">
196 196
                   <?php include dirname(__FILE__) . '/../divisions/_votes.php'; ?>
197 197
                 </div>
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-foreach($data['rows'] as $speech) { ?>
3
+foreach ($data['rows'] as $speech) { ?>
4 4
 
5 5
     <?php
6 6
 
@@ -63,27 +63,27 @@  discard block
 block discarded – undo
63 63
     $source = array();
64 64
 
65 65
     $major = $data['info']['major'];
66
-    if ($major==1 || $major==2 || (($major==3 || $major==4) && isset($speech['speaker']['house'])) || $major==101 || $major==6) {
66
+    if ($major == 1 || $major == 2 || (($major == 3 || $major == 4) && isset($speech['speaker']['house'])) || $major == 101 || $major == 6) {
67 67
         $source['title'] = 'Citation: ';
68
-        if ($major==1 || $major==2) {
68
+        if ($major == 1 || $major == 2) {
69 69
             $source['title'] .= 'HC';
70
-        } elseif ($major==3 || $major==4) {
71
-            if ($speech['speaker']['house']==1) {
70
+        } elseif ($major == 3 || $major == 4) {
71
+            if ($speech['speaker']['house'] == 1) {
72 72
                 $source['title'] .= 'HC';
73 73
             } else {
74 74
                 $source['title'] .= 'HL';
75 75
             }
76
-        } elseif ($major==6) {
76
+        } elseif ($major == 6) {
77 77
             $source['title'] .= $data['section_title'];
78 78
         } else {
79 79
             $source['title'] .= 'HL';
80 80
         }
81 81
         $source['title'] .= ' Deb, ' . format_date($data['info']['date'], LONGDATEFORMAT) . ', c' . $speech['colnum'];
82
-        if ($major==2) {
82
+        if ($major == 2) {
83 83
             $source['title'] .= 'WH';
84
-        } elseif ($major==3) {
84
+        } elseif ($major == 3) {
85 85
             $source['title'] .= 'W';
86
-        } elseif ($major==4) {
86
+        } elseif ($major == 4) {
87 87
             $source['title'] .= 'WS';
88 88
         }
89 89
     }
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
             <div class="debate-speech__speaker-and-content">
121 121
             <?php } ?>
122 122
 
123
-          <?php if(isset($speech['speaker']) && count($speech['speaker']) > 0) { ?>
123
+          <?php if (isset($speech['speaker']) && count($speech['speaker']) > 0) { ?>
124 124
             <h2 class="debate-speech__speaker">
125 125
                 <?php
126 126
 
@@ -187,17 +187,17 @@  discard block
 block discarded – undo
187 187
                 <?php if ($division['has_description']) { ?>
188 188
                 <div class="debate-speech__division__details">
189 189
                     <span class="policy-vote__text">
190
-                        <?php include( dirname(__FILE__) . '/../divisions/_vote_description.php'); ?>
190
+                        <?php include(dirname(__FILE__) . '/../divisions/_vote_description.php'); ?>
191 191
                     </span><br>
192 192
                 </div>
193 193
                 <?php } ?>
194 194
 
195 195
               <?php if (isset($speech['mp_vote'])) {
196
-                $mp_vote = array( 'vote' => $speech['mp_vote']['vote'] );
197
-                if ( isset($speech['before_mp']) ) {
196
+                $mp_vote = array('vote' => $speech['mp_vote']['vote']);
197
+                if (isset($speech['before_mp'])) {
198 198
                     $before_mp = $speech['before_mp'];
199 199
                 }
200
-                if ( isset($speech['after_mp']) ) {
200
+                if (isset($speech['after_mp'])) {
201 201
                     $after_mp = $speech['after_mp'];
202 202
                 }
203 203
                 include dirname(__FILE__) . '/../divisions/_your_mp.php';
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
             <div class="debate-speech__content"><?=$body ?></div>
210 210
             <?php } ?>
211 211
 
212
-            <?php if ( $section ) {
212
+            <?php if ($section) {
213 213
                 if ($speech['voting_data']) { ?>
214 214
 
215 215
                 <div class="debate-speech__question-answered">
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
                     $moreinfo[] = sprintf(ngettext('%s annotation', '%s annotations', $row['totalcomments']), $row['totalcomments']);
348 348
                 }
349 349
                 if (count($moreinfo) > 0) {
350
-                    print "<small>(" . implode (', ', $moreinfo) . ") </small>";
350
+                    print "<small>(" . implode(', ', $moreinfo) . ") </small>";
351 351
                 }
352 352
             } else {
353 353
                 // Nothing in this item, so no link.
Please login to merge, or discard this patch.
www/includes/easyparliament/comment.php 3 patches
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     public $body = '';
32 32
     public $posted = '';
33 33
     public $visible = false;
34
-    public $modflagged = NULL;	// Is a datetime when set.
34
+    public $modflagged = null;	// Is a datetime when set.
35 35
     public $firstname = '';	// Of the person who posted it.
36 36
     public $lastname = '';
37 37
     public $url = '';
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
             $flag = "'$date'";
139 139
 
140 140
         } elseif ($switch == 'off') {
141
-            $date = NULL;
141
+            $date = null;
142 142
             $flag = 'NULL';
143 143
 
144 144
         } else {
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -210,8 +210,8 @@
 block discarded – undo
210 210
                             array(':epobject_id' => $this->epobject_id))->first();
211 211
 
212 212
             if ($q) {
213
-                 // If you change stuff here, you might have to change it in
214
-                 // $COMMENTLIST->_get_comment_data() too...
213
+                    // If you change stuff here, you might have to change it in
214
+                    // $COMMENTLIST->_get_comment_data() too...
215 215
 
216 216
                 $gid = fix_gid_from_db($q['gid']); // In includes/utility.php
217 217
 
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
     public $body = '';
32 32
     public $posted = '';
33 33
     public $visible = false;
34
-    public $modflagged = NULL;	// Is a datetime when set.
35
-    public $firstname = '';	// Of the person who posted it.
34
+    public $modflagged = NULL; // Is a datetime when set.
35
+    public $firstname = ''; // Of the person who posted it.
36 36
     public $lastname = '';
37 37
     public $url = '';
38 38
 
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     public $exists = false;
42 42
 
43 43
 
44
-    public function __construct($comment_id='') {
44
+    public function __construct($comment_id = '') {
45 45
 
46 46
         $this->db = new ParlDB;
47 47
 
@@ -69,12 +69,12 @@  discard block
 block discarded – undo
69 69
             if ($q) {
70 70
 
71 71
                 $this->comment_id 	= $comment_id;
72
-                $this->user_id		= $q['user_id'];
72
+                $this->user_id = $q['user_id'];
73 73
                 $this->epobject_id	= $q['epobject_id'];
74
-                $this->body			= $q['body'];
75
-                $this->posted		= $q['posted'];
76
-                $this->visible		= $q['visible'];
77
-                $this->modflagged	= $q['modflagged'];
74
+                $this->body = $q['body'];
75
+                $this->posted = $q['posted'];
76
+                $this->visible = $q['visible'];
77
+                $this->modflagged = $q['modflagged'];
78 78
 
79 79
                 // Sets the URL and username for this comment. Duh.
80 80
                 $this->_set_url();
@@ -104,9 +104,9 @@  discard block
 block discarded – undo
104 104
     public function comments_enabled() { return $this->comments_enabled; }
105 105
 
106 106
 
107
-    public function display($format='html', $template='comments') {
107
+    public function display($format = 'html', $template = 'comments') {
108 108
 
109
-        $data['comments'][0] = array (
109
+        $data['comments'][0] = array(
110 110
             'comment_id'	=> $this->comment_id,
111 111
             'user_id'		=> $this->user_id,
112 112
             'epobject_id'	=> $this->epobject_id,
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
             $flag = 'NULL';
143 143
 
144 144
         } else {
145
-            $PAGE->error_message ("Why are you trying to switch this comment's modflag to '" . _htmlentities($switch) . "'!");
145
+            $PAGE->error_message("Why are you trying to switch this comment's modflag to '" . _htmlentities($switch) . "'!");
146 146
         }
147 147
 
148 148
         $q = $this->db->query("UPDATE comments
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
             $this->modflagged = $date;
155 155
             return true;
156 156
         } else {
157
-            $message = array (
157
+            $message = array(
158 158
                 'title' => 'Sorry',
159 159
                 'text' => "We couldn't update the annotation's modflag."
160 160
             );
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
             if ($q->success()) {
177 177
                 return true;
178 178
             } else {
179
-                $message = array (
179
+                $message = array(
180 180
                     'title' => 'Sorry',
181 181
                     'text' => "We were unable to delete the annotation."
182 182
                 );
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
             }
186 186
 
187 187
         } else {
188
-            $message = array (
188
+            $message = array(
189 189
                 'title' => 'Sorry',
190 190
                 'text' => "You are not authorised to delete annotations."
191 191
             );
Please login to merge, or discard this patch.
www/includes/easyparliament/staticpages/search_help.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 </li>
32 32
 
33 33
 <?php
34
-$user_agent = ( isset( $_SERVER['HTTP_USER_AGENT'] ) ) ? strtolower( $_SERVER['HTTP_USER_AGENT'] ) : '';
34
+$user_agent = (isset($_SERVER['HTTP_USER_AGENT'])) ? strtolower($_SERVER['HTTP_USER_AGENT']) : '';
35 35
 if (stristr($user_agent, 'Firefox/')) {
36 36
 ?>
37 37
      <li>You can also add TheyWorkForYou to <a href="http://mycroft.mozdev.org/download.html?name=theyworkforyou">Firefox's search box</a>.</li>
Please login to merge, or discard this patch.
www/includes/easyparliament/commentlist.php 2 patches
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -542,11 +542,11 @@
 block discarded – undo
542 542
         }
543 543
         if ($limit != '') {
544 544
             # Can't use parameter as >1 argument
545
-            $limit = "LIMIT $limit";
545
+            $limit = "limit $limit";
546 546
         }
547 547
 
548 548
         // Finally, do the query!
549
-        $q = $this->db->query ("SELECT $fields
549
+        $q = $this->db->query ("select $fields
550 550
                         FROM 	comments
551 551
                         $join
552 552
                         WHERE $where
Please login to merge, or discard this patch.
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     }
43 43
 
44 44
 
45
-    public function display ($view, $args=array(), $format='html') {
45
+    public function display($view, $args = array(), $format = 'html') {
46 46
         // $view is what we're viewing by:
47 47
         //	'ep' is all the comments attached to an epobject.
48 48
         //	'user' is all the comments written by a user.
@@ -60,13 +60,13 @@  discard block
 block discarded – undo
60 60
 
61 61
         if ($view == 'ep' || $view == 'user' || $view == 'recent' || $view == 'search' || $view == 'dates') {
62 62
             // What function do we call for this view?
63
-            $function = '_get_data_by_'.$view;
63
+            $function = '_get_data_by_' . $view;
64 64
             // Get all the dta that's to be rendered.
65 65
             $data = $this->$function($args);
66 66
 
67 67
         } else {
68 68
             // Don't have a valid $view;
69
-            $PAGE->error_message ("You haven't specified a view type.");
69
+            $PAGE->error_message("You haven't specified a view type.");
70 70
             return false;
71 71
         }
72 72
 
@@ -85,29 +85,29 @@  discard block
 block discarded – undo
85 85
         return true;
86 86
     }
87 87
 
88
-    public function render($data, $format='html', $template='comments') {
89
-        include (INCLUDESPATH."easyparliament/templates/$format/$template.php");
88
+    public function render($data, $format = 'html', $template = 'comments') {
89
+        include (INCLUDESPATH . "easyparliament/templates/$format/$template.php");
90 90
     }
91 91
 
92 92
     public function _get_data_by_ep($args) {
93 93
         // Get all the data attached to an epobject.
94 94
         global $PAGE;
95 95
 
96
-        twfy_debug (get_class($this), "getting data by epobject");
96
+        twfy_debug(get_class($this), "getting data by epobject");
97 97
 
98 98
         // What we return.
99 99
         $data = array();
100 100
         if (!is_numeric($args['epobject_id'])) {
101
-            $PAGE->error_message ("Sorry, we don't have a valid epobject id");
101
+            $PAGE->error_message("Sorry, we don't have a valid epobject id");
102 102
             return $data;
103 103
         }
104 104
 
105 105
         // For getting the data.
106
-        $input = array (
107
-            'amount' => array (
106
+        $input = array(
107
+            'amount' => array(
108 108
                 'user' => true
109 109
             ),
110
-            'where' => array (
110
+            'where' => array(
111 111
                 'comments.epobject_id=' => $args['epobject_id'],
112 112
                 #'visible=' => '1'
113 113
             ),
@@ -135,13 +135,13 @@  discard block
 block discarded – undo
135 135
         // comments by things in $args?
136 136
         global $PAGE;
137 137
 
138
-        twfy_debug (get_class($this), "getting data by user");
138
+        twfy_debug(get_class($this), "getting data by user");
139 139
 
140 140
         // What we return.
141 141
         $data = array();
142 142
 
143 143
         if (!is_numeric($args['user_id'])) {
144
-            $PAGE->error_message ("Sorry, we don't have a valid user id");
144
+            $PAGE->error_message("Sorry, we don't have a valid user id");
145 145
             return $data;
146 146
         }
147 147
 
@@ -151,13 +151,13 @@  discard block
 block discarded – undo
151 151
             $num = 10;
152 152
         }
153 153
 
154
-        if (isset($args['page']) && is_numeric($args['page']) && $args['page']>1) {
154
+        if (isset($args['page']) && is_numeric($args['page']) && $args['page'] > 1) {
155 155
             $page = $args['page'];
156 156
         } else {
157 157
             $page = 1;
158 158
         }
159 159
 
160
-        $limit = $num*($page-1) . ',' . $num;
160
+        $limit = $num * ($page - 1) . ',' . $num;
161 161
 
162 162
         // We're getting the most recent comments posted to epobjects.
163 163
         // We're grouping them by epobject so we can just link to each hansard thing once.
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
                 // This does rely on both this and the previous query returning
239 239
                 // stuff in the same order...
240 240
                 foreach ($comments as $n => $commentdata) {
241
-                    $comments[$n]['body'] = $commentbodies[ $comments[$n]['comment_id'] ];
241
+                    $comments[$n]['body'] = $commentbodies[$comments[$n]['comment_id']];
242 242
                 }
243 243
             }
244 244
         }
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
         // $args should contain 'num', indicating how many to get.
259 259
         // and perhaps pid too, for a particular person
260 260
 
261
-        twfy_debug (get_class($this), "getting data by recent");
261
+        twfy_debug(get_class($this), "getting data by recent");
262 262
 
263 263
         // What we return.
264 264
         $data = array();
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
             $page = 1;
276 276
         }
277 277
 
278
-        $limit = $num*($page-1) . ',' . $num;
278
+        $limit = $num * ($page - 1) . ',' . $num;
279 279
 
280 280
         $where = array(
281 281
             'visible=' => '1'
@@ -283,8 +283,8 @@  discard block
 block discarded – undo
283 283
         if (isset($args['pid']) && is_numeric($args['pid'])) {
284 284
             $where['person_id='] = $args['pid'];
285 285
         }
286
-        $input = array (
287
-            'amount' => array (
286
+        $input = array(
287
+            'amount' => array(
288 288
                 'user' => true
289 289
             ),
290 290
             'where'  => $where,
@@ -316,15 +316,15 @@  discard block
 block discarded – undo
316 316
     public function _get_data_by_dates($args) {
317 317
     // $args should contain start_date and end_date
318 318
 
319
-        twfy_debug (get_class($this), "getting data by recent");
319
+        twfy_debug(get_class($this), "getting data by recent");
320 320
         $data = array();
321 321
         $where = array(
322 322
             'visible=' => '1',
323 323
             'date(posted)>=' => $args['start_date'],
324 324
             'date(posted)<=' => $args['end_date']
325 325
         );
326
-        $input = array (
327
-            'amount' => array (
326
+        $input = array(
327
+            'amount' => array(
328 328
                 'user' => true
329 329
             ),
330 330
             'where'  => $where,
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
     public function _get_data_by_search($args) {
339 339
         // $args should contain 'num', indicating how many to get.
340 340
 
341
-        twfy_debug (get_class($this), "getting data by search");
341
+        twfy_debug(get_class($this), "getting data by search");
342 342
 
343 343
         // What we return.
344 344
         $data = array();
@@ -355,13 +355,13 @@  discard block
 block discarded – undo
355 355
             $page = 1;
356 356
         }
357 357
 
358
-        $limit = $num*($page-1) . ',' . $num;
358
+        $limit = $num * ($page - 1) . ',' . $num;
359 359
 
360
-        $input = array (
361
-            'amount' => array (
360
+        $input = array(
361
+            'amount' => array(
362 362
                 'user'=> true
363 363
             ),
364
-            'where'  => array (
364
+            'where'  => array(
365 365
                 'comments.body LIKE' => "%$args[s]%"
366 366
             ),
367 367
             'order' => 'posted DESC',
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
         // It returns the URL for the comment.
389 389
 
390 390
         $major 		= $urldata['major'];
391
-        $gid 		= $urldata['gid'];
391
+        $gid = $urldata['gid'];
392 392
         $comment_id = $urldata['comment_id'];
393 393
         $user_id = isset($urldata['user_id']) ? $urldata['user_id'] : false;
394 394
 
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
         $URL = new \MySociety\TheyWorkForYou\Url($page);
403 403
 
404 404
         $gid = fix_gid_from_db($gid); // In includes/utility.php
405
-        $URL->insert(array('id' => $gid ));
405
+        $URL->insert(array('id' => $gid));
406 406
         if ($user_id) {
407 407
             $URL->insert(array('u' => $user_id));
408 408
         }
@@ -480,9 +480,9 @@  discard block
 block discarded – undo
480 480
         $limit = isset($input['limit']) ? $input['limit'] : '';
481 481
 
482 482
         // The fields to fetch from db. 'table' => array ('field1', 'field2').
483
-        $fieldsarr = array (
484
-            'comments' => array ('comment_id', 'user_id', 'epobject_id', 'body', 'posted', 'modflagged', 'visible'),
485
-            'hansard' => array ('major', 'gid')
483
+        $fieldsarr = array(
484
+            'comments' => array('comment_id', 'user_id', 'epobject_id', 'body', 'posted', 'modflagged', 'visible'),
485
+            'hansard' => array('major', 'gid')
486 486
         );
487 487
 
488 488
         // Yes, we need the gid of a comment's associated hansard object
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
 
494 494
         // Add on the stuff for getting a user's details.
495 495
         if (isset($amount['user']) && $amount['user'] == true) {
496
-            $fieldsarr['users'] = array ('firstname', 'lastname', 'user_id');
496
+            $fieldsarr['users'] = array('firstname', 'lastname', 'user_id');
497 497
             // Like doing "FROM comments, users" but it's easier to add
498 498
             // an "INNER JOIN..." automatically to the query.
499 499
             $join .= ' INNER JOIN users ON comments.user_id = users.user_id ';
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
             $fieldsarr['epobject'] = array('body');
505 505
         }
506 506
 
507
-        $fieldsarr2 = array ();
507
+        $fieldsarr2 = array();
508 508
         // Construct the $fields clause.
509 509
         foreach ($fieldsarr as $table => $tablesfields) {
510 510
             foreach ($tablesfields as $n => $field) {
@@ -515,13 +515,13 @@  discard block
 block discarded – undo
515 515
                 if ($table == 'epobject' && $field == 'body') {
516 516
                     $field .= ' AS hbody';
517 517
                 }
518
-                $fieldsarr2[] = $table.'.'.$field;
518
+                $fieldsarr2[] = $table . '.' . $field;
519 519
             }
520 520
         }
521 521
         $fields = implode(', ', $fieldsarr2);
522 522
 
523 523
 
524
-        $wherearr2 = array ();
524
+        $wherearr2 = array();
525 525
         $params = array();
526 526
         $i = 0;
527 527
         // Construct the $where clause.
@@ -530,7 +530,7 @@  discard block
 block discarded – undo
530 530
             $params[":where$i"] = $val;
531 531
             $i++;
532 532
         }
533
-        $where = implode (" AND ", $wherearr2);
533
+        $where = implode(" AND ", $wherearr2);
534 534
 
535 535
         if ($order != '') {
536 536
             $order = "ORDER BY $order";
@@ -541,7 +541,7 @@  discard block
 block discarded – undo
541 541
         }
542 542
 
543 543
         // Finally, do the query!
544
-        $q = $this->db->query ("SELECT $fields
544
+        $q = $this->db->query("SELECT $fields
545 545
                         FROM 	comments
546 546
                         $join
547 547
                         WHERE $where
@@ -550,7 +550,7 @@  discard block
 block discarded – undo
550 550
                         ", $params);
551 551
 
552 552
         // Format the data into an array for returning.
553
-        $data = array ();
553
+        $data = array();
554 554
 
555 555
         // If you change stuff here, you might have to change it in
556 556
         // $COMMENT->_set_url() too...
Please login to merge, or discard this patch.
www/docs/news/editme.php 1 patch
Upper-Lower-Casing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 
21 21
 Read <a href="http://www.mysociety.org/2009/01/21/blimey-it-looks-like-the-internets-won/">our victory mySociety blog post</a>,
22 22
 and do join our mailing list. :-)
23
-EOT
23
+eot
24 24
 , '2009-01-21 15:30:00', 'Matthew'),
25 25
 
26 26
 48 => array('API keys, and improved internal links', <<<EOT
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 crowd-sourcing game to match the reference to the exact speech, much like our
46 46
 <a href="https://www.theyworkforyou.com/video/">video matching</a> (nearly 80%
47 47
 of our archive done!). :)
48
-EOT
48
+eot
49 49
 , '2008-07-18 14:01:00', 'Matthew'),
50 50
 
51 51
 47 => array('Video on TheyWorkForYou', <<<EOT
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
 <a href="http://www.mysociety.org/2008/06/01/video-recordings-of-the-house-of-commons-on-theyworkforyoucom/">Etienne's post on the mySociety blog</a>
59 59
 has some background information on the project.
60
-EOT
60
+eot
61 61
 , '2008-06-02 18:56:00', 'Matthew'),
62 62
 
63 63
 46 => array('The Scottish Parliament', <<<EOT
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 launching this now to mark the success in getting endorsements for our <a
90 90
 href="/freeourbills/">Free Our Bills campaign</a>, and we'll be rolling out
91 91
 more goodies as the campaign goes along.
92
-EOT
92
+eot
93 93
 , '2008-05-06 13:35:28', 'Matthew'),
94 94
 
95 95
 45 => array('Shadow ministers and spokespersons', <<<EOT
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 This information is given both on a person's page and within any debates they
99 99
 speak in, which could help explain why your local MP is speaking on transport
100 100
 or foreign affairs a lot. :)
101
-EOT
101
+eot
102 102
 , '2008-04-30 08:25:00', 'Matthew'),
103 103
 
104 104
 44 => array('Please donate to help us expand TheyWorkForYou', <<<EOT
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 Unfortunately, the server that TheyWorkForYou sits on is almost full, so we can&#8217;t launch their hard work. Boo!
108 108
 
109 109
 TheyWorkForYou isn&#8217;t an externally funded project, and we need funding from other sources to keep it growing and improving. So if the season has filled you with generosity of spirit, why not <a href="https://secure.mysociety.org/donate/">drop us a few pennies</a> to pay for some upgrades? Any extra beyond what we need will go into the general pot to keep <a href="http://www.mysociety.org/">mySociety</a> running and the developers from starving.
110
-EOT
110
+eot
111 111
 , '2007-12-21 10:07:35', 'Tom'),
112 112
 
113 113
 43 => array('The Queen in Parliament', <<<EOT
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 or just look at past
122 122
 <a href="https://www.theyworkforyou.com/search/?pid=13935&pop=1">prorogation and Queen's speeches</a>
123 123
 more easily than anywhere else I've found.
124
-EOT
124
+eot
125 125
 , '2007-09-11 15:34:47', 'Matthew'),
126 126
 
127 127
 42 => array('Missing confirmation emails', <<<EOT
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 few days have now been sent out, and I've got in touch
133 133
 with anyone who signed up in the days prior to
134 134
 that to let them know what happened.
135
-EOT
135
+eot
136 136
 , "2007-09-03 17:12:47", 'Matthew'),
137 137
 
138 138
 41 => array('The Northern Ireland Assembly', <<<EOT
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 
173 173
 ATB,<br>
174 174
 <a href="http://www.dracos.co.uk/">Matthew Somerville</a>
175
-EOT
175
+eot
176 176
 , "2006-12-11 00:00:00", 'Matthew'),
177 177
 
178 178
 40 => array('TheyWorkForYou API', <<<EOT
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 Here's my <a href="http://www.mysociety.org/2006/barcamp-london/">BarCamp
192 192
 Presentation</a> launching the API, and a <a href="http://www.dracos.co.uk/work/theyworkforyou/api/fabfarts/">couple</a>
193 193
 of <a href="http://www.mysociety.org/2006/09/02/battle-your-way-to-sedgefield/">applications</a> using it.
194
-EOT
194
+eot
195 195
 , "2006-09-02 17:10:00"),
196 196
 
197 197
 39 => array('New features over the last couple of months', <<<EOT
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 and when searching a particular person's speeches, we no longer group the results by debate, which
220 220
 was confusing, as you obviously expected to see all the speeches for that person that matched your
221 221
 search terms.
222
-EOT
222
+eot
223 223
 , "2006-08-18 09:46:36"),
224 224
 
225 225
 38 => array("Got an idea for a useful website?", <<<EOT
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 come up with an idea for a useful site like this one, and it beats all
228 228
 the other ideas, we'll build it for free. <a href="http://www.mysociety.org/proposals2006/submit">Submit an idea</a>
229 229
 or <a href="http://www.mysociety.org/proposals2006/view">read and comment on what other people have submitted</a>.
230
-EOT
230
+eot
231 231
 , "2006-06-06 06:06:06"),
232 232
 
233 233
 37 => array("We've added the Lords, and more", <<<EOT
@@ -237,14 +237,14 @@  discard block
 block discarded – undo
237 237
 also added a feature to the search to help you identify which MPs or
238 238
 Lords are interested in a certain word or phrases. Just search as
239 239
 usual and then click 'Show use by person'.
240
-EOT
240
+eot
241 241
 , "2006-06-01 12:34:56"),
242 242
 
243 243
 36 => array("Changes to the Register of Members' Interests", <<<EOT
244 244
 One of the many things our site does, probably without you realising, is to track the Register of Members' Interests, in which MPs are "to provide information of any pecuniary interest or other material benefit which a Member receives which might reasonably be thought by others to influence his or her actions, speeches or votes in Parliament, or actions taken in the capacity of a Member of Parliament". The latest entry published on the official site has always been shown on MP pages (<a href="https://www.theyworkforyou.com/mp/tony_blair/sedgefield#register">here's Tony Blair's</a>), however we kept all previous editions of the Register safe and sound. And now, after a bit of coding, you can view a history of the Register, either <a href="https://www.theyworkforyou.com/regmem/?f=2005-12-14">comparing particular editions</a>, or for particular MPs (<a href="https://www.theyworkforyou.com/regmem/?p=10001">Diane Abbott</a>, for example). Entries only have to stay on the Register for a year, so this can make for some interesting reading.
245 245
 
246 246
 Happy New Year! :) <a href="https://www.theyworkforyou.com/regmem/">Changes to the Register of Members' Interests</a>
247
-EOT
247
+eot
248 248
 , "2006-01-01 12:36:00"),
249 249
 
250 250
 35 => array("TheyWorkForYou.com Wins Award", <<<EOT
@@ -253,14 +253,14 @@  discard block
 block discarded – undo
253 253
 Thanks to the kind souls who nominated us. We enjoyed ourselves.
254 254
 
255 255
 
256
-EOT
256
+eot
257 257
 , "2005-07-05 23:54:13"),
258 258
 
259 259
 34 => array("NEW! Email this page to a friend", <<<EOT
260 260
 At the top right hand side of every (ex)MP's page, we've added a simple new feature: email the page to a friend.
261 261
 
262 262
 <a href="/mp/">Have a go</a>, and let all your friends know how easy it is to keep tabs on what your former MP did and said in your name during the last Parliament.
263
-EOT
263
+eot
264 264
 , "2005-04-14 23:43:50"),
265 265
 
266 266
 33 => array("Play with Pledgebank, Pound the Streets", <<<EOT
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
 </blockquote>
274 274
 
275 275
 If you're up for it, why not <a href="http://www.pledgebank.com/theywork">sign up now?</a>
276
-EOT
276
+eot
277 277
 , "2005-04-13 22:41:23"),
278 278
 
279 279
 32 => array("NEW! How MPs voted on Key Issues", <<<EOT
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
 This information is the result sophisticated mining of PublicWhip's detailed vote data covering hundreds of Parliamentary divisions.
287 287
 
288 288
 We hope it'll make it easier for you to keep track of where your MP really stands on key issues - after all, They Work For You.
289
-EOT
289
+eot
290 290
 , "2005-04-05 22:59:57"),
291 291
 
292 292
 31 => array("Channel 4 linking to TheyWorkForYou.com", <<<EOT
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 We've done a special paint job for users coming from the Channel 4 site, just to make them feel welcome. You can see an example <a href="https://www.theyworkforyou.com/mp/c4/paul_keetch/hereford">here</a>.
296 296
 
297 297
 We'd love to know what you think of this paint job, as we're planning a redesign. As ever, <a href="/contact/">get in touch</a>.
298
-EOT
298
+eot
299 299
 , "2005-04-05 22:53:32"),
300 300
 
301 301
 30 => array("NEW! Email Alerts & Other Features", <<<EOT
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
     - Tom, on behalf of the TheyWorkForYou.com volunteers
358 358
 
359 359
      <a href="https://www.theyworkforyou.com/about/">https://www.theyworkforyou.com/about/</a>  - New volunteers welcome!
360
-EOT
360
+eot
361 361
 , "2005-02-24 22:02:44"),
362 362
 
363 363
 26 => array("New Release of TheyWorkForYou.com Source Code", <<<EOT
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
 Feel free to download it and have a play.
375 375
 
376 376
 Whilst you're at it, don't forget we also publish a full <a href="https://www.theyworkforyou.com/raw/">XML version of the Hansard data</a>.
377
-EOT
377
+eot
378 378
 , "2005-01-25 00:15:19"),
379 379
 
380 380
 25 => array("Search by Date", <<<EOT
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
 Next step on search is probably an RSS version of keyword searches. We're still very keen to improve overall relevancy of results - anyone out there fancy lending us a Google Appliance to play with?
387 387
 
388 388
 As ever, <a href="/contact/">contact us</a> if you've got any suggestions how we might improve the site, or if you fancy volunteering.
389
-EOT
389
+eot
390 390
 , "2005-01-25 00:16:09"),
391 391
 
392 392
 20 => array("New! Ministerial Statements now included", <<<EOT
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
 Next up: Select Committees, which promise to be an order of magnitude more challenging. We'll keep you posted.
405 405
 
406 406
 PS We're always on the lookout for new volunteers - <a href="/contact/">contact us</a> if you are keen to help in almost any capacity.
407
-EOT
407
+eot
408 408
 , "2005-01-17 17:44:47"),
409 409
 
410 410
 19 => array("NEW! Westminster Hall debates now available.", <<<EOT
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
 
423 423
 
424 424
 
425
-EOT
425
+eot
426 426
 , "2004-12-22 23:47:19"),
427 427
 
428 428
 18 => array("RSS feed of your MP's recent appearances", <<<EOT
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
 RSS is a simple way to publish & distribute content which is frequently updated  (<a href="http://news.bbc.co.uk/1/hi/help/3223484.stm">learn more here</a>.)
437 437
 
438 438
 Some enlightened MPs are now incorporating this useful feed of their Parliamentary activity into their websites. See <a href="http://www.richardallan.org.uk/">Richard Allen's</a> website for a good example.
439
-EOT
439
+eot
440 440
 , "2004-11-27 16:38:41"),
441 441
 
442 442
 16 => array("NEW! MPs' Expenses", <<<EOT
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
 For example, it is good to note that <a href="https://www.theyworkforyou.com/mp/?pid=10508#expenses">Barbara Roche</a>, a North London MP, does not claim excessive travel expenses.
446 446
 
447 447
 Bear in mind that proper democracy does cost money, so please think twice before using these data as a stick with which to beat your MP. An "expensive" MP might be providing excellent value for money. And vice versa.
448
-EOT
448
+eot
449 449
 , "2004-11-08 10:11:14"),
450 450
 
451 451
 11 => array("TheyWorkForYou.com Development Wiki now public", <<<EOT
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
 (dissemination is fine, but please don't post the link with the login details embedded in the url)
462 462
 
463 463
 In case you're wondering what we're up to, well, we're just rousing ourselves for another tilt at completing our vision before the next election is called, so if anyone python or php skills and fancies lending a hand, do <a href="/contact/">contact us</a>.
464
-EOT
464
+eot
465 465
 , "2004-10-01 23:14:13"),
466 466
 
467 467
 8 => array("New! Full Source Code Published", <<<EOT
@@ -481,7 +481,7 @@  discard block
 block discarded – undo
481 481
 
482 482
 <a href="https://www.theyworkforyou.com/rss/mp/10508.rdf">https://www.theyworkforyou.com/rss/mp/10508.rdf</a>
483 483
     - Typical MP 'recent appearances' RSS feed, uses person id.
484
-EOT
484
+eot
485 485
 , "2004-07-18 22:58:23"),
486 486
 
487 487
 7 => array("Public Beta Now Live", <<<EOT
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
 More than the usuals,
503 503
 
504 504
 - <i><a href="https://www.theyworkforyou.com/about/" title="link to About Us page">The TheyWorkForYou.com Volunteers</a></i>
505
-EOT
505
+eot
506 506
 , "2004-06-06 03:02:53"),
507 507
 
508 508
 6 => array("Want to help make us complete?", <<<EOT
@@ -514,14 +514,14 @@  discard block
 block discarded – undo
514 514
 
515 515
 Just <a href="/contact/">contact us</a>.
516 516
 
517
-EOT
517
+eot
518 518
 , "2004-05-21 22:15:22"),
519 519
 
520 520
 5 => array("Know someone who'd like this website?", <<<EOT
521 521
 If you know someone who would appreciate being a beta tester, please <a href="/contact/">contact us</a> with their details.
522 522
 
523 523
 Many thanks.
524
-EOT
524
+eot
525 525
 , "2004-05-21 22:55:24"),
526 526
 
527 527
 4 => array("Welcome to our private beta test", <<<EOT
@@ -538,7 +538,7 @@  discard block
 block discarded – undo
538 538
 In the meantime, please enjoy being the first people to scribble in the margins of Hansard. May you be first of many.
539 539
 
540 540
 - <em>The TheyWorkForYou.com volunteers</em>
541
-EOT
541
+eot
542 542
 , "2004-05-21 22:55:24")
543 543
 );
544 544
 
Please login to merge, or discard this patch.
www/docs/topic/image.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
     $topic = $topics->getTopic($slug);
9 9
 }
10 10
 
11
-if (!$slug || !isset($topic) || $topic === NULL) {
11
+if (!$slug || !isset($topic) || $topic === null) {
12 12
     header('HTTP/1.0 404 Not Found');
13 13
     exit();
14 14
 }
Please login to merge, or discard this patch.