@@ -24,7 +24,7 @@ |
||
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 |
@@ -1,4 +1,4 @@ |
||
1 | 1 | <div class="full-page__row"> |
2 | 2 | <?php include '_business_section.php'; ?> |
3 | - <?php $search_title = "Search $title"; include '_search.php'; ?> |
|
3 | + <?php $search_title = "search $title"; include '_search.php'; ?> |
|
4 | 4 | </div> |
@@ -31,7 +31,7 @@ |
||
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> |
@@ -3,7 +3,7 @@ |
||
3 | 3 | $new_style_template = TRUE; |
4 | 4 | |
5 | 5 | include_once '../../../includes/easyparliament/init.php'; |
6 | -include_once INCLUDESPATH . 'easyparliament/member.php'; |
|
6 | +include_once INCLUDESPATH.'easyparliament/member.php'; |
|
7 | 7 | |
8 | 8 | $alert = new MySociety\TheyWorkForYou\AlertView\Simple($THEUSER); |
9 | 9 | $data = $alert->display(); |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -$new_style_template = TRUE; |
|
3 | +$new_style_template = true; |
|
4 | 4 | |
5 | 5 | include_once '../../../includes/easyparliament/init.php'; |
6 | 6 | include_once INCLUDESPATH . 'easyparliament/member.php'; |
@@ -7,7 +7,7 @@ |
||
7 | 7 | namespace MySociety\TheyWorkForYou; |
8 | 8 | |
9 | 9 | // Disable the old PAGE class. |
10 | -$new_style_template = TRUE; |
|
10 | +$new_style_template = true; |
|
11 | 11 | global $this_page; |
12 | 12 | $this_page = 'topics'; |
13 | 13 |
@@ -8,7 +8,7 @@ |
||
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 | } |
@@ -9,7 +9,7 @@ |
||
9 | 9 | If the input is not OK, the form is displayed again with error messages. |
10 | 10 | */ |
11 | 11 | |
12 | -$new_style_template = TRUE; |
|
12 | +$new_style_template = true; |
|
13 | 13 | |
14 | 14 | include_once '../../../includes/easyparliament/init.php'; |
15 | 15 | # need to include this as login code uses error_message |
@@ -27,11 +27,11 @@ |
||
27 | 27 | |
28 | 28 | $data['fb_login_url'] = $login->getLoginURL(); |
29 | 29 | if (isset($data['token'])) { |
30 | - $success = $login->loginUser($data['token']); |
|
31 | - if (!$success) { |
|
30 | + $success = $login->loginUser($data['token']); |
|
31 | + if (!$success) { |
|
32 | 32 | $data['error'] = 'Could not login using Facebook token'; |
33 | 33 | \MySociety\TheyWorkForYou\Renderer::output('login/facebook', $data); |
34 | - } |
|
34 | + } |
|
35 | 35 | } else { |
36 | 36 | \MySociety\TheyWorkForYou\Renderer::output('login/facebook', $data); |
37 | 37 | } |
@@ -33,15 +33,15 @@ discard block |
||
33 | 33 | ':email' => $email |
34 | 34 | )); |
35 | 35 | $out = ''; |
36 | - for ($i=0; $i<$q->rows(); ++$i) { |
|
36 | + for ($i = 0; $i < $q->rows(); ++$i) { |
|
37 | 37 | $row = $q->row($i); |
38 | - $criteria = explode(' ',$row['criteria']); |
|
38 | + $criteria = explode(' ', $row['criteria']); |
|
39 | 39 | $ccc = array(); |
40 | 40 | $current = true; |
41 | 41 | foreach ($criteria as $c) { |
42 | - if (preg_match('#^speaker:(\d+)#',$c,$m)) { |
|
42 | + if (preg_match('#^speaker:(\d+)#', $c, $m)) { |
|
43 | 43 | $MEMBER = new \MEMBER(array('person_id'=>$m[1])); |
44 | - $ccc[] = 'spoken by ' . $MEMBER->full_name(); |
|
44 | + $ccc[] = 'spoken by '.$MEMBER->full_name(); |
|
45 | 45 | if (!$MEMBER->current_member_anywhere()) { |
46 | 46 | $current = false; |
47 | 47 | } |
@@ -49,24 +49,24 @@ discard block |
||
49 | 49 | $ccc[] = $c; |
50 | 50 | } |
51 | 51 | } |
52 | - $criteria = join(' ',$ccc); |
|
53 | - $token = $row['alert_id'] . '-' . $row['registrationtoken']; |
|
52 | + $criteria = join(' ', $ccc); |
|
53 | + $token = $row['alert_id'].'-'.$row['registrationtoken']; |
|
54 | 54 | $action = '<form action="/alert/" method="post"><input type="hidden" name="t" value="'.$token.'">'; |
55 | 55 | if (!$row['confirmed']) { |
56 | 56 | $action .= '<input type="submit" name="action" value="Confirm">'; |
57 | - } elseif ($row['deleted']==2) { |
|
57 | + } elseif ($row['deleted'] == 2) { |
|
58 | 58 | $action .= '<input type="submit" name="action" value="Resume">'; |
59 | 59 | } else { |
60 | 60 | $action .= '<input type="submit" name="action" value="Suspend"> <input type="submit" name="action" value="Delete">'; |
61 | 61 | } |
62 | 62 | $action .= '</form>'; |
63 | - $out .= '<tr><td>' . $criteria . '</td><td align="center">' . $action . '</td></tr>'; |
|
63 | + $out .= '<tr><td>'.$criteria.'</td><td align="center">'.$action.'</td></tr>'; |
|
64 | 64 | if (!$current) { |
65 | 65 | $out .= '<tr><td colspan="2"><small> — <em>not a current member of any body covered by TheyWorkForYou</em></small></td></tr>'; |
66 | 66 | } |
67 | 67 | } |
68 | 68 | if ($out) { |
69 | - print '<table cellpadding="3" cellspacing="0"><tr><th>Criteria</th><th>Action</th></tr>' . $out . '</table>'; |
|
69 | + print '<table cellpadding="3" cellspacing="0"><tr><th>Criteria</th><th>Action</th></tr>'.$out.'</table>'; |
|
70 | 70 | } else { |
71 | 71 | print '<p>You currently have no email alerts set up. You can create alerts <a href="/alert/">here</a>.</p>'; |
72 | 72 | } |
@@ -32,7 +32,7 @@ |
||
32 | 32 | // And make sure the user is allowed to do this! |
33 | 33 | |
34 | 34 | $template = 'user/form'; |
35 | - if (is_numeric( get_http_var("u") ) && $THEUSER->is_able_to("edituser")) { |
|
35 | + if (is_numeric(get_http_var("u")) && $THEUSER->is_able_to("edituser")) { |
|
36 | 36 | |
37 | 37 | $data = $user->getUserDetails(get_http_var('u')); |
38 | 38 | $data['showall'] = true; |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | * page so leave it like that for now. |
6 | 6 | */ |
7 | 7 | |
8 | -$new_style_template = TRUE; |
|
8 | +$new_style_template = true; |
|
9 | 9 | |
10 | 10 | include_once '../../includes/easyparliament/init.php'; |
11 | 11 | # need to include this as login code uses error_message |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | $data['errors'] = $results['errors']; |
128 | 128 | $template = 'user/form'; |
129 | 129 | } else { |
130 | - $data['edited'] = True; |
|
130 | + $data['edited'] = true; |
|
131 | 131 | if (isset($results['email_changed'])) { |
132 | 132 | $data['email_changed'] = $results['email_changed']; |
133 | 133 | } |
@@ -105,10 +105,10 @@ |
||
105 | 105 | |
106 | 106 | // if data has been submitted then handle that |
107 | 107 | if ( |
108 | - get_http_var("submitted") == "true" && ( |
|
108 | + get_http_var("submitted") == "true" && ( |
|
109 | 109 | $this_page == 'useredit' || $this_page == 'otheruseredit' || $this_page == 'userjoin' |
110 | - ) |
|
111 | - ) { |
|
110 | + ) |
|
111 | + ) { |
|
112 | 112 | // Put all the user-submitted data in an array. |
113 | 113 | $data = $user->getUpdateDetails($this_page, $THEUSER->facebook_user); |
114 | 114 |