@@ -1,7 +1,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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' |
@@ -1,7 +1,7 @@ |
||
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_commentreports"; |
7 | 7 |
@@ -1,7 +1,7 @@ |
||
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_trackbacks"; |
7 | 7 |
@@ -1,7 +1,7 @@ |
||
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_comments"; |
7 | 7 |
@@ -61,7 +61,7 @@ |
||
61 | 61 | global $banner; |
62 | 62 | $banner_text = get_http_var('banner'); |
63 | 63 | |
64 | - if ( $banner->set_text($banner_text) ) { |
|
64 | + if ($banner->set_text($banner_text)) { |
|
65 | 65 | $out = "<h4>update successful</h4>"; |
66 | 66 | $out .= "<p>Banner text is now:</p><p>$banner_text</p>"; |
67 | 67 | } else { |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | ) |
111 | 111 | ); |
112 | 112 | |
113 | - if ( $q->success() ) { |
|
113 | + if ($q->success()) { |
|
114 | 114 | $out = "<h4>update successful</h4>"; |
115 | 115 | } |
116 | 116 | |
@@ -125,9 +125,9 @@ discard block |
||
125 | 125 | |
126 | 126 | $rettext .= '<div id="subnav_websites">'; |
127 | 127 | foreach ($subnav as $label => $path) { |
128 | - $rettext .= '<a href="'. $path . '">'. $label .'</a>'; |
|
128 | + $rettext .= '<a href="' . $path . '">' . $label . '</a>'; |
|
129 | 129 | } |
130 | - $rettext .= '</div>'; |
|
130 | + $rettext .= '</div>'; |
|
131 | 131 | |
132 | 132 | return $rettext; |
133 | 133 | } |
@@ -100,11 +100,11 @@ |
||
100 | 100 | _api_getHansard_year('WMS', $y); |
101 | 101 | } |
102 | 102 | function api_getWMS_search($s) { |
103 | - _api_getHansard_search( array( |
|
103 | + _api_getHansard_search(array( |
|
104 | 104 | 's' => $s, |
105 | 105 | 'pid' => get_http_var('person'), |
106 | 106 | 'type' => 'wms', |
107 | - ) ); |
|
107 | + )); |
|
108 | 108 | } |
109 | 109 | function api_getWMS_person($pid) { |
110 | 110 | _api_getHansard_search(array( |
@@ -57,11 +57,11 @@ |
||
57 | 57 | _api_getHansard_year('WRANS', $y); |
58 | 58 | } |
59 | 59 | function api_getWrans_search($s) { |
60 | - _api_getHansard_search( array( |
|
60 | + _api_getHansard_search(array( |
|
61 | 61 | 's' => $s, |
62 | 62 | 'pid' => get_http_var('person'), |
63 | 63 | 'type' => 'wrans', |
64 | - ) ); |
|
64 | + )); |
|
65 | 65 | } |
66 | 66 | function api_getWrans_person($pid) { |
67 | 67 | _api_getHansard_search(array( |
@@ -8,14 +8,14 @@ discard block |
||
8 | 8 | $q = $db->query($sql, $params); |
9 | 9 | $output = array(); |
10 | 10 | $last_mod = 0; |
11 | - for ($i=0; $i<$q->rows(); $i++) { |
|
11 | + for ($i = 0; $i < $q->rows(); $i++) { |
|
12 | 12 | $pid = $q->field($i, 'person_id'); |
13 | 13 | $row = array( |
14 | 14 | 'member_id' => $q->field($i, 'member_id'), |
15 | 15 | 'person_id' => $pid, |
16 | 16 | 'name' => html_entity_decode(member_full_name($q->field($i, 'house'), $q->field($i, 'title'), |
17 | 17 | $q->field($i, 'given_name'), $q->field($i, 'family_name'), |
18 | - $q->field($i, 'lordofname') )), |
|
18 | + $q->field($i, 'lordofname'))), |
|
19 | 19 | 'party' => isset($parties[$q->field($i, 'party')]) ? $parties[$q->field($i, 'party')] : $q->field($i, 'party'), |
20 | 20 | ); |
21 | 21 | if ($q->field($i, 'house') != 2) { |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | if (count($pids)) { |
33 | 33 | $q = $db->query('SELECT person, dept, position, from_date, to_date FROM moffice |
34 | 34 | WHERE to_date="9999-12-31" AND person IN (' . join(',', $pids) . ')'); |
35 | - for ($i=0; $i<$q->rows(); $i++) { |
|
35 | + for ($i = 0; $i < $q->rows(); $i++) { |
|
36 | 36 | $row = $q->row($i); |
37 | 37 | $pid = $row['person']; |
38 | 38 | unset($row['person']); |