Completed
Pull Request — master (#965)
by Nick
24:32
created
www/includes/easyparliament/templates/html/comments_recent.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 if (isset($data['comments']) && count($data['comments']) > 0) {
15 15
     $title = 'Most recent annotations';
16 16
     if (isset($data['full_name'])) {
17
-        $title .= ' on things by ' . $data['full_name'];
17
+        $title .= ' on things by '.$data['full_name'];
18 18
     }
19 19
     $PAGE->block_start(array('id'=>'recentcomments', 'title'=>$title));
20 20
 
@@ -33,11 +33,11 @@  discard block
 block discarded – undo
33 33
         $date = format_date($date, SHORTDATEFORMAT);
34 34
         $time = format_time($time, TIMEFORMAT);
35 35
 
36
-        $count = $n+1;
36
+        $count = $n + 1;
37 37
 
38 38
         $USERURL->insert(array('u'=>$comment['user_id']));
39 39
 
40
-        ?><a name="c<?php echo $count; ?>"></a><strong><?php echo _htmlentities($comment['firstname'] . ' ' . $comment['lastname']); ?>:</strong> <?php echo $commenttext; ?> <small>(<?php echo relative_time($comment['posted']); ?>)</small><br><a href="<?php echo $comment['url']; ?>">Read annotation</a> | <a href="<?php echo $USERURL->generate(); ?>" title="See more information about this user">All by this user</a> </li>
40
+        ?><a name="c<?php echo $count; ?>"></a><strong><?php echo _htmlentities($comment['firstname'].' '.$comment['lastname']); ?>:</strong> <?php echo $commenttext; ?> <small>(<?php echo relative_time($comment['posted']); ?>)</small><br><a href="<?php echo $comment['url']; ?>">Read annotation</a> | <a href="<?php echo $USERURL->generate(); ?>" title="See more information about this user">All by this user</a> </li>
41 41
 <?php
42 42
     }
43 43
     ?>
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     if ($this_page == 'home') {
48 48
         $MOREURL = new URL('comments_recent');
49 49
         ?>
50
-                        <p><a href="<?php echo $MOREURL->generate(); ?>#c<?php echo count($data['comments'])+1; ?>">See more annotations posted recently</a></p>
50
+                        <p><a href="<?php echo $MOREURL->generate(); ?>#c<?php echo count($data['comments']) + 1; ?>">See more annotations posted recently</a></p>
51 51
 <?php
52 52
     }
53 53
     if ($this_page != 'home') $PAGE->page_links($data);
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,9 @@  discard block
 block discarded – undo
18 18
     }
19 19
     $PAGE->block_start(array('id'=>'recentcomments', 'title'=>$title));
20 20
 
21
-    if ($this_page != 'home') $PAGE->page_links($data);
21
+    if ($this_page != 'home') {
22
+        $PAGE->page_links($data);
23
+    }
22 24
     $USERURL = new URL('userview');
23 25
     ?>
24 26
                         <ul>
@@ -50,7 +52,9 @@  discard block
 block discarded – undo
50 52
                         <p><a href="<?php echo $MOREURL->generate(); ?>#c<?php echo count($data['comments'])+1; ?>">See more annotations posted recently</a></p>
51 53
 <?php
52 54
     }
53
-    if ($this_page != 'home') $PAGE->page_links($data);
55
+    if ($this_page != 'home') {
56
+        $PAGE->page_links($data);
57
+    }
54 58
     $PAGE->block_end();
55 59
 }
56 60
 ?>
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/people/index.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -26,31 +26,31 @@  discard block
 block discarded – undo
26 26
                           Based on postcode <strong><?= $mp_data['postcode'] ?></strong>
27 27
                           <a href="<?= $mp_data['change_url'] ?>">(Change postcode)</a>
28 28
                       </p>
29
-                    <?php if ( isset( $mp_data ) && $type != 'mlas' ) { ?>
30
-                      <h3>Your <?= $mp_data['former'] ? $mp_data['former'] . ' ' : '' ?><?= $rep_name ?> is</h3>
29
+                    <?php if (isset($mp_data) && $type != 'mlas') { ?>
30
+                      <h3>Your <?= $mp_data['former'] ? $mp_data['former'].' ' : '' ?><?= $rep_name ?> is</h3>
31 31
                     </div>
32 32
                     <a href="<?= $mp_data['mp_url'] ?>" class="people-list__person">
33 33
                     <img class="people-list__person__image" src="<?= $mp_data['image'] ?>">
34 34
                         <h2 class="people-list__person__name"><?= $mp_data['name'] ?></h2>
35 35
                         <p class="people-list__person__memberships">
36 36
                         <span class="people-list__person__constituency"><?= $mp_data['constituency'] ?></span>
37
-                        <span class="people-list__person__party <?= strtolower( $mp_data['party'] ) ?>"><?= $mp_data['party'] ?></span>
37
+                        <span class="people-list__person__party <?= strtolower($mp_data['party']) ?>"><?= $mp_data['party'] ?></span>
38 38
                         </p>
39 39
                     </a>
40 40
                     <?php }
41
-                    if ( isset($reps) ) {
42
-                        if ( isset($mp_data) && $type != 'mlas' ) { ?>
41
+                    if (isset($reps)) {
42
+                        if (isset($mp_data) && $type != 'mlas') { ?>
43 43
                     <div class="people-list__your-mp__replist-header">
44 44
                         <?php } ?>
45 45
                       <h3>Your <?=$former ?> <?= $rep_plural == 'MSPs' ? 'regional ' : '' ?><?= $rep_plural ?> are</h3>
46 46
                     </div>
47
-                        <?php foreach ( $reps as $rep ) { ?>
47
+                        <?php foreach ($reps as $rep) { ?>
48 48
                     <a href="<?= $rep['mp_url'] ?>" class="people-list__person">
49 49
                     <img class="people-list__person__image" src="<?= $rep['image'] ?>">
50 50
                         <h2 class="people-list__person__name"><?= $rep['name'] ?></h2>
51 51
                         <p class="people-list__person__memberships">
52 52
                         <span class="people-list__person__constituency"><?= $rep['constituency'] ?></span>
53
-                        <span class="people-list__person__party <?= strtolower( $rep['party'] ) ?>"><?= $rep['party'] ?></span>
53
+                        <span class="people-list__person__party <?= strtolower($rep['party']) ?>"><?= $rep['party'] ?></span>
54 54
                         </p>
55 55
                     </a>
56 56
                         <?php } ?>
@@ -65,9 +65,9 @@  discard block
 block discarded – undo
65 65
             <div class="search-page__section search-page__section--search">
66 66
                 <div class="search-page__section__primary">
67 67
                     <p class="search-page-main-inputs">
68
-                    <?php if ( $type == 'peers' ) { ?>
68
+                    <?php if ($type == 'peers') { ?>
69 69
                         <label for="find-mp-by-name-or-postcode">Find <?= $rep_plural ?> by name:</label>
70
-                    <?php } elseif ( $type == 'mlas' || $type == 'msps' ) { ?>
70
+                    <?php } elseif ($type == 'mlas' || $type == 'msps') { ?>
71 71
                         <label for="find-mp-by-name-or-postcode">Find your <?= $rep_name ?> by postcode:</label>
72 72
                     <?php } else { ?>
73 73
                         <label for="find-mp-by-name-or-postcode">Find your <?= $rep_name ?> by name or postcode:</label>
@@ -108,12 +108,12 @@  discard block
 block discarded – undo
108 108
             <div class="search-page__section__primary">
109 109
             <h2>All <?= $rep_plural ?></h2>
110 110
 
111
-                <?php if ( $type != 'peers' ) { ?>
111
+                <?php if ($type != 'peers') { ?>
112 112
                 <ul class="search-result-display-options">
113
-                    <?php if ( $order == 'given_name' ) { ?>
113
+                    <?php if ($order == 'given_name') { ?>
114 114
                     <li><strong>Sorted by</strong> First name</li>
115 115
                     <li>Sort by <a href="<?= $urls['by_last'] ?>">Last name</a> / <a href="<?= $urls['by_party'] ?>">Party</a></li>
116
-                    <?php } else if ( $order == 'party' ) { ?>
116
+                    <?php } else if ($order == 'party') { ?>
117 117
                     <li><strong>Sorted by</strong> Party</li>
118 118
                     <li>Sort by <a href="<?= $urls['by_first'] ?>">First name</a> / <a href="<?= $urls['by_last'] ?>">Last name</a></li>
119 119
                     <?php } else { ?>
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
                 </ul>
124 124
                 <?php } else { ?>
125 125
                 <ul class="search-result-display-options">
126
-                    <?php if ( $order == 'party' ) { ?>
126
+                    <?php if ($order == 'party') { ?>
127 127
                     <li><strong>Sorted by</strong> Party</li>
128 128
                     <li>Sort by <a href="<?= $urls['by_name'] ?>">Name</a></li>
129 129
                     <?php } else { ?>
@@ -173,10 +173,10 @@  discard block
 block discarded – undo
173 173
                     }
174 174
                 }
175 175
                 $initial_link = '';
176
-                foreach ( $data as $person ) {
176
+                foreach ($data as $person) {
177 177
                     if ($order != 'party') {
178
-                        $initial = substr( strtoupper($person[$a_to_z_key]), 0, 1);
179
-                        if ( $initial != $current_initial ) {
178
+                        $initial = substr(strtoupper($person[$a_to_z_key]), 0, 1);
179
+                        if ($initial != $current_initial) {
180 180
                             $current_initial = $initial;
181 181
                             $initial_link = "name=\"$initial\" ";
182 182
                         } else {
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
                 <img class="people-list__person__image" src="<?= $person['image'] ?>">
189 189
                         <h2 class="people-list__person__name"><?= ucfirst($person['name']) ?></h2>
190 190
                         <p class="people-list__person__memberships">
191
-                        <?php if ( $person['constituency'] ) { ?>
191
+                        <?php if ($person['constituency']) { ?>
192 192
                         <span class="people-list__person__constituency"><?= $person['constituency'] ?></span>
193 193
                         <?php } ?>
194 194
                         <span class="people-list__person__party <?= strtolower($person['party']) ?>"><?= $person['party'] ?></span>
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
                 <a href="<?= $urls['by_csv'] ?>">Download this list as a CSV</a>
207 207
                     suitable for Excel
208 208
                 </p>
209
-                <?php if ( $type == 'mps' ) { ?>
209
+                <?php if ($type == 'mps') { ?>
210 210
                 <form method="get" action="<?= $urls['plain'] ?>" class="sidebar-item-with-icon sidebar-item-with-icon--date">
211 211
                     <p>
212 212
                         Or view a past list
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
                   })
251 251
                 });
252 252
                 </script>
253
-                <?php } else if ( $type == 'msps' ) { ?>
253
+                <?php } else if ($type == 'msps') { ?>
254 254
                     <p class="past-list-dates" id="past-list-dates">
255 255
                         <a href="<?= $urls['plain'] ?>?date=2011-05-05">MSPs at 2011 election</a>
256 256
                         <a href="<?= $urls['plain'] ?>?date=2007-05-03">MSPs at 2007 election</a>
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
                     </p>
265 265
                 <?php } ?>
266 266
 
267
-                <?php include( dirname(__FILE__) . '/../sidebar/looking_for.php' ) ?>
267
+                <?php include(dirname(__FILE__).'/../sidebar/looking_for.php') ?>
268 268
             </div>
269 269
         </div>
270 270
 
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/index.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
             <div class="panel panel--flushtop clearfix">
46 46
                 <div class="row nested-row">
47 47
                     <div class="homepage-in-the-news homepage-content-section">
48
-                        <?php if ( count($featured) > 0 ) {
48
+                        <?php if (count($featured) > 0) {
49 49
                             include 'homepage/featured.php';
50 50
                         } else { ?>
51 51
                             No debates found.
@@ -100,14 +100,14 @@  discard block
 block discarded – undo
100 100
                     <div class="homepage-recently homepage-content-section">
101 101
                         <h2>Recently in Parliament</h2>
102 102
                         <ul class="recently__list"><?php
103
-                            foreach ( $debates['recent'] as $recent ) {
103
+                            foreach ($debates['recent'] as $recent) {
104 104
                                 include 'homepage/recent-debates.php';
105 105
                             }
106 106
                         ?></ul>
107 107
                     </div>
108 108
                     <div class="homepage-upcoming homepage-content-section">
109 109
                         <h2>Upcoming</h2>
110
-                        <?php if ( count($calendar) ) { ?>
110
+                        <?php if (count($calendar)) { ?>
111 111
                         <div class="upcoming__controls">
112 112
                             <!--
113 113
                                 These controls should make the upcoming section slide to the next day.
@@ -126,25 +126,25 @@  discard block
 block discarded – undo
126 126
                             </div>
127 127
                         </div>
128 128
                         <?php $first = true; $count = 0;
129
-                            foreach ( $calendar as $date => $places ) {
129
+                            foreach ($calendar as $date => $places) {
130 130
                                 $count++; ?>
131 131
                                 <div class="cal-wrapper <?= $first ? 'visible' : 'hidden' ?>" id="day-<?= $count ?>" data-count="<?= $count ?>" data-date="<?= format_date($date, SHORTDATEFORMAT); ?>">
132 132
                                 <?php foreach ($places as $place => $events) { ?>
133 133
                                     <?php $first = false; ?>
134 134
                                     <h3><?= $place ?></h3>
135 135
                                     <ul class="upcoming__list">
136
-                                        <?php for ( $i = 0; $i < 3; $i++ ) {
137
-                                            if ( isset( $events[$i] ) ) { ?>
136
+                                        <?php for ($i = 0; $i < 3; $i++) {
137
+                                            if (isset($events[$i])) { ?>
138 138
                                         <li>
139 139
                                             <h4 class="upcoming__title"><a href="<?= $events[$i]['link_external'] ?>"><?= $events[$i]['title'] ?></a></h4>
140 140
                                             <p class="meta"><?php
141 141
                                                 $meta_items = array();
142 142
                                                 $meta_items[] = $events[$i]['debate_type'];
143
-                                                if( isset($events[$i]['time_start']) && $events[$i]['time_start'] != '00:00:00' ){
143
+                                                if (isset($events[$i]['time_start']) && $events[$i]['time_start'] != '00:00:00') {
144 144
                                                     $times = format_time($events[$i]['time_start'], 'g:i a');
145 145
 
146
-                                                    if( isset($events[$i]['time_end']) && $events[$i]['time_end'] != '00:00:00' ){
147
-                                                        $times = $times . ' - ' . format_time($events[$i]['time_end'], 'g:i a');
146
+                                                    if (isset($events[$i]['time_end']) && $events[$i]['time_end'] != '00:00:00') {
147
+                                                        $times = $times.' - '.format_time($events[$i]['time_end'], 'g:i a');
148 148
                                                     }
149 149
                                                     $meta_items[] = $times;
150 150
                                                 }
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
                                         <?php } ?>
156 156
                                         <?php } ?>
157 157
                                     </ul>
158
-                                    <?php if ( count($events) - 3 > 0 ) { ?>
158
+                                    <?php if (count($events) - 3 > 0) { ?>
159 159
                                     <a href="/calendar/?d=<?= format_date($date, 'Y-m-d') ?>" class="upcoming__more">And <?= count($events) - 3 ?> more</a><!-- (just links to relevant upcoming page) -->
160 160
                                     <?php } ?>
161 161
                             <?php } ?>
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
                         <?php } ?>
164 164
                         <?php } else {
165 165
                             list($recess, $from, $to) = recess_prettify(date('j'), date('n'), date('Y'), 1);
166
-                            if ( $recess ) { ?>
166
+                            if ($recess) { ?>
167 167
                                 <p>
168 168
                                 Parliament is on holiday until <?= format_date($to, LONGERDATEFORMAT) ?>.
169 169
                                 Follow us on <a href="https://twitter.com/theyworkforyou">Twitter</a> and you'll
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/footer.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -84,13 +84,13 @@
 block discarded – undo
84 84
         $db->display_total_duration();
85 85
 
86 86
         $duration = getmicrotime() - STARTTIME;
87
-        twfy_debug ("TIME", "Total time for page: $duration seconds.");
87
+        twfy_debug("TIME", "Total time for page: $duration seconds.");
88 88
         if (!isset($_SERVER['WINDIR'])) {
89 89
             $rusage = getrusage();
90
-            $duration = $rusage['ru_utime.tv_sec']*1000000 + $rusage['ru_utime.tv_usec'] - STARTTIMEU;
91
-            twfy_debug ('TIME', "Total user time: $duration microseconds.");
92
-            $duration = $rusage['ru_stime.tv_sec']*1000000 + $rusage['ru_stime.tv_usec'] - STARTTIMES;
93
-            twfy_debug ('TIME', "Total system time: $duration microseconds.");
90
+            $duration = $rusage['ru_utime.tv_sec'] * 1000000 + $rusage['ru_utime.tv_usec'] - STARTTIMEU;
91
+            twfy_debug('TIME', "Total user time: $duration microseconds.");
92
+            $duration = $rusage['ru_stime.tv_sec'] * 1000000 + $rusage['ru_stime.tv_usec'] - STARTTIMES;
93
+            twfy_debug('TIME', "Total system time: $duration microseconds.");
94 94
         }
95 95
 
96 96
 ?>
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/html/static/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/templates/api/hansard_gid.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,4 +67,4 @@
 block discarded – undo
67 67
     api_output($out);
68 68
 } else {
69 69
     api_error('Nothing');
70
-   }
70
+    }
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -12,16 +12,16 @@  discard block
 block discarded – undo
12 12
 
13 13
 $out = array();
14 14
 if (isset ($data['rows'])) {
15
-    for ($i=0; $i<count($data['rows']); $i++) {
15
+    for ($i = 0; $i < count($data['rows']); $i++) {
16 16
         $row = $data['rows'][$i];
17 17
         if (count($row) == 0) continue;
18 18
         if ($row['htype'] == '12') {
19 19
             if (isset($row['speaker']) && count($row['speaker']) > 0) {
20 20
                 $speaker = $row['speaker'];
21
-                if (is_file(BASEDIR . IMAGEPATH . 'mps/' . $speaker['person_id'] . '.jpeg')) {
22
-                    $row['speaker']['image'] = IMAGEPATH . 'mps/' . $speaker['person_id'] . '.jpeg';
23
-                } elseif (is_file(BASEDIR . IMAGEPATH . 'mps/' . $speaker['person_id'] . '.jpg')) {
24
-                    $row['speaker']['image'] = IMAGEPATH . 'mps/' . $speaker['person_id'] . '.jpg';
21
+                if (is_file(BASEDIR.IMAGEPATH.'mps/'.$speaker['person_id'].'.jpeg')) {
22
+                    $row['speaker']['image'] = IMAGEPATH.'mps/'.$speaker['person_id'].'.jpeg';
23
+                } elseif (is_file(BASEDIR.IMAGEPATH.'mps/'.$speaker['person_id'].'.jpg')) {
24
+                    $row['speaker']['image'] = IMAGEPATH.'mps/'.$speaker['person_id'].'.jpg';
25 25
                 }
26 26
                 $desc = '';
27 27
                 if (isset($speaker['office'])) {
@@ -29,11 +29,11 @@  discard block
 block discarded – undo
29 29
                     foreach ($speaker['office'] as $off) {
30 30
                         $desc[] = $off['pretty'];
31 31
                     }
32
-                    $desc = join(', ', $desc) . '; ';
32
+                    $desc = join(', ', $desc).'; ';
33 33
                 }
34 34
 
35 35
                 if ($speaker['house'] == 1 && $speaker['party'] != 'Speaker' && $speaker['party'] != 'Deputy Speaker' && $speaker['constituency']) {
36
-                    $desc .= $speaker['constituency'] . ', ';
36
+                    $desc .= $speaker['constituency'].', ';
37 37
                 }
38 38
                 $desc .= _htmlentities($speaker['party']);
39 39
                 if ($desc) $row['speaker']['desc'] = $desc;
Please login to merge, or discard this patch.
Braces   +9 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,7 +14,9 @@  discard block
 block discarded – undo
14 14
 if (isset ($data['rows'])) {
15 15
     for ($i=0; $i<count($data['rows']); $i++) {
16 16
         $row = $data['rows'][$i];
17
-        if (count($row) == 0) continue;
17
+        if (count($row) == 0) {
18
+            continue;
19
+        }
18 20
         if ($row['htype'] == '12') {
19 21
             if (isset($row['speaker']) && count($row['speaker']) > 0) {
20 22
                 $speaker = $row['speaker'];
@@ -36,7 +38,9 @@  discard block
 block discarded – undo
36 38
                     $desc .= $speaker['constituency'] . ', ';
37 39
                 }
38 40
                 $desc .= _htmlentities($speaker['party']);
39
-                if ($desc) $row['speaker']['desc'] = $desc;
41
+                if ($desc) {
42
+                    $row['speaker']['desc'] = $desc;
43
+                }
40 44
             }
41 45
         }
42 46
         $out[] = $row;
@@ -52,8 +56,9 @@  discard block
 block discarded – undo
52 56
                 $has_content = false;
53 57
             }
54 58
             $entry = $row;
55
-            if (isset($row['excerpt']))
56
-                $entry['excerpt'] = trim_characters($entry['excerpt'], 0, 200);
59
+            if (isset($row['excerpt'])) {
60
+                            $entry['excerpt'] = trim_characters($entry['excerpt'], 0, 200);
61
+            }
57 62
             if ($has_content) {
58 63
             } else {
59 64
                 unset($entry['listurl']);
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/api/comments.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         }
70 70
 
71 71
         if (isset($comment['comment_id'])) {
72
-            $id = 'c' . $comment['comment_id'];
72
+            $id = 'c'.$comment['comment_id'];
73 73
         } else {
74 74
             $id = '';
75 75
         }
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         // COMMENT REPORTING LINK.
83 83
 
84 84
         if (($this_page != 'commentreport' &&
85
-            $this_page != 'addcomment'  &&
85
+            $this_page != 'addcomment' &&
86 86
             $this_page != 'admin_commentreport')
87 87
             && $THEUSER->is_able_to('reportcomment')
88 88
             && $THEUSER->user_id() != $comment['user_id']
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
                 'ret' 	=> $comment['url']
99 99
             ));
100 100
 
101
-            $reporthtml = '(<a href="' . $URL->generate() . '" title="Notify moderators that this comment should be deleted">Report this comment</a>)';
101
+            $reporthtml = '(<a href="'.$URL->generate().'" title="Notify moderators that this comment should be deleted">Report this comment</a>)';
102 102
 
103 103
         } elseif ($comment['modflagged']) {
104 104
             $reporthtml = '(This comment has been reported to moderators)';
@@ -117,11 +117,11 @@  discard block
 block discarded – undo
117 117
         $date = format_date($date, SHORTDATEFORMAT);
118 118
         $time = format_time($time, TIMEFORMAT);
119 119
         ?>
120
-                    <p class="credit"><a href="<?php echo $USERURL->generate(); ?>" title="See information about this user"><strong><?php echo _htmlentities($comment['firstname']) .' '. _htmlentities($comment['lastname']); ?></strong></a><br>
120
+                    <p class="credit"><a href="<?php echo $USERURL->generate(); ?>" title="See information about this user"><strong><?php echo _htmlentities($comment['firstname']).' '._htmlentities($comment['lastname']); ?></strong></a><br>
121 121
                     <small>Posted on <?php echo $date;
122 122
 
123 123
         if (isset($comment['url'])) {
124
-            print ' <a href="' . $comment['url'] . '" title="Link to this comment">' . $time . '</a>';
124
+            print ' <a href="'.$comment['url'].'" title="Link to this comment">'.$time.'</a>';
125 125
 
126 126
         } else {
127 127
             // There won't be a URL when we're just previewing a comment.
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/api/comments_user.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,20 +39,20 @@
 block discarded – undo
39 39
 
40 40
         // Get the name of the member whose epobject was commented upon (if any).
41 41
         if (isset($comment['speaker']) && $comment['speaker']['name'] != '') {
42
-            $member_name = $comment['speaker']['name'] . ': ';
42
+            $member_name = $comment['speaker']['name'].': ';
43 43
         } else {
44 44
             $member_name = '';
45 45
         }
46 46
 
47
-        $user_name = _htmlentities($comment['firstname'] . ' ' . $comment['lastname']);
47
+        $user_name = _htmlentities($comment['firstname'].' '.$comment['lastname']);
48 48
 
49 49
         // We're grouping things by epobject_id, so we're going to display the number
50 50
         // of comments on this epobject.
51 51
         $plural = $comment['total_comments'] == 1 ? ' comment' : ' comments';
52 52
 
53
-        echo "\t\t\t\t<p><a href=\"$comment[url]\">$comment[total_comments]$plural</a> to <strong>" . $member_name . $hansardtext . "</strong><br>\n";
53
+        echo "\t\t\t\t<p><a href=\"$comment[url]\">$comment[total_comments]$plural</a> to <strong>".$member_name.$hansardtext."</strong><br>\n";
54 54
         echo "\t\t\t\t<small>(posted on $date)</small><br>\n";
55
-        echo "\t\t\t\t" . prepare_comment_for_display($comment['body']) . "</p>"; ?>
55
+        echo "\t\t\t\t".prepare_comment_for_display($comment['body'])."</p>"; ?>
56 56
 
57 57
 <?php
58 58
         $PAGE->stripe_end();
Please login to merge, or discard this patch.
www/includes/easyparliament/templates/api/hansard_date.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 if (isset ($data['rows'])) {
13 13
     $out = array();
14
-    for ($i=0; $i<count($data['rows']); $i++) {
14
+    for ($i = 0; $i < count($data['rows']); $i++) {
15 15
         $row = $data['rows'][$i];
16 16
 
17 17
         if ($row['htype'] == '10' && isset($row['excerpt']) && strstr($row['excerpt'], "was asked&#8212;")) {
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         if ($row['htype'] == '10') {
41 41
             $out[] = array('entry' => $entry, 'subs' => array());
42 42
         } else {
43
-            $out[sizeof($out)-1]['subs'][] = $entry;
43
+            $out[sizeof($out) - 1]['subs'][] = $entry;
44 44
         }
45 45
 
46 46
     }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,9 @@
 block discarded – undo
27 27
         }
28 28
 
29 29
         $entry = $row;
30
-        if (isset($row['excerpt']))
31
-            $entry['excerpt'] = trim_characters($entry['excerpt'], 0, 200);
30
+        if (isset($row['excerpt'])) {
31
+                    $entry['excerpt'] = trim_characters($entry['excerpt'], 0, 200);
32
+        }
32 33
         if ($has_content) {
33 34
         } else {
34 35
             unset($entry['listurl']);
Please login to merge, or discard this patch.