@@ -366,14 +366,12 @@ |
||
366 | 366 | public function limitToSet($set) { |
367 | 367 | |
368 | 368 | // Sanity check the set exists |
369 | - if (isset($this->sets[$set])) |
|
370 | - { |
|
369 | + if (isset($this->sets[$set])) { |
|
371 | 370 | $out = array(); |
372 | 371 | // Reassemble the new policies list based on the set. |
373 | 372 | foreach ($this->sets[$set] as $set_policy) |
374 | 373 | { |
375 | - if (isset($this->policies[$set_policy])) |
|
376 | - { |
|
374 | + if (isset($this->policies[$set_policy])) { |
|
377 | 375 | $out[$set_policy] = $this->policies[$set_policy]; |
378 | 376 | } else { |
379 | 377 | // if we've limited the policies to a single one then we only |
@@ -397,18 +397,18 @@ |
||
397 | 397 | } |
398 | 398 | |
399 | 399 | public function limitToArray($policies) { |
400 | - $out = array(); |
|
401 | - // Reassemble the new policies list based on the set. |
|
402 | - foreach ($policies as $policy) { |
|
403 | - if (isset($this->policies[$policy])) { |
|
404 | - $out[$policy] = $this->policies[$policy]; |
|
405 | - } |
|
406 | - } |
|
407 | - |
|
408 | - $new_policies = new self(); |
|
409 | - $new_policies->policies = $out; |
|
410 | - |
|
411 | - return $new_policies; |
|
400 | + $out = array(); |
|
401 | + // Reassemble the new policies list based on the set. |
|
402 | + foreach ($policies as $policy) { |
|
403 | + if (isset($this->policies[$policy])) { |
|
404 | + $out[$policy] = $this->policies[$policy]; |
|
405 | + } |
|
406 | + } |
|
407 | + |
|
408 | + $new_policies = new self(); |
|
409 | + $new_policies->policies = $out; |
|
410 | + |
|
411 | + return $new_policies; |
|
412 | 412 | } |
413 | 413 | |
414 | 414 | public function getPolicyDetails($policyID) { |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | public function __construct($policy_id = null) { |
303 | 303 | $this->db = new \ParlDB; |
304 | 304 | |
305 | - if ( $policy_id ) { |
|
305 | + if ($policy_id) { |
|
306 | 306 | $this->policy_id = $policy_id; |
307 | 307 | $this->policies = array( |
308 | 308 | $policy_id => $this->policies[$policy_id] |
@@ -380,7 +380,7 @@ discard block |
||
380 | 380 | // want to complain here if we're looking for that policy and |
381 | 381 | // it does not exist. Otherwise, if the single policy isn't in |
382 | 382 | // the set we want to return an empty set |
383 | - if ( !isset($this->policy_id) || $set_policy == $this->policy_id ) { |
|
383 | + if (!isset($this->policy_id) || $set_policy == $this->policy_id) { |
|
384 | 384 | throw new \Exception ('Policy ' . $set_policy . ' in set "' . $set . '" does not exist.'); |
385 | 385 | } |
386 | 386 | } |
@@ -433,7 +433,7 @@ discard block |
||
433 | 433 | |
434 | 434 | $image = $q['image']; |
435 | 435 | |
436 | - if ( $image && file_exists(BASEDIR . '/' . $image)) { |
|
436 | + if ($image && file_exists(BASEDIR . '/' . $image)) { |
|
437 | 437 | $props['image'] = $image; |
438 | 438 | $props['image_license'] = $q['image_license']; |
439 | 439 | $props['image_attribution'] = $q['image_attrib']; |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $menudata = $this->pagedata->page_metadata('userviewself', 'menu'); |
48 | 48 | $edittitle = $menudata['title']; |
49 | 49 | $EDITURL = new \MySociety\TheyWorkForYou\Url('userviewself'); |
50 | - if ($this->page == 'userviewself' || $this->page == 'useredit' ) { |
|
50 | + if ($this->page == 'userviewself' || $this->page == 'useredit') { |
|
51 | 51 | $editclass = 'on'; |
52 | 52 | } else { |
53 | 53 | $editclass = ''; |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | // The 'Log out' link. |
57 | 57 | $menudata = $this->pagedata->page_metadata('userlogout', 'menu'); |
58 | 58 | $logouttext = $menudata['text']; |
59 | - $logouttitle= $menudata['title']; |
|
59 | + $logouttitle = $menudata['title']; |
|
60 | 60 | |
61 | 61 | $LOGOUTURL = new \MySociety\TheyWorkForYou\Url('userlogout'); |
62 | 62 | if ($this->page != 'userlogout') { |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | */ |
9 | 9 | public function getDataSet() |
10 | 10 | { |
11 | - return $this->createMySQLXMLDataSet(dirname(__FILE__).'/_fixtures/user.xml'); |
|
11 | + return $this->createMySQLXMLDataSet(dirname(__FILE__) . '/_fixtures/user.xml'); |
|
12 | 12 | } |
13 | 13 | |
14 | 14 | private function fetch_page($vars) |
@@ -16,14 +16,14 @@ discard block |
||
16 | 16 | return $this->base_fetch_page($vars, 'user'); |
17 | 17 | } |
18 | 18 | |
19 | - private function fetch_user_page( $vars = array(), $page = 'user' ) |
|
19 | + private function fetch_user_page($vars = array(), $page = 'user') |
|
20 | 20 | { |
21 | - return $this->base_fetch_page_user( $vars, '1.fbb689a0c092f5534b929d302db2c8a9', $page ); |
|
21 | + return $this->base_fetch_page_user($vars, '1.fbb689a0c092f5534b929d302db2c8a9', $page); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | public function testLoginPageLoads() |
25 | 25 | { |
26 | - $page = $this->base_fetch_page( array(), 'user/login' ); |
|
26 | + $page = $this->base_fetch_page(array(), 'user/login'); |
|
27 | 27 | $this->assertContains('Sign in', $page); |
28 | 28 | } |
29 | 29 | |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | 'password' => 'password', |
35 | 35 | 'submitted' => 'true', |
36 | 36 | ); |
37 | - $page = $this->base_fetch_page( $vars, 'user/login' ); |
|
37 | + $page = $this->base_fetch_page($vars, 'user/login'); |
|
38 | 38 | # it's a redirect which means we should get nothing |
39 | 39 | # as we're using the cli version of php :( |
40 | 40 | $this->assertEquals('', $page); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | |
50 | 50 | public function testEditUserInfo() |
51 | 51 | { |
52 | - $page = $this->fetch_user_page( array('pg' => 'edit' ) ); |
|
52 | + $page = $this->fetch_user_page(array('pg' => 'edit')); |
|
53 | 53 | $this->assertContains('Edit your details', $page); |
54 | 54 | $this->assertContains('name="pg" value="edit"', $page); |
55 | 55 | $this->assertContains('value="Test"', $page); |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | 'email' => '[email protected]', |
63 | 63 | 'submitted' => 'true', |
64 | 64 | ); |
65 | - $page = $this->fetch_user_page( $vars ); |
|
65 | + $page = $this->fetch_user_page($vars); |
|
66 | 66 | $this->assertContains('Example User', $page); |
67 | 67 | } |
68 | 68 | } |
@@ -91,6 +91,6 @@ |
||
91 | 91 | <span class="formw"><input type="submit" name="submit" value="Update"></span> |
92 | 92 | </div> |
93 | 93 | </form> |
94 | -EOF; |
|
94 | +eof; |
|
95 | 95 | return $out; |
96 | 96 | } |
@@ -47,7 +47,7 @@ |
||
47 | 47 | if ($row['constituency']) { |
48 | 48 | $desc .= ', ' . $row['constituency']; |
49 | 49 | } |
50 | - $out .= '<option value="'.$p_id.'">'.$desc.'</option>' . "\n"; |
|
50 | + $out .= '<option value="' . $p_id . '">' . $desc . '</option>' . "\n"; |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | $out .= ' </select></span> </div> '; |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | */ |
12 | 12 | public function getDataSet() |
13 | 13 | { |
14 | - return $this->createMySQLXMLDataSet(dirname(__FILE__).'/_fixtures/alerts.xml'); |
|
14 | + return $this->createMySQLXMLDataSet(dirname(__FILE__) . '/_fixtures/alerts.xml'); |
|
15 | 15 | } |
16 | 16 | |
17 | 17 | /** |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | { |
32 | 32 | $ALERT = new ALERT(); |
33 | 33 | |
34 | - $response = $ALERT->fetch(0,0); |
|
34 | + $response = $ALERT->fetch(0, 0); |
|
35 | 35 | |
36 | 36 | // Make sure we only get one response |
37 | 37 | $this->assertEquals(1, count($response['data'])); |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | { |
49 | 49 | $ALERT = new ALERT(); |
50 | 50 | |
51 | - $response = $ALERT->fetch(1,0); |
|
51 | + $response = $ALERT->fetch(1, 0); |
|
52 | 52 | |
53 | 53 | // Make sure we only get two responses |
54 | 54 | $this->assertEquals(2, count($response['data'])); |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | { |
66 | 66 | $ALERT = new ALERT(); |
67 | 67 | |
68 | - $response = $ALERT->fetch_between(1,0, '2014-02-03', '2014-02-04'); |
|
68 | + $response = $ALERT->fetch_between(1, 0, '2014-02-03', '2014-02-04'); |
|
69 | 69 | |
70 | 70 | // Make sure we only get one response |
71 | 71 | $this->assertEquals(1, count($response['alerts'])); |
@@ -111,7 +111,8 @@ |
||
111 | 111 | <?php if ( $house != HOUSE_TYPE_LORDS) { ?> |
112 | 112 | <?= isset($speaker['office']) ? ' - ' . join('; ', $speaker['office']) : '' ?> |
113 | 113 | <?php } ?> |
114 | - <?php } else { // no $pid ?> |
|
114 | + <?php } else { |
|
115 | +// no $pid ?> |
|
115 | 116 | <?= $speaker['name'] ?> |
116 | 117 | <?php } ?> |
117 | 118 | </td> |
@@ -9,19 +9,19 @@ discard block |
||
9 | 9 | <div class="search-page__section__primary"> |
10 | 10 | <h2><?= sprintf(gettext('Who says <em class="current-search-term">%s</em> the most?'), _htmlentities($searchstring)) ?></h2> |
11 | 11 | |
12 | - <?php if ( isset($error) ) { ?> |
|
13 | - <?php if ( $error == 'No results' && isset( $house ) && $house != HOUSE_TYPE_ROYAL ) { ?> |
|
12 | + <?php if (isset($error)) { ?> |
|
13 | + <?php if ($error == 'No results' && isset($house) && $house != HOUSE_TYPE_ROYAL) { ?> |
|
14 | 14 | <ul class="search-result-display-options"> |
15 | 15 | <li> |
16 | - <?php if ( $house == HOUSE_TYPE_COMMONS) { ?> |
|
16 | + <?php if ($house == HOUSE_TYPE_COMMONS) { ?> |
|
17 | 17 | No results for MPs only |
18 | - <?php } else if ( $house == HOUSE_TYPE_LORDS) { ?> |
|
18 | + <?php } else if ($house == HOUSE_TYPE_LORDS) { ?> |
|
19 | 19 | No results for Peers only |
20 | - <?php } else if ( $house == HOUSE_TYPE_SCOTLAND) { ?> |
|
20 | + <?php } else if ($house == HOUSE_TYPE_SCOTLAND) { ?> |
|
21 | 21 | No results for MSPs only |
22 | - <?php } else if ( $house == HOUSE_TYPE_WALES) { ?> |
|
22 | + <?php } else if ($house == HOUSE_TYPE_WALES) { ?> |
|
23 | 23 | <?= gettext('No results for MSs only') ?> |
24 | - <?php } else if ( $house == HOUSE_TYPE_NI) { ?> |
|
24 | + <?php } else if ($house == HOUSE_TYPE_NI) { ?> |
|
25 | 25 | No results for MLAs only |
26 | 26 | <?php } ?> |
27 | 27 | | |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | <?php } ?> |
34 | 34 | <?php } ?> |
35 | 35 | |
36 | - <?php if ( $wtt ) { ?> |
|
36 | + <?php if ($wtt) { ?> |
|
37 | 37 | <p><strong>Now, try reading what a couple of these Lords are saying, |
38 | 38 | to help you find someone appropriate. When you've found someone, |
39 | 39 | follow the "I want to write to (name of lord)" link on their results page |
@@ -41,43 +41,43 @@ discard block |
||
41 | 41 | </strong></p> |
42 | 42 | <?php } ?> |
43 | 43 | |
44 | - <?php if ( isset($speakers) && count($speakers) ) { ?> |
|
44 | + <?php if (isset($speakers) && count($speakers)) { ?> |
|
45 | 45 | |
46 | - <?php if ( !$wtt ) { ?> |
|
46 | + <?php if (!$wtt) { ?> |
|
47 | 47 | <ul class="search-result-display-options"> |
48 | 48 | <li><?= gettext('Results grouped by person') ?></li> |
49 | 49 | <li> |
50 | - <?php if ( $house == HOUSE_TYPE_ROYAL) { ?> |
|
50 | + <?php if ($house == HOUSE_TYPE_ROYAL) { ?> |
|
51 | 51 | <?= gettext('Show All') ?> |
52 | 52 | <?php } else { ?> |
53 | 53 | <a href="<?= $this_url->generate('html') ?>"><?= gettext('Show All') ?></a> |
54 | 54 | <?php } ?> |
55 | 55 | | |
56 | - <?php if ( $house == HOUSE_TYPE_COMMONS) { ?> |
|
56 | + <?php if ($house == HOUSE_TYPE_COMMONS) { ?> |
|
57 | 57 | MPs only |
58 | 58 | <?php } else { ?> |
59 | 59 | <a href="<?= $this_url->generate('html', array('house'=>1)) ?>">MPs only</a> |
60 | 60 | <?php } ?> |
61 | 61 | | |
62 | - <?php if ( $house == HOUSE_TYPE_LORDS) { ?> |
|
62 | + <?php if ($house == HOUSE_TYPE_LORDS) { ?> |
|
63 | 63 | Peers only |
64 | 64 | <?php } else { ?> |
65 | 65 | <a href="<?= $this_url->generate('html', array('house'=>2)) ?>">Lords only</a> |
66 | 66 | <?php } ?> |
67 | 67 | | |
68 | - <?php if ( $house == HOUSE_TYPE_SCOTLAND) { ?> |
|
68 | + <?php if ($house == HOUSE_TYPE_SCOTLAND) { ?> |
|
69 | 69 | MSPs only |
70 | 70 | <?php } else { ?> |
71 | 71 | <a href="<?= $this_url->generate('html', array('house'=>4)) ?>">MSPs only</a> |
72 | 72 | <?php } ?> |
73 | 73 | | |
74 | - <?php if ( $house == HOUSE_TYPE_WALES) { ?> |
|
74 | + <?php if ($house == HOUSE_TYPE_WALES) { ?> |
|
75 | 75 | <?= gettext('MSs only') ?> |
76 | 76 | <?php } else { ?> |
77 | 77 | <a href="<?= $this_url->generate('html', array('house'=>5)) ?>"><?= gettext('MSs only') ?></a> |
78 | 78 | <?php } ?> |
79 | 79 | | |
80 | - <?php if ( $house == HOUSE_TYPE_NI) { ?> |
|
80 | + <?php if ($house == HOUSE_TYPE_NI) { ?> |
|
81 | 81 | MLAs only |
82 | 82 | <?php } else { ?> |
83 | 83 | <a href="<?= $this_url->generate('html', array('house'=>HOUSE_TYPE_NI)) ?>">MLAs only</a> |
@@ -98,25 +98,25 @@ discard block |
||
98 | 98 | </tr> |
99 | 99 | </thead> |
100 | 100 | <tbody> |
101 | - <?php foreach ( $speakers as $pid => $speaker ) { ?> |
|
101 | + <?php foreach ($speakers as $pid => $speaker) { ?> |
|
102 | 102 | |
103 | - <?php if ( $wtt && $pid == 0 ) { continue; } // skip heading count for WTT lords list ?> |
|
103 | + <?php if ($wtt && $pid == 0) { continue; } // skip heading count for WTT lords list ?> |
|
104 | 104 | |
105 | 105 | <tr> |
106 | 106 | <td><?= $speaker['count'] ?></td> |
107 | 107 | <td> |
108 | - <?php if ( $pid ) { ?> |
|
109 | - <?php if ( !$wtt || $speaker['left'] == '9999-12-31' ) { ?> |
|
108 | + <?php if ($pid) { ?> |
|
109 | + <?php if (!$wtt || $speaker['left'] == '9999-12-31') { ?> |
|
110 | 110 | <a href="/search/?q=<?= _htmlentities($searchstring) ?>&pid=<?= $pid ?><?= isset($wtt) && $speaker['left'] == '9999-12-31' ? '&wtt=2' : '' ?>"> |
111 | 111 | <?php } ?> |
112 | 112 | <?= isset($speaker['name']) ? $speaker['name'] : 'N/A' ?> |
113 | - <?php if ( !$wtt || $speaker['left'] == '9999-12-31' ) { ?> |
|
113 | + <?php if (!$wtt || $speaker['left'] == '9999-12-31') { ?> |
|
114 | 114 | </a> |
115 | 115 | <?php } ?> |
116 | - <?php if ( isset($speaker['party']) ) { ?> |
|
116 | + <?php if (isset($speaker['party'])) { ?> |
|
117 | 117 | <span class="search-results-grouped__speaker-party">(<?= $speaker['party'] ?>)</span> |
118 | 118 | <?php } ?> |
119 | - <?php if ( $house != HOUSE_TYPE_LORDS) { ?> |
|
119 | + <?php if ($house != HOUSE_TYPE_LORDS) { ?> |
|
120 | 120 | <?= isset($speaker['office']) ? ' - ' . join('; ', $speaker['office']) : '' ?> |
121 | 121 | <?php } ?> |
122 | 122 | <?php } else { // no $pid ?> |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | <?php } ?> |
125 | 125 | </td> |
126 | 126 | <td> |
127 | - <?php if ( format_date($speaker['pmindate'], '%b %Y') == format_date($speaker['pmaxdate'], '%b %Y') ) { ?> |
|
127 | + <?php if (format_date($speaker['pmindate'], '%b %Y') == format_date($speaker['pmaxdate'], '%b %Y')) { ?> |
|
128 | 128 | <?= format_date($speaker['pmindate'], '%b %Y') ?> |
129 | 129 | <?php } else { ?> |
130 | 130 | <?= format_date($speaker['pmindate'], '%b %Y') ?> – <?= format_date($speaker['pmaxdate'], '%b %Y') ?> |
@@ -107,10 +107,10 @@ |
||
107 | 107 | |
108 | 108 | // if data has been submitted then handle that |
109 | 109 | if ( |
110 | - get_http_var("submitted") == "true" && ( |
|
110 | + get_http_var("submitted") == "true" && ( |
|
111 | 111 | $this_page == 'useredit' || $this_page == 'otheruseredit' || $this_page == 'userjoin' |
112 | - ) |
|
113 | - ) { |
|
112 | + ) |
|
113 | + ) { |
|
114 | 114 | // Put all the user-submitted data in an array. |
115 | 115 | $data = $user->getUpdateDetails($this_page, $THEUSER); |
116 | 116 | $data['ret'] = get_http_var("ret"); |
@@ -30,7 +30,7 @@ |
||
30 | 30 | // We need a user_id. So make sure that exists. |
31 | 31 | // And make sure the user is allowed to do this! |
32 | 32 | $template = 'user/form'; |
33 | - if (is_numeric( get_http_var("u") ) && $THEUSER->is_able_to("edituser")) { |
|
33 | + if (is_numeric(get_http_var("u")) && $THEUSER->is_able_to("edituser")) { |
|
34 | 34 | |
35 | 35 | $data = $user->getUserDetails(get_http_var('u')); |
36 | 36 | $data['showall'] = true; |
@@ -32,10 +32,10 @@ discard block |
||
32 | 32 | $data['url'] = $user->url(); |
33 | 33 | $data['email'] = $user->email(); |
34 | 34 | $data['optin'] = $user->optin() == true ? "Yes" : "No"; |
35 | - $data['postcode'] = $user->postcode(); |
|
35 | + $data['postcode'] = $user->postcode(); |
|
36 | 36 | $data['website'] = $user->url(); |
37 | - $data['registrationtime'] = $user->registrationtime(); |
|
38 | - $data['status']= $user->status(); |
|
37 | + $data['registrationtime'] = $user->registrationtime(); |
|
38 | + $data['status'] = $user->status(); |
|
39 | 39 | $data["deleted"] = $user->deleted(); |
40 | 40 | $data["confirmed"] = $user->confirmed(); |
41 | 41 | $data["status"] = $user->status(); |
@@ -242,10 +242,10 @@ discard block |
||
242 | 242 | // Who are we updating? $THEUSER or someone else? |
243 | 243 | if ($this_page == "otheruseredit") { |
244 | 244 | $who = 'the user’s'; |
245 | - $success = $THEUSER->update_other_user ( $details ); |
|
245 | + $success = $THEUSER->update_other_user($details); |
|
246 | 246 | } else { |
247 | 247 | $who = 'your'; |
248 | - $success = $THEUSER->update_self ( $details ); |
|
248 | + $success = $THEUSER->update_self($details); |
|
249 | 249 | } |
250 | 250 | |
251 | 251 | |
@@ -277,12 +277,12 @@ discard block |
||
277 | 277 | // If this goes well, the user will have their data |
278 | 278 | // added to the database and a confirmation email |
279 | 279 | // will be sent to them. |
280 | - $success = $THEUSER->add ( $details ); |
|
280 | + $success = $THEUSER->add($details); |
|
281 | 281 | |
282 | 282 | $errors = array(); |
283 | 283 | |
284 | 284 | if (!$success) { |
285 | - $errors["db"] = "Sorry, we were unable to create an account for you. Please <a href=\"mailto:". str_replace('@', '@', CONTACTEMAIL) . "\">let us know</a>. Thanks."; |
|
285 | + $errors["db"] = "Sorry, we were unable to create an account for you. Please <a href=\"mailto:" . str_replace('@', '@', CONTACTEMAIL) . "\">let us know</a>. Thanks."; |
|
286 | 286 | } |
287 | 287 | |
288 | 288 | return $errors; |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | |
291 | 291 | public function getRep($cons_type, $mp_house) { |
292 | 292 | global $THEUSER; |
293 | - if ( !$THEUSER->has_postcode() ) { |
|
293 | + if (!$THEUSER->has_postcode()) { |
|
294 | 294 | return array(); |
295 | 295 | } |
296 | 296 | |
@@ -303,11 +303,11 @@ discard block |
||
303 | 303 | // Scottish homepage |
304 | 304 | try { |
305 | 305 | $constituencies = \MySociety\TheyWorkForYou\Utility\Postcode::postcodeToConstituencies($THEUSER->postcode()); |
306 | - if ( isset($constituencies[$cons_type]) ) { |
|
306 | + if (isset($constituencies[$cons_type])) { |
|
307 | 307 | $constituency = $constituencies[$cons_type]; |
308 | 308 | $MEMBER = new Member(array('constituency'=>$constituency, 'house'=> $mp_house)); |
309 | 309 | } |
310 | - } catch ( MemberException $e ) { |
|
310 | + } catch (MemberException $e) { |
|
311 | 311 | return array(); |
312 | 312 | } |
313 | 313 | |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | $mreg = array(); |
345 | 345 | if ($THEUSER->isloggedin() && $THEUSER->postcode() != '' || $THEUSER->postcode_is_set()) { |
346 | 346 | $reps = \MySociety\TheyWorkForYou\Member::getRegionalList($THEUSER->postcode, $mp_house, $cons_type); |
347 | - foreach ( $reps as $rep ) { |
|
347 | + foreach ($reps as $rep) { |
|
348 | 348 | $member = new \MySociety\TheyWorkForYou\Member(array('person_id' => $rep['person_id'])); |
349 | 349 | $mreg[$rep['person_id']] = $this->constructMPData($member, $THEUSER, $mp_house); |
350 | 350 | } |
@@ -20,7 +20,7 @@ |
||
20 | 20 | <input type="hidden" name="scrub" value="$email"> |
21 | 21 | <input type="submit" value="Delete user"> |
22 | 22 | </form> |
23 | -EOF; |
|
23 | +eof; |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | $user_data = array( |