@@ -10,7 +10,7 @@ |
||
10 | 10 | if ($c++ == 2) break; |
11 | 11 | list($title, $content, $date) = $news_row; |
12 | 12 | $url = news_individual_link($date, $title); |
13 | - print "<h5><a href=\"$url\">" . $title . "</a></h5>"; |
|
13 | + print "<h5><a href=\"$url\">".$title."</a></h5>"; |
|
14 | 14 | print "<p>"; |
15 | 15 | print trim_characters(news_format_body($content), 0, 250); |
16 | 16 | print " <a href=\"$url\">Read more...</a>"; |
@@ -7,7 +7,9 @@ |
||
7 | 7 | |
8 | 8 | $c = 0; |
9 | 9 | foreach ($all_news as $id => $news_row) { |
10 | - if ($c++ == 2) break; |
|
10 | + if ($c++ == 2) { |
|
11 | + break; |
|
12 | + } |
|
11 | 13 | list($title, $content, $date) = $news_row; |
12 | 14 | $url = news_individual_link($date, $title); |
13 | 15 | print "<h5><a href=\"$url\">" . $title . "</a></h5>"; |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | header('Content-type: application/rss+xml'); |
3 | -include ($_SERVER['DOCUMENT_ROOT'] . '/../includes/easyparliament/init.php'); |
|
3 | +include ($_SERVER['DOCUMENT_ROOT'].'/../includes/easyparliament/init.php'); |
|
4 | 4 | require_once 'editme.php'; |
5 | 5 | print '<?xml version="1.0" encoding="utf-8"?>' ?> |
6 | 6 | |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | list($title, $content, $date) = $news_row; |
44 | 44 | $url = "https://www.theyworkforyou.com".news_individual_link($date, $title); |
45 | 45 | $excerpt = trim_characters(news_format_body($content), 0, 250); |
46 | - $date = str_replace(" ", "T", $date) . "+00:00"; |
|
46 | + $date = str_replace(" ", "T", $date)."+00:00"; |
|
47 | 47 | ?> |
48 | 48 | <item rdf:about="<?=$url?>"> |
49 | 49 | <title><?=_htmlspecialchars($title)?></title> |
@@ -25,7 +25,9 @@ discard block |
||
25 | 25 | <?php |
26 | 26 | $c = 0; |
27 | 27 | foreach ($all_news as $id => $news_row) { |
28 | - if ($c++ == 10) break; |
|
28 | + if ($c++ == 10) { |
|
29 | + break; |
|
30 | + } |
|
29 | 31 | list($title, $content, $date) = $news_row; |
30 | 32 | $url = "https://www.theyworkforyou.com".news_individual_link($date, $title); |
31 | 33 | print "<rdf:li rdf:resource=\"$url\" />\n"; |
@@ -39,7 +41,9 @@ discard block |
||
39 | 41 | <?php |
40 | 42 | $c = 0; |
41 | 43 | foreach ($all_news as $id => $news_row) { |
42 | - if ($c++ == 10) break; |
|
44 | + if ($c++ == 10) { |
|
45 | + break; |
|
46 | + } |
|
43 | 47 | list($title, $content, $date) = $news_row; |
44 | 48 | $url = "https://www.theyworkforyou.com".news_individual_link($date, $title); |
45 | 49 | $excerpt = trim_characters(news_format_body($content), 0, 250); |
@@ -544,7 +544,7 @@ discard block |
||
544 | 544 | |
545 | 545 | // General news functions |
546 | 546 | function news_format_body($content) { |
547 | - return "<p>" . str_replace("\n\n", "<p>", $content); |
|
547 | + return "<p>".str_replace("\n\n", "<p>", $content); |
|
548 | 548 | } |
549 | 549 | function news_format_ref($title) { |
550 | 550 | $x = preg_replace("/[^a-z0-9 ]/", "", strtolower($title)); |
@@ -552,7 +552,7 @@ discard block |
||
552 | 552 | return $x; |
553 | 553 | } |
554 | 554 | function news_individual_link($date, $title) { |
555 | - return WEBPATH . "news/archives/" . str_replace("-", "/", substr($date, 0, 10)) . "/" . news_format_ref($title); |
|
555 | + return WEBPATH."news/archives/".str_replace("-", "/", substr($date, 0, 10))."/".news_format_ref($title); |
|
556 | 556 | } |
557 | 557 | |
558 | 558 | /* Draft I think that Tomski left in MT, probably delete it now? |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | |
21 | 21 | Read <a href="http://www.mysociety.org/2009/01/21/blimey-it-looks-like-the-internets-won/">our victory mySociety blog post</a>, |
22 | 22 | and do join our mailing list. :-) |
23 | -EOT |
|
23 | +eot |
|
24 | 24 | , '2009-01-21 15:30:00', 'Matthew'), |
25 | 25 | |
26 | 26 | 48 => array('API keys, and improved internal links', <<<EOT |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | crowd-sourcing game to match the reference to the exact speech, much like our |
46 | 46 | <a href="https://www.theyworkforyou.com/video/">video matching</a> (nearly 80% |
47 | 47 | of our archive done!). :) |
48 | -EOT |
|
48 | +eot |
|
49 | 49 | , '2008-07-18 14:01:00', 'Matthew'), |
50 | 50 | |
51 | 51 | 47 => array('Video on TheyWorkForYou', <<<EOT |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | |
58 | 58 | <a href="http://www.mysociety.org/2008/06/01/video-recordings-of-the-house-of-commons-on-theyworkforyoucom/">Etienne's post on the mySociety blog</a> |
59 | 59 | has some background information on the project. |
60 | -EOT |
|
60 | +eot |
|
61 | 61 | , '2008-06-02 18:56:00', 'Matthew'), |
62 | 62 | |
63 | 63 | 46 => array('The Scottish Parliament', <<<EOT |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | launching this now to mark the success in getting endorsements for our <a |
90 | 90 | href="/freeourbills/">Free Our Bills campaign</a>, and we'll be rolling out |
91 | 91 | more goodies as the campaign goes along. |
92 | -EOT |
|
92 | +eot |
|
93 | 93 | , '2008-05-06 13:35:28', 'Matthew'), |
94 | 94 | |
95 | 95 | 45 => array('Shadow ministers and spokespersons', <<<EOT |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | This information is given both on a person's page and within any debates they |
99 | 99 | speak in, which could help explain why your local MP is speaking on transport |
100 | 100 | or foreign affairs a lot. :) |
101 | -EOT |
|
101 | +eot |
|
102 | 102 | , '2008-04-30 08:25:00', 'Matthew'), |
103 | 103 | |
104 | 104 | 44 => array('Please donate to help us expand TheyWorkForYou', <<<EOT |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | Unfortunately, the server that TheyWorkForYou sits on is almost full, so we can’t launch their hard work. Boo! |
108 | 108 | |
109 | 109 | TheyWorkForYou isn’t an externally funded project, and we need funding from other sources to keep it growing and improving. So if the season has filled you with generosity of spirit, why not <a href="https://secure.mysociety.org/donate/">drop us a few pennies</a> to pay for some upgrades? Any extra beyond what we need will go into the general pot to keep <a href="http://www.mysociety.org/">mySociety</a> running and the developers from starving. |
110 | -EOT |
|
110 | +eot |
|
111 | 111 | , '2007-12-21 10:07:35', 'Tom'), |
112 | 112 | |
113 | 113 | 43 => array('The Queen in Parliament', <<<EOT |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | or just look at past |
122 | 122 | <a href="https://www.theyworkforyou.com/search/?pid=13935&pop=1">prorogation and Queen's speeches</a> |
123 | 123 | more easily than anywhere else I've found. |
124 | -EOT |
|
124 | +eot |
|
125 | 125 | , '2007-09-11 15:34:47', 'Matthew'), |
126 | 126 | |
127 | 127 | 42 => array('Missing confirmation emails', <<<EOT |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | few days have now been sent out, and I've got in touch |
133 | 133 | with anyone who signed up in the days prior to |
134 | 134 | that to let them know what happened. |
135 | -EOT |
|
135 | +eot |
|
136 | 136 | , "2007-09-03 17:12:47", 'Matthew'), |
137 | 137 | |
138 | 138 | 41 => array('The Northern Ireland Assembly', <<<EOT |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | |
173 | 173 | ATB,<br> |
174 | 174 | <a href="http://www.dracos.co.uk/">Matthew Somerville</a> |
175 | -EOT |
|
175 | +eot |
|
176 | 176 | , "2006-12-11 00:00:00", 'Matthew'), |
177 | 177 | |
178 | 178 | 40 => array('TheyWorkForYou API', <<<EOT |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | Here's my <a href="http://www.mysociety.org/2006/barcamp-london/">BarCamp |
192 | 192 | Presentation</a> launching the API, and a <a href="http://www.dracos.co.uk/work/theyworkforyou/api/fabfarts/">couple</a> |
193 | 193 | of <a href="http://www.mysociety.org/2006/09/02/battle-your-way-to-sedgefield/">applications</a> using it. |
194 | -EOT |
|
194 | +eot |
|
195 | 195 | , "2006-09-02 17:10:00"), |
196 | 196 | |
197 | 197 | 39 => array('New features over the last couple of months', <<<EOT |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | and when searching a particular person's speeches, we no longer group the results by debate, which |
220 | 220 | was confusing, as you obviously expected to see all the speeches for that person that matched your |
221 | 221 | search terms. |
222 | -EOT |
|
222 | +eot |
|
223 | 223 | , "2006-08-18 09:46:36"), |
224 | 224 | |
225 | 225 | 38 => array("Got an idea for a useful website?", <<<EOT |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | come up with an idea for a useful site like this one, and it beats all |
228 | 228 | the other ideas, we'll build it for free. <a href="http://www.mysociety.org/proposals2006/submit">Submit an idea</a> |
229 | 229 | or <a href="http://www.mysociety.org/proposals2006/view">read and comment on what other people have submitted</a>. |
230 | -EOT |
|
230 | +eot |
|
231 | 231 | , "2006-06-06 06:06:06"), |
232 | 232 | |
233 | 233 | 37 => array("We've added the Lords, and more", <<<EOT |
@@ -237,14 +237,14 @@ discard block |
||
237 | 237 | also added a feature to the search to help you identify which MPs or |
238 | 238 | Lords are interested in a certain word or phrases. Just search as |
239 | 239 | usual and then click 'Show use by person'. |
240 | -EOT |
|
240 | +eot |
|
241 | 241 | , "2006-06-01 12:34:56"), |
242 | 242 | |
243 | 243 | 36 => array("Changes to the Register of Members' Interests", <<<EOT |
244 | 244 | One of the many things our site does, probably without you realising, is to track the Register of Members' Interests, in which MPs are "to provide information of any pecuniary interest or other material benefit which a Member receives which might reasonably be thought by others to influence his or her actions, speeches or votes in Parliament, or actions taken in the capacity of a Member of Parliament". The latest entry published on the official site has always been shown on MP pages (<a href="https://www.theyworkforyou.com/mp/tony_blair/sedgefield#register">here's Tony Blair's</a>), however we kept all previous editions of the Register safe and sound. And now, after a bit of coding, you can view a history of the Register, either <a href="https://www.theyworkforyou.com/regmem/?f=2005-12-14">comparing particular editions</a>, or for particular MPs (<a href="https://www.theyworkforyou.com/regmem/?p=10001">Diane Abbott</a>, for example). Entries only have to stay on the Register for a year, so this can make for some interesting reading. |
245 | 245 | |
246 | 246 | Happy New Year! :) <a href="https://www.theyworkforyou.com/regmem/">Changes to the Register of Members' Interests</a> |
247 | -EOT |
|
247 | +eot |
|
248 | 248 | , "2006-01-01 12:36:00"), |
249 | 249 | |
250 | 250 | 35 => array("TheyWorkForYou.com Wins Award", <<<EOT |
@@ -253,14 +253,14 @@ discard block |
||
253 | 253 | Thanks to the kind souls who nominated us. We enjoyed ourselves. |
254 | 254 | |
255 | 255 | |
256 | -EOT |
|
256 | +eot |
|
257 | 257 | , "2005-07-05 23:54:13"), |
258 | 258 | |
259 | 259 | 34 => array("NEW! Email this page to a friend", <<<EOT |
260 | 260 | At the top right hand side of every (ex)MP's page, we've added a simple new feature: email the page to a friend. |
261 | 261 | |
262 | 262 | <a href="/mp/">Have a go</a>, and let all your friends know how easy it is to keep tabs on what your former MP did and said in your name during the last Parliament. |
263 | -EOT |
|
263 | +eot |
|
264 | 264 | , "2005-04-14 23:43:50"), |
265 | 265 | |
266 | 266 | 33 => array("Play with Pledgebank, Pound the Streets", <<<EOT |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | </blockquote> |
274 | 274 | |
275 | 275 | If you're up for it, why not <a href="http://www.pledgebank.com/theywork">sign up now?</a> |
276 | -EOT |
|
276 | +eot |
|
277 | 277 | , "2005-04-13 22:41:23"), |
278 | 278 | |
279 | 279 | 32 => array("NEW! How MPs voted on Key Issues", <<<EOT |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | This information is the result sophisticated mining of PublicWhip's detailed vote data covering hundreds of Parliamentary divisions. |
287 | 287 | |
288 | 288 | We hope it'll make it easier for you to keep track of where your MP really stands on key issues - after all, They Work For You. |
289 | -EOT |
|
289 | +eot |
|
290 | 290 | , "2005-04-05 22:59:57"), |
291 | 291 | |
292 | 292 | 31 => array("Channel 4 linking to TheyWorkForYou.com", <<<EOT |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | We've done a special paint job for users coming from the Channel 4 site, just to make them feel welcome. You can see an example <a href="https://www.theyworkforyou.com/mp/c4/paul_keetch/hereford">here</a>. |
296 | 296 | |
297 | 297 | We'd love to know what you think of this paint job, as we're planning a redesign. As ever, <a href="/contact/">get in touch</a>. |
298 | -EOT |
|
298 | +eot |
|
299 | 299 | , "2005-04-05 22:53:32"), |
300 | 300 | |
301 | 301 | 30 => array("NEW! Email Alerts & Other Features", <<<EOT |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | - Tom, on behalf of the TheyWorkForYou.com volunteers |
358 | 358 | |
359 | 359 | <a href="https://www.theyworkforyou.com/about/">https://www.theyworkforyou.com/about/</a> - New volunteers welcome! |
360 | -EOT |
|
360 | +eot |
|
361 | 361 | , "2005-02-24 22:02:44"), |
362 | 362 | |
363 | 363 | 26 => array("New Release of TheyWorkForYou.com Source Code", <<<EOT |
@@ -374,7 +374,7 @@ discard block |
||
374 | 374 | Feel free to download it and have a play. |
375 | 375 | |
376 | 376 | Whilst you're at it, don't forget we also publish a full <a href="https://www.theyworkforyou.com/raw/">XML version of the Hansard data</a>. |
377 | -EOT |
|
377 | +eot |
|
378 | 378 | , "2005-01-25 00:15:19"), |
379 | 379 | |
380 | 380 | 25 => array("Search by Date", <<<EOT |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | Next step on search is probably an RSS version of keyword searches. We're still very keen to improve overall relevancy of results - anyone out there fancy lending us a Google Appliance to play with? |
387 | 387 | |
388 | 388 | As ever, <a href="/contact/">contact us</a> if you've got any suggestions how we might improve the site, or if you fancy volunteering. |
389 | -EOT |
|
389 | +eot |
|
390 | 390 | , "2005-01-25 00:16:09"), |
391 | 391 | |
392 | 392 | 20 => array("New! Ministerial Statements now included", <<<EOT |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | Next up: Select Committees, which promise to be an order of magnitude more challenging. We'll keep you posted. |
405 | 405 | |
406 | 406 | PS We're always on the lookout for new volunteers - <a href="/contact/">contact us</a> if you are keen to help in almost any capacity. |
407 | -EOT |
|
407 | +eot |
|
408 | 408 | , "2005-01-17 17:44:47"), |
409 | 409 | |
410 | 410 | 19 => array("NEW! Westminster Hall debates now available.", <<<EOT |
@@ -422,7 +422,7 @@ discard block |
||
422 | 422 | |
423 | 423 | |
424 | 424 | |
425 | -EOT |
|
425 | +eot |
|
426 | 426 | , "2004-12-22 23:47:19"), |
427 | 427 | |
428 | 428 | 18 => array("RSS feed of your MP's recent appearances", <<<EOT |
@@ -436,7 +436,7 @@ discard block |
||
436 | 436 | RSS is a simple way to publish & distribute content which is frequently updated (<a href="http://news.bbc.co.uk/1/hi/help/3223484.stm">learn more here</a>.) |
437 | 437 | |
438 | 438 | Some enlightened MPs are now incorporating this useful feed of their Parliamentary activity into their websites. See <a href="http://www.richardallan.org.uk/">Richard Allen's</a> website for a good example. |
439 | -EOT |
|
439 | +eot |
|
440 | 440 | , "2004-11-27 16:38:41"), |
441 | 441 | |
442 | 442 | 16 => array("NEW! MPs' Expenses", <<<EOT |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | For example, it is good to note that <a href="https://www.theyworkforyou.com/mp/?pid=10508#expenses">Barbara Roche</a>, a North London MP, does not claim excessive travel expenses. |
446 | 446 | |
447 | 447 | Bear in mind that proper democracy does cost money, so please think twice before using these data as a stick with which to beat your MP. An "expensive" MP might be providing excellent value for money. And vice versa. |
448 | -EOT |
|
448 | +eot |
|
449 | 449 | , "2004-11-08 10:11:14"), |
450 | 450 | |
451 | 451 | 11 => array("TheyWorkForYou.com Development Wiki now public", <<<EOT |
@@ -461,7 +461,7 @@ discard block |
||
461 | 461 | (dissemination is fine, but please don't post the link with the login details embedded in the url) |
462 | 462 | |
463 | 463 | In case you're wondering what we're up to, well, we're just rousing ourselves for another tilt at completing our vision before the next election is called, so if anyone python or php skills and fancies lending a hand, do <a href="/contact/">contact us</a>. |
464 | -EOT |
|
464 | +eot |
|
465 | 465 | , "2004-10-01 23:14:13"), |
466 | 466 | |
467 | 467 | 8 => array("New! Full Source Code Published", <<<EOT |
@@ -481,7 +481,7 @@ discard block |
||
481 | 481 | |
482 | 482 | <a href="https://www.theyworkforyou.com/rss/mp/10508.rdf">https://www.theyworkforyou.com/rss/mp/10508.rdf</a> |
483 | 483 | - Typical MP 'recent appearances' RSS feed, uses person id. |
484 | -EOT |
|
484 | +eot |
|
485 | 485 | , "2004-07-18 22:58:23"), |
486 | 486 | |
487 | 487 | 7 => array("Public Beta Now Live", <<<EOT |
@@ -502,7 +502,7 @@ discard block |
||
502 | 502 | More than the usuals, |
503 | 503 | |
504 | 504 | - <i><a href="https://www.theyworkforyou.com/about/" title="link to About Us page">The TheyWorkForYou.com Volunteers</a></i> |
505 | -EOT |
|
505 | +eot |
|
506 | 506 | , "2004-06-06 03:02:53"), |
507 | 507 | |
508 | 508 | 6 => array("Want to help make us complete?", <<<EOT |
@@ -514,14 +514,14 @@ discard block |
||
514 | 514 | |
515 | 515 | Just <a href="/contact/">contact us</a>. |
516 | 516 | |
517 | -EOT |
|
517 | +eot |
|
518 | 518 | , "2004-05-21 22:15:22"), |
519 | 519 | |
520 | 520 | 5 => array("Know someone who'd like this website?", <<<EOT |
521 | 521 | If you know someone who would appreciate being a beta tester, please <a href="/contact/">contact us</a> with their details. |
522 | 522 | |
523 | 523 | Many thanks. |
524 | -EOT |
|
524 | +eot |
|
525 | 525 | , "2004-05-21 22:55:24"), |
526 | 526 | |
527 | 527 | 4 => array("Welcome to our private beta test", <<<EOT |
@@ -538,7 +538,7 @@ discard block |
||
538 | 538 | In the meantime, please enjoy being the first people to scribble in the margins of Hansard. May you be first of many. |
539 | 539 | |
540 | 540 | - <em>The TheyWorkForYou.com volunteers</em> |
541 | -EOT |
|
541 | +eot |
|
542 | 542 | , "2004-05-21 22:55:24") |
543 | 543 | ); |
544 | 544 |
@@ -19,9 +19,9 @@ discard block |
||
19 | 19 | $PAGE->page_start(); |
20 | 20 | $PAGE->stripe_start(); |
21 | 21 | print news_format_body($content); |
22 | - print "<p>Posted on " . format_date(substr($date, 0, 10), LONGDATEFORMAT) . " at " . substr($date, 11); |
|
22 | + print "<p>Posted on ".format_date(substr($date, 0, 10), LONGDATEFORMAT)." at ".substr($date, 11); |
|
23 | 23 | if (isset($news_row[3])) print " by $news_row[3]"; |
24 | - print " | <a href=\"" . news_individual_link($date, $title) . "\">Link to this</a>"; |
|
24 | + print " | <a href=\"".news_individual_link($date, $title)."\">Link to this</a>"; |
|
25 | 25 | break; |
26 | 26 | } |
27 | 27 | if (!$PAGE->page_started()) { |
@@ -38,12 +38,12 @@ discard block |
||
38 | 38 | foreach (array_reverse($all_news) as $id => $news_row) { |
39 | 39 | list($title, $content, $date) = $news_row; |
40 | 40 | if (substr($date, 0, 7) != "$year-$month") continue; |
41 | - print "<h3>" . format_date(substr($date, 0, 10), LONGDATEFORMAT) . "</h3>"; |
|
42 | - print "<h4>" . $title . "</h4>"; |
|
41 | + print "<h3>".format_date(substr($date, 0, 10), LONGDATEFORMAT)."</h3>"; |
|
42 | + print "<h4>".$title."</h4>"; |
|
43 | 43 | print news_format_body($content); |
44 | - print "<p>Posted at " . substr($date, 11); |
|
44 | + print "<p>Posted at ".substr($date, 11); |
|
45 | 45 | if (isset($news_row[3])) print " by $news_row[3]"; |
46 | - print " | <a href=\"" . news_individual_link($date, $title) . "\">Link to this</a>"; |
|
46 | + print " | <a href=\"".news_individual_link($date, $title)."\">Link to this</a>"; |
|
47 | 47 | } |
48 | 48 | } else { |
49 | 49 | // Front page /news |
@@ -54,12 +54,12 @@ discard block |
||
54 | 54 | foreach ($all_news as $id => $news_row) { |
55 | 55 | if ($c++ == 10) break; |
56 | 56 | list($title, $content, $date) = $news_row; |
57 | - print "<h3>" . format_date(substr($date, 0, 10), LONGDATEFORMAT) . "</h3>"; |
|
58 | - print "<h4>" . $title . "</h4>"; |
|
57 | + print "<h3>".format_date(substr($date, 0, 10), LONGDATEFORMAT)."</h3>"; |
|
58 | + print "<h4>".$title."</h4>"; |
|
59 | 59 | print news_format_body($content); |
60 | - print "<p>Posted at " . substr($date, 11); |
|
60 | + print "<p>Posted at ".substr($date, 11); |
|
61 | 61 | if (isset($news_row[3])) print " by $news_row[3]"; |
62 | - print " | <a href=\"" . news_individual_link($date, $title) . "\">Link to this</a>"; |
|
62 | + print " | <a href=\"".news_individual_link($date, $title)."\">Link to this</a>"; |
|
63 | 63 | } |
64 | 64 | } |
65 | 65 |
@@ -9,10 +9,14 @@ discard block |
||
9 | 9 | if (preg_match("#/(\d\d\d\d)/(\d\d)/(\d\d)/([a-z0-9_]+)(\.php)?$#", $uri, $matches)) { |
10 | 10 | // Individual item |
11 | 11 | list($all, $year, $month, $day, $ref) = $matches; |
12 | - if ($ref == "please_build_on_") $ref = "new_full_source_"; |
|
12 | + if ($ref == "please_build_on_") { |
|
13 | + $ref = "new_full_source_"; |
|
14 | + } |
|
13 | 15 | foreach ($all_news as $id => $news_row) { |
14 | 16 | list($title, $content, $date) = $news_row; |
15 | - if (news_format_ref($title) != $ref) continue; |
|
17 | + if (news_format_ref($title) != $ref) { |
|
18 | + continue; |
|
19 | + } |
|
16 | 20 | |
17 | 21 | $this_page = 'sitenews_individual'; |
18 | 22 | $DATA->set_page_metadata($this_page, 'title', $title); |
@@ -20,7 +24,9 @@ discard block |
||
20 | 24 | $PAGE->stripe_start(); |
21 | 25 | print news_format_body($content); |
22 | 26 | print "<p>Posted on " . format_date(substr($date, 0, 10), LONGDATEFORMAT) . " at " . substr($date, 11); |
23 | - if (isset($news_row[3])) print " by $news_row[3]"; |
|
27 | + if (isset($news_row[3])) { |
|
28 | + print " by $news_row[3]"; |
|
29 | + } |
|
24 | 30 | print " | <a href=\"" . news_individual_link($date, $title) . "\">Link to this</a>"; |
25 | 31 | break; |
26 | 32 | } |
@@ -37,12 +43,16 @@ discard block |
||
37 | 43 | $PAGE->stripe_start(); |
38 | 44 | foreach (array_reverse($all_news) as $id => $news_row) { |
39 | 45 | list($title, $content, $date) = $news_row; |
40 | - if (substr($date, 0, 7) != "$year-$month") continue; |
|
46 | + if (substr($date, 0, 7) != "$year-$month") { |
|
47 | + continue; |
|
48 | + } |
|
41 | 49 | print "<h3>" . format_date(substr($date, 0, 10), LONGDATEFORMAT) . "</h3>"; |
42 | 50 | print "<h4>" . $title . "</h4>"; |
43 | 51 | print news_format_body($content); |
44 | 52 | print "<p>Posted at " . substr($date, 11); |
45 | - if (isset($news_row[3])) print " by $news_row[3]"; |
|
53 | + if (isset($news_row[3])) { |
|
54 | + print " by $news_row[3]"; |
|
55 | + } |
|
46 | 56 | print " | <a href=\"" . news_individual_link($date, $title) . "\">Link to this</a>"; |
47 | 57 | } |
48 | 58 | } else { |
@@ -52,13 +62,17 @@ discard block |
||
52 | 62 | $PAGE->stripe_start(); |
53 | 63 | $c = 0; |
54 | 64 | foreach ($all_news as $id => $news_row) { |
55 | - if ($c++ == 10) break; |
|
65 | + if ($c++ == 10) { |
|
66 | + break; |
|
67 | + } |
|
56 | 68 | list($title, $content, $date) = $news_row; |
57 | 69 | print "<h3>" . format_date(substr($date, 0, 10), LONGDATEFORMAT) . "</h3>"; |
58 | 70 | print "<h4>" . $title . "</h4>"; |
59 | 71 | print news_format_body($content); |
60 | 72 | print "<p>Posted at " . substr($date, 11); |
61 | - if (isset($news_row[3])) print " by $news_row[3]"; |
|
73 | + if (isset($news_row[3])) { |
|
74 | + print " by $news_row[3]"; |
|
75 | + } |
|
62 | 76 | print " | <a href=\"" . news_individual_link($date, $title) . "\">Link to this</a>"; |
63 | 77 | } |
64 | 78 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once dirname(__FILE__) . '/api_getHansard.php'; |
|
3 | +include_once dirname(__FILE__).'/api_getHansard.php'; |
|
4 | 4 | |
5 | 5 | function api_getWrans_front() { |
6 | 6 | ?> |
@@ -57,11 +57,11 @@ discard block |
||
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( |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | function api_getAlerts_start_date($start_date) { |
4 | - $args = array ('start_date' => $start_date, 'end_date' => get_http_var('end_date')); |
|
5 | - $alert = new ALERT(); |
|
6 | - $data = $alert->fetch_between($confirmed=1, $deleted=0, $args['start_date'], $args['end_date']); |
|
7 | - api_output($data); |
|
4 | + $args = array ('start_date' => $start_date, 'end_date' => get_http_var('end_date')); |
|
5 | + $alert = new ALERT(); |
|
6 | + $data = $alert->fetch_between($confirmed=1, $deleted=0, $args['start_date'], $args['end_date']); |
|
7 | + api_output($data); |
|
8 | 8 | } |
9 | 9 | |
10 | 10 | ?> |
@@ -1,9 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | function api_getAlerts_start_date($start_date) { |
4 | - $args = array ('start_date' => $start_date, 'end_date' => get_http_var('end_date')); |
|
4 | + $args = array('start_date' => $start_date, 'end_date' => get_http_var('end_date')); |
|
5 | 5 | $alert = new ALERT(); |
6 | - $data = $alert->fetch_between($confirmed=1, $deleted=0, $args['start_date'], $args['end_date']); |
|
6 | + $data = $alert->fetch_between($confirmed = 1, $deleted = 0, $args['start_date'], $args['end_date']); |
|
7 | 7 | api_output($data); |
8 | 8 | } |
9 | 9 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once INCLUDESPATH . '../../commonlib/phplib/mapit.php'; |
|
3 | +include_once INCLUDESPATH.'../../commonlib/phplib/mapit.php'; |
|
4 | 4 | |
5 | 5 | function api_getConstituency_front() { |
6 | 6 | ?> |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | $q = $db->query("select constituency, data_key, data_value from consinfo |
61 | 61 | where constituency = :constituency", array(':constituency' => $constituency)); |
62 | 62 | if ($q->rows()) { |
63 | - for ($i=0; $i<$q->rows(); $i++) { |
|
63 | + for ($i = 0; $i < $q->rows(); $i++) { |
|
64 | 64 | $data_key = $q->field($i, 'data_key'); |
65 | 65 | $output[$data_key] = $q->field($i, 'data_value'); |
66 | 66 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once dirname(__FILE__) . '/api_getMPsInfo.php'; |
|
3 | +include_once dirname(__FILE__).'/api_getMPsInfo.php'; |
|
4 | 4 | |
5 | 5 | function api_getMPInfo_front() { |
6 | 6 | ?> |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once dirname(__FILE__) . '/api_getMembers.php'; |
|
3 | +include_once dirname(__FILE__).'/api_getMembers.php'; |
|
4 | 4 | |
5 | 5 | function api_getMLAs_front() { |
6 | 6 | ?> |