@@ -58,7 +58,7 @@ |
||
58 | 58 | <div class="row nested-row"> |
59 | 59 | <div class="homepage-featured-content homepage-content-section"> |
60 | 60 | <?php if ( $featured ) { |
61 | - include dirname(__FILE__) . "/../homepage/featured.php"; |
|
61 | + include dirname(__FILE__) . "/../homepage/featured.php"; |
|
62 | 62 | } ?> |
63 | 63 | </div> |
64 | 64 | <div class="homepage-create-alert homepage-content-section"> |
@@ -4,10 +4,10 @@ discard block |
||
4 | 4 | <div class="hero__mp-search__wrap"> |
5 | 5 | <h1><?= gettext('Find out more about your MSs') ?></h1> |
6 | 6 | <div class="row collapse"> |
7 | - <?php if ( count($data['regional']) > 0 ) { ?> |
|
7 | + <?php if (count($data['regional']) > 0) { ?> |
|
8 | 8 | <ul class="homepage-rep-list"> |
9 | 9 | <li><?= gettext('Your MSs:') ?></li> |
10 | - <?php foreach ( $data['regional'] as $ms ) { ?> |
|
10 | + <?php foreach ($data['regional'] as $ms) { ?> |
|
11 | 11 | <li class="homepage-rep-list__rep"><a href="/ms/?p=<?= $ms['person_id'] ?>"><?= $ms['name'] ?></a></li> |
12 | 12 | <?php } ?> |
13 | 13 | </ul> |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | <div class="panel panel--flushtop clearfix"> |
42 | 42 | <div class="row nested-row"> |
43 | 43 | <div class="homepage-featured-content homepage-content-section"> |
44 | - <?php if ( $featured ) { |
|
44 | + <?php if ($featured) { |
|
45 | 45 | include dirname(__FILE__) . "/../homepage/featured.php"; |
46 | 46 | } ?> |
47 | 47 | </div> |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | <div class="homepage-recently homepage-content-section"> |
87 | 87 | <h2><?= gettext('Recently in the Senedd') ?></h2> |
88 | 88 | <ul class="recently__list"><?php |
89 | - foreach ( $debates['recent'] as $recent ) { |
|
89 | + foreach ($debates['recent'] as $recent) { |
|
90 | 90 | include dirname(__FILE__) . '/../homepage/recent-debates.php'; |
91 | 91 | } |
92 | 92 | ?></ul> |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <div class="business-section"> |
2 | 2 | <div class="business-section__header"> |
3 | 3 | <h1 class="business-section__header__title"> |
4 | - <?php if ($title == "Dadleuon y Senedd"){ ?> |
|
4 | + <?php if ($title == "Dadleuon y Senedd") { ?> |
|
5 | 5 | Dadleuon diweddar Y Senedd |
6 | 6 | <?php } else { ?> |
7 | 7 | <?= sprintf(gettext('Recent %s'), $title) ?> |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | </div> |
11 | 11 | |
12 | 12 | <?php |
13 | - if ( isset($content['data']['data']) ) { |
|
13 | + if (isset($content['data']['data'])) { |
|
14 | 14 | $data = $content['data']['data']; |
15 | 15 | include '_business_list.php'; ?> |
16 | 16 | <div class="business-section__secondary"> |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | include '_calendar_section.php'; |
25 | 25 | ?> |
26 | 26 | </div> |
27 | - <?php if ( isset($content['rssurl']) ) { ?> |
|
27 | + <?php if (isset($content['rssurl'])) { ?> |
|
28 | 28 | <div class="business-section__secondary__item"> |
29 | 29 | <p class="rss-feed"> |
30 | 30 | <a href="<?= WEBPATH . $content['rssurl'] ?>"><?= sprintf(gettext('RSS feed of %s'), $title) ?></a> |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | <?php |
22 | 22 | $lat = $latest_membership['party'] == 'Bishop' ? '' : $latest_membership['party']; |
23 | 23 | if ($latest_membership['current']) { |
24 | - if ($latest_membership['constituency']) { |
|
24 | + if ($latest_membership['constituency']) { |
|
25 | 25 | # First %s is party, second is type of rep (e.g. MS), third is constituency name |
26 | 26 | printf(gettext('<span class="person-header__about__position__role">%s %s</span> for <span class="person-header__about__position__constituency">%s</span>'), |
27 | 27 | $lat, $latest_membership['rep_name'], $latest_membership['constituency']); |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | $lat, $latest_membership['rep_name']); |
31 | 31 | } |
32 | 32 | } else { |
33 | - if ($latest_membership['constituency']) { |
|
33 | + if ($latest_membership['constituency']) { |
|
34 | 34 | printf(gettext('<span class="person-header__about__position__role">Former %s %s</span> for <span class="person-header__about__position__constituency">%s</span>'), |
35 | 35 | $lat, $latest_membership['rep_name'], $latest_membership['constituency']); |
36 | 36 | } else { |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | } else if ($the_users_mp) { |
70 | 70 | $wtt_url = $wtt_url . "?a=WMC&pc=" . _htmlentities(urlencode($user_postcode)); |
71 | 71 | } |
72 | - ?> |
|
72 | + ?> |
|
73 | 73 | <a href="<?= $wtt_url ?>" class="button" onclick="trackLinkClick(this, 'link_click', 'WriteToThem', 'Person'); return false;"><?= gettext('Send a message') ?></a> |
74 | 74 | <?php } ?> |
75 | 75 | <?php if ($has_email_alerts) { ?> |
@@ -1,9 +1,9 @@ discard block |
||
1 | 1 | <div class="person-header <?= $current_member_anywhere ? '' : 'person-header--historical'; ?>"> |
2 | 2 | <div class="full-page__row"> |
3 | 3 | <div class="full-page__unit"> |
4 | - <?php if ( $image ) { ?> |
|
4 | + <?php if ($image) { ?> |
|
5 | 5 | <div class="person-header__image <?= $image['size'] == 'S' ? 'person-header__image--small' : '' ?>"> |
6 | - <?php if ( $image['size'] == 'S' ) { ?> |
|
6 | + <?php if ($image['size'] == 'S') { ?> |
|
7 | 7 | <span style="background-image: url('<?= $image['url'] ?>');"></span> |
8 | 8 | <?php } ?> |
9 | 9 | <img src="<?= $image['url'] ?>"> |
@@ -11,12 +11,12 @@ discard block |
||
11 | 11 | <?php } ?> |
12 | 12 | <div class="person-header__about"> |
13 | 13 | <h1 class="person-header__about__name"><?= ucfirst($full_name) ?></h1> |
14 | - <?php if ( $known_for ) { ?> |
|
14 | + <?php if ($known_for) { ?> |
|
15 | 15 | <p class="person-header__about__known-for"> |
16 | 16 | <?= $known_for ?> |
17 | 17 | </p> |
18 | 18 | <?php } ?> |
19 | - <?php if ( $latest_membership && $latest_membership['house'] != HOUSE_TYPE_ROYAL ) { ?> |
|
19 | + <?php if ($latest_membership && $latest_membership['house'] != HOUSE_TYPE_ROYAL) { ?> |
|
20 | 20 | <p class="person-header__about__position"> |
21 | 21 | <?php |
22 | 22 | $lat = $latest_membership['party'] == 'Bishop' ? '' : $latest_membership['party']; |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | <?php } ?> |
44 | 44 | <?php if (count($social_links) > 0) { ?> |
45 | 45 | <p class="person-header__about__media"> |
46 | - <?php foreach ($social_links as $link){ ?> |
|
46 | + <?php foreach ($social_links as $link) { ?> |
|
47 | 47 | <a href="<?= $link['href'] ?>" onclick="trackLinkClick(this, 'social_link', '<?= $link['type'] ?>', '<?= $link['text'] ?>'); return false;"><?= $link['text'] ?></a> |
48 | 48 | <?php } ?> |
49 | 49 | </p> |
@@ -21,7 +21,7 @@ |
||
21 | 21 | twfy_debug("TEMPLATE", "rss/hansard_search.php"); |
22 | 22 | |
23 | 23 | if (isset ($data['rows']) && count($data['rows']) > 0) { |
24 | - for ($i=0; $i<count($data['rows']); $i++) { |
|
24 | + for ($i = 0; $i < count($data['rows']); $i++) { |
|
25 | 25 | $row = $data['rows'][$i]; |
26 | 26 | |
27 | 27 | $hdate = format_date($row['hdate'], '%a, %d %b %Y'); |
@@ -12,8 +12,8 @@ |
||
12 | 12 | |
13 | 13 | $ym = substr($date, 0, 7); |
14 | 14 | if ($ym != $last) { |
15 | - $url = WEBPATH . "news/archives/".str_replace("-", "/", $ym); |
|
16 | - print "<a href=\"$url\">".format_date($ym."-01", "%B %Y")."</a>"; |
|
15 | + $url = WEBPATH . "news/archives/" . str_replace("-", "/", $ym); |
|
16 | + print "<a href=\"$url\">" . format_date($ym . "-01", "%B %Y") . "</a>"; |
|
17 | 17 | print "<br>"; |
18 | 18 | $last = $ym; |
19 | 19 | } |
@@ -103,12 +103,12 @@ discard block |
||
103 | 103 | </div> |
104 | 104 | </div> |
105 | 105 | |
106 | - <?php if ( $featured_debate_shown == false && count($topics) > 0) { ?> |
|
106 | + <?php if ($featured_debate_shown == false && count($topics) > 0) { ?> |
|
107 | 107 | <div class="panel panel--flushtop clearfix"> |
108 | 108 | <div class="row nested-row"> |
109 | 109 | <div class="homepage-featured-content homepage-content-section"> |
110 | - <?php if ( $featured_debate_shown == false ) { ?> |
|
111 | - <?php if ( count($featured) > 0 ) { |
|
110 | + <?php if ($featured_debate_shown == false) { ?> |
|
111 | + <?php if (count($featured) > 0) { |
|
112 | 112 | include 'homepage/featured.php'; |
113 | 113 | } else { ?> |
114 | 114 | No debates found. |
@@ -135,14 +135,14 @@ discard block |
||
135 | 135 | |
136 | 136 | <h2>Recently in Parliament</h2> |
137 | 137 | <ul class="recently__list"><?php |
138 | - foreach ( $debates['recent'] as $recent ) { |
|
138 | + foreach ($debates['recent'] as $recent) { |
|
139 | 139 | include 'homepage/recent-debates.php'; |
140 | 140 | } |
141 | 141 | ?></ul> |
142 | 142 | </div> |
143 | 143 | <div class="homepage-upcoming homepage-content-section"> |
144 | 144 | <h2>Upcoming</h2> |
145 | - <?php if ( count($calendar) ) { ?> |
|
145 | + <?php if (count($calendar)) { ?> |
|
146 | 146 | <div class="upcoming__controls"> |
147 | 147 | <!-- |
148 | 148 | These controls should make the upcoming section slide to the next day. |
@@ -161,15 +161,15 @@ discard block |
||
161 | 161 | </div> |
162 | 162 | </div> |
163 | 163 | <?php $first = true; $count = 0; |
164 | - foreach ( $calendar as $date => $places ) { |
|
164 | + foreach ($calendar as $date => $places) { |
|
165 | 165 | $count++; ?> |
166 | 166 | <div class="cal-wrapper <?= $first ? 'visible' : 'hidden' ?>" id="day-<?= $count ?>" data-count="<?= $count ?>" data-date="<?= format_date($date, SHORTDATEFORMAT); ?>"> |
167 | 167 | <?php foreach ($places as $place => $events) { ?> |
168 | 168 | <?php $first = false; ?> |
169 | 169 | <h3><?= $place ?></h3> |
170 | 170 | <ul class="upcoming__list"> |
171 | - <?php for ( $i = 0; $i < 3; $i++ ) { |
|
172 | - if ( isset( $events[$i] ) ) { |
|
171 | + <?php for ($i = 0; $i < 3; $i++) { |
|
172 | + if (isset($events[$i])) { |
|
173 | 173 | list($event_title, $meta_items) = MySociety\TheyWorkForYou\Utility\Calendar::meta($events[$i]); |
174 | 174 | ?> |
175 | 175 | <li> |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | <?php } ?> |
180 | 180 | <?php } ?> |
181 | 181 | </ul> |
182 | - <?php if ( count($events) - 3 > 0 ) { ?> |
|
182 | + <?php if (count($events) - 3 > 0) { ?> |
|
183 | 183 | <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) --> |
184 | 184 | <?php } ?> |
185 | 185 | <?php } ?> |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | <?php } ?> |
188 | 188 | <?php } else { |
189 | 189 | list($recess, $from, $to) = recess_prettify(date('j'), date('n'), date('Y'), 1); |
190 | - if ( $recess ) { ?> |
|
190 | + if ($recess) { ?> |
|
191 | 191 | <p> |
192 | 192 | Parliament is on holiday until <?= format_date($to, LONGERDATEFORMAT) ?>. |
193 | 193 | Follow us on <a href="https://twitter.com/theyworkforyou">Twitter</a> and you'll |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | $data = $this->_get_data_by_group($args); |
37 | 37 | |
38 | 38 | $user = new User(); |
39 | - if ( $reps = $this->getRegionalReps($user) ) { |
|
39 | + if ($reps = $this->getRegionalReps($user)) { |
|
40 | 40 | $data['reps'] = $reps; |
41 | 41 | } |
42 | 42 | |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $args['all'] = true; |
72 | 72 | } |
73 | 73 | |
74 | - if ( $this->type == 'peers' ) { |
|
74 | + if ($this->type == 'peers') { |
|
75 | 75 | $args['order'] = 'name'; |
76 | 76 | } |
77 | 77 | |
@@ -131,8 +131,8 @@ discard block |
||
131 | 131 | |
132 | 132 | private function addImagesToData($data) { |
133 | 133 | $new_data = array(); |
134 | - foreach ( $data as $pid => $details ) { |
|
135 | - list($image, ) = Utility\Member::findMemberImage($pid, true, $this->subs_missing_image); |
|
134 | + foreach ($data as $pid => $details) { |
|
135 | + list($image,) = Utility\Member::findMemberImage($pid, true, $this->subs_missing_image); |
|
136 | 136 | $details['image'] = $image; |
137 | 137 | $new_data[$pid] = $details; |
138 | 138 | } |
@@ -149,21 +149,21 @@ discard block |
||
149 | 149 | |
150 | 150 | $urls['plain'] = $URL->generate(); |
151 | 151 | |
152 | - $URL->insert(array( 'o' => 'n')); |
|
152 | + $URL->insert(array('o' => 'n')); |
|
153 | 153 | $urls['by_name'] = $URL->generate(); |
154 | 154 | |
155 | - $URL->insert(array( 'o' => 'l')); |
|
155 | + $URL->insert(array('o' => 'l')); |
|
156 | 156 | $urls['by_last'] = $URL->generate(); |
157 | 157 | |
158 | - $URL->insert(array( 'o' => 'f')); |
|
158 | + $URL->insert(array('o' => 'f')); |
|
159 | 159 | $urls['by_first'] = $URL->generate(); |
160 | 160 | |
161 | - $URL->insert(array( 'o' => 'p')); |
|
161 | + $URL->insert(array('o' => 'p')); |
|
162 | 162 | $urls['by_party'] = $URL->generate(); |
163 | 163 | |
164 | - $URL->insert(array( 'f' => 'csv')); |
|
165 | - $URL->remove(array( 'o')); |
|
166 | - if ( $date = get_http_var('date') ) { |
|
164 | + $URL->insert(array('f' => 'csv')); |
|
165 | + $URL->remove(array('o')); |
|
166 | + if ($date = get_http_var('date')) { |
|
167 | 167 | $URL->insert(array('date' => $date)); |
168 | 168 | } |
169 | 169 | $urls['by_csv'] = $URL->generate(); |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | $constituency = $row['constituency'] ? gettext($row['constituency']) : ''; |
215 | 215 | $party = $row['party'] ? gettext($row['party']) : ''; |
216 | 216 | $url = make_member_url($name, $constituency, $this->house, $p_id); |
217 | - $narray = array ( |
|
217 | + $narray = array( |
|
218 | 218 | 'person_id' => $p_id, |
219 | 219 | 'given_name' => $row['given_name'], |
220 | 220 | 'family_name' => $row['family_name'], |
@@ -232,8 +232,8 @@ discard block |
||
232 | 232 | uasort($data, 'by_peer_name'); |
233 | 233 | } |
234 | 234 | |
235 | - $data = array ( |
|
236 | - 'info' => array ( |
|
235 | + $data = array( |
|
236 | + 'info' => array( |
|
237 | 237 | 'order' => $order |
238 | 238 | ), |
239 | 239 | 'data' => $data |
@@ -2,13 +2,13 @@ discard block |
||
2 | 2 | // Some sketchy crap for displaying pending glossary additions |
3 | 3 | |
4 | 4 | include_once '../../includes/easyparliament/init.php'; |
5 | -include_once (INCLUDESPATH."easyparliament/glossary.php"); |
|
5 | +include_once (INCLUDESPATH . "easyparliament/glossary.php"); |
|
6 | 6 | |
7 | 7 | $this_page = "admin_glossary_pending"; |
8 | 8 | |
9 | 9 | $EDITQUEUE = new \MySociety\TheyWorkForYou\GlossaryEditQueue; |
10 | 10 | |
11 | -$args = array ( |
|
11 | +$args = array( |
|
12 | 12 | 'sort' => "regexp_replace" |
13 | 13 | ); |
14 | 14 | $GLOSSARY = new GLOSSARY($args); |
@@ -23,18 +23,18 @@ discard block |
||
23 | 23 | if (get_http_var('approve')) { |
24 | 24 | $approve = get_http_var('approve', '', true); |
25 | 25 | if (!is_array($approve)) { |
26 | - $approve = array ( $approve ); |
|
26 | + $approve = array($approve); |
|
27 | 27 | } |
28 | 28 | // Add all approved items |
29 | - $data = array ( |
|
29 | + $data = array( |
|
30 | 30 | 'approvals' => $approve, |
31 | 31 | 'epobject_type' => 2 |
32 | 32 | ); |
33 | 33 | $EDITQUEUE->approve($data); |
34 | 34 | } elseif (get_http_var('decline')) { |
35 | - $decline = array (get_http_var('decline')); |
|
35 | + $decline = array(get_http_var('decline')); |
|
36 | 36 | // Dump all declined items |
37 | - $data = array ( |
|
37 | + $data = array( |
|
38 | 38 | 'declines' => $decline, |
39 | 39 | 'epobject_type' => 2 |
40 | 40 | ); |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | |
112 | 112 | // add a modification to the database |
113 | 113 | if (get_http_var('submitterm') && get_http_var('modify')) { |
114 | - $data = array ( |
|
114 | + $data = array( |
|
115 | 115 | 'user_id' => get_http_var('userid'), |
116 | 116 | 'title' => get_http_var('g'), |
117 | 117 | 'body' => get_http_var('definition') |
@@ -2,13 +2,13 @@ discard block |
||
2 | 2 | // Some sketchy crap for displaying pending glossary additions |
3 | 3 | |
4 | 4 | include_once '../../includes/easyparliament/init.php'; |
5 | -include_once (INCLUDESPATH."easyparliament/glossary.php"); |
|
5 | +include_once (INCLUDESPATH . "easyparliament/glossary.php"); |
|
6 | 6 | |
7 | 7 | $this_page = "admin_glossary"; |
8 | 8 | |
9 | 9 | $EDITQUEUE = new \MySociety\TheyWorkForYou\GlossaryEditQueue; |
10 | 10 | |
11 | -$args = array ( |
|
11 | +$args = array( |
|
12 | 12 | 'sort' => "regexp_replace" |
13 | 13 | ); |
14 | 14 | |
@@ -21,18 +21,18 @@ discard block |
||
21 | 21 | if (get_http_var('approve')) { |
22 | 22 | $approve = get_http_var('approve', '', true); |
23 | 23 | if (!is_array($approve)) { |
24 | - $approve = array ( $approve ); |
|
24 | + $approve = array($approve); |
|
25 | 25 | } |
26 | 26 | // Add all approved items |
27 | - $data = array ( |
|
27 | + $data = array( |
|
28 | 28 | 'approvals' => $approve, |
29 | 29 | 'epobject_type' => 2 |
30 | 30 | ); |
31 | 31 | $EDITQUEUE->approve($data); |
32 | 32 | } elseif (get_http_var('decline')) { |
33 | - $decline = array (get_http_var('decline')); |
|
33 | + $decline = array(get_http_var('decline')); |
|
34 | 34 | // Dump all declined items |
35 | - $data = array ( |
|
35 | + $data = array( |
|
36 | 36 | 'declines' => $decline, |
37 | 37 | 'epobject_type' => 2 |
38 | 38 | ); |