Skip to content

Commit

Permalink
Update some http to https.
Browse files Browse the repository at this point in the history
  • Loading branch information
dracos committed May 23, 2024
1 parent 80d46d9 commit 3d31f78
Show file tree
Hide file tree
Showing 15 changed files with 34 additions and 39 deletions.
4 changes: 2 additions & 2 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ MPs. This will be based on XML format data published by theyworkforyou.com.

We recommend either using rsync or downloading the
zip files containing all the data if you want it - for more information,
see http://parser.theyworkforyou.com/ under "Getting the Data".
see https://parser.theyworkforyou.com/ under "Getting the Data".

At a minimum, we'd recommend getting some recent debates; for example you
could get everything in 2021 by grabbing `scrapedxml/debates/debates2021*`.
Expand Down Expand Up @@ -176,7 +176,7 @@ the development environment.

Fatal error: Class 'XapianStem' not found in /.../www/includes/easyparliament/searchengine.php on line 39
There are some old instructions on compiling Xapian for PHP at
http://lists.tartarus.org/pipermail/xapian-discuss/2004-May/000037.html
https://lists.tartarus.org/pipermail/xapian-discuss/2004-May/000037.html

You need to run `search/index.pl sincefile` to create the Xapian index.
The index can get quite large if you are loading all the data available,
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This is the source code that powers the TheyWorkForYou.com website. It's
mainly written in PHP, although there are also some Perl scripts for database
loading and indexing. The backend parser code is separate and available
[on GitHub](https://github.com/mysociety/parlparse). You can read more about this
on [TheyWorkForYou's parser info page](http://parser.theyworkforyou.com/parser.html)
on [TheyWorkForYou's parser info page](https://parser.theyworkforyou.com/parser.html)

The TheyWorkForYou source code in this distribution is released under a BSD
style license. Roughly, this means you are free to copy, use, modify and
Expand Down Expand Up @@ -93,7 +93,7 @@ information for your testing database. The database will be stripped down and
rebuilt during testing, so make sure it's not an important copy.

You may find that in some versions of PHPUnit errors are thrown regarding code
coverage reports. If this is the case, the version installed by [Composer](http://getcomposer.org/)
coverage reports. If this is the case, the version installed by [Composer](https://getcomposer.org/)
and located at `/vendor/bin/phpunit` should run correctly.

## Build Status
Expand All @@ -102,7 +102,7 @@ and located at `/vendor/bin/phpunit` should run correctly.

[![Scrutinizer Quality Score](https://img.shields.io/scrutinizer/g/mysociety/theyworkforyou.svg)](https://scrutinizer-ci.com/g/mysociety/theyworkforyou/)

[![mySociety Installability](http://img.shields.io/badge/installability-bronze-8c7853.svg)](http://mysociety.github.io/installation-standards.html)
[![mySociety Installability](https://img.shields.io/badge/installability-bronze-8c7853.svg)](https://pages.mysociety.org/installation-standards.html)

## Acknowledgements

Expand Down
2 changes: 1 addition & 1 deletion classes/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public function getUpdateDetails($this_page, $user) {
}

if ($details['url'] != '' && !preg_match('/^http/', $details['url'])) {
$details['url'] = 'http://' . $details['url'];
$details['url'] = 'https://' . $details['url'];
}

# these are used when displaying user details
Expand Down
2 changes: 1 addition & 1 deletion www/docs/admin/glossary_pending.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@

// Wiki woo!
// We need to work out how best to work this...
$wiki_link = _htmlspecialchars("http://en.wikipedia.org/wiki/" . strtr($title, " ", "_"));
$wiki_link = _htmlspecialchars("https://en.wikipedia.org/wiki/" . strtr($title, " ", "_"));
?>
<p>Guessing the wikipedia link - give it a go:<br>
<a href="<?php echo $wiki_link; ?>" target="_blank"><?php echo $wiki_link; ?></a></p>
Expand Down
4 changes: 2 additions & 2 deletions www/docs/api/api_getBoundary.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function api_getBoundary_front() {
<p><big>Returns KML file for a UK Parliament constituency.</big></p>

<p>Returns the bounding polygon of the constituency, in KML format (see <a
href="http://mapit.mysociety.org/">mapit.mysociety.org</a> for other formats,
href="https://mapit.mysociety.org/">mapit.mysociety.org</a> for other formats,
past constituency boundaries, and so on).</p>

<h4>Arguments</h4>
Expand Down Expand Up @@ -38,6 +38,6 @@ function api_getBoundary_name($name) {
api_error('No data found for name');
return;
}
header("Location: http://mapit.mysociety.org/area/4326/$id.kml");
header("Location: https://mapit.mysociety.org/area/4326/$id.kml");
exit;
}
16 changes: 8 additions & 8 deletions www/docs/boundaries/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

$PAGE->page_start();
?>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false"></script>
<h1>Scottish and Northern Irish election constituency boundaries</h1>

<div id="boundaries">
Expand Down Expand Up @@ -57,7 +57,7 @@
</div>

<div class="picture">
<a href="http://www.flickr.com/photos/markybon/138214000/" title="Boundaries by MarkyBon, on Flickr"><img src="http://farm1.static.flickr.com/51/138214000_80327fe675.jpg" width="358" height="500" alt="Boundaries"></a>
<a href="https://www.flickr.com/photos/markybon/138214000/" title="Boundaries by MarkyBon, on Flickr"><img src="https://farm1.static.flickr.com/51/138214000_80327fe675.jpg" width="358" height="500" alt="Boundaries"></a>
<br><small>Boundaries by MarkyBon</small>
</div>
<?php
Expand Down Expand Up @@ -97,7 +97,7 @@
<div id="map_next" style="width:400px;height:400px"></div>
<p class="desc">Former constituency of <?=$current['SPC']?>:</p>
<div id="map_now" style="width:400px;height:400px"></div>
<p class="footer"><small>Uses <a href="http://www.ordnancesurvey.co.uk/">Ordnance Survey</a> data &copy; Crown copyright and database right 2010, via <a href="http://mapit.mysociety.org/">MaPit</a>.</small></p>
<p class="footer"><small>Uses <a href="https://www.ordnancesurvey.co.uk/">Ordnance Survey</a> data &copy; Crown copyright and database right 2010, via <a href="https://mapit.mysociety.org/">MaPit</a>.</small></p>

</div>

Expand All @@ -109,10 +109,10 @@
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById('map_next'), opt);
var boundary = new google.maps.KmlLayer('http://mapit.mysociety.org/area/<?=$new_id['SPC']?>.kml');
var boundary = new google.maps.KmlLayer('https://mapit.mysociety.org/area/<?=$new_id['SPC']?>.kml');
boundary.setMap(map);
var map = new google.maps.Map(document.getElementById('map_now'), opt);
var boundary = new google.maps.KmlLayer('http://mapit.mysociety.org/area/<?=$current_id['SPC']?>.kml');
var boundary = new google.maps.KmlLayer('https://mapit.mysociety.org/area/<?=$current_id['SPC']?>.kml');
boundary.setMap(map);
});
</script>
Expand Down Expand Up @@ -154,7 +154,7 @@
print '<p>The constituency may have kept the same name but altered its boundaries &ndash; do check the maps on the right.</p>';
}
if ($country == 'N' && $current['NIE'] == $current['WMC']) {
print '<p>The constituency may have kept the same name but altered its boundaries &ndash; see the <a href="http://www.boundarycommission.org.uk/pics/big_map_1.jpg">summary map</a>.</p>';
print '<p>The constituency may have kept the same name but altered its boundaries &ndash; see the <a href="https://www.boundarycommission.org.uk/pics/big_map_1.jpg">summary map</a>.</p>';
}
if ($country == 'S') {
print '<p class="informational"><a href="/scotland/">View TheyWorkForYou&rsquo;s coverage of the Scottish Parliament</a></p>';
Expand All @@ -171,7 +171,7 @@
you were in,
and what constituency you are now voting in at the election, along
with maps of before and after for Scotland (Northern Irish people will have to make
do with this <a href="http://www.boundarycommission.org.uk/pics/big_map_1.jpg">overall summary map</a> from the Boundary Commission).
do with this <a href="https://www.boundarycommission.org.uk/pics/big_map_1.jpg">overall summary map</a> from the Boundary Commission).
</p>

<form method="get">
Expand All @@ -183,7 +183,7 @@

<p>This service should work anywhere in Scotland or Nothern Ireland, errors and omissions excepted.</p>

<p>This service is also available through our web service <a href="http://mapit.mysociety.org/">MaPit</a>,
<p>This service is also available through our web service <a href="https://mapit.mysociety.org/">MaPit</a>,
which can provide programmatic access to the constituency for a particular postcode.</p>

<ul class="results">
Expand Down
2 changes: 1 addition & 1 deletion www/docs/parliament/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</div>
<div class='clearboth'></div>
</div>
<div class='image_attribution'>Background image from <a href='http://www.flickr.com/photos/g4egk/4121065454/'>Greg Knapp</a></div>
<div class='image_attribution'>Background image from <a href='https://www.flickr.com/photos/g4egk/4121065454/'>Greg Knapp</a></div>
</div>

<?php
Expand Down
2 changes: 1 addition & 1 deletion www/docs/vote/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ function voteerror($text) {

$message = array (
'title' => "Thanks for your vote",
'text' => "<strong>Would you like to ask a question like this yourself?</strong> Use our <a href=\"http://www.whatdotheyknow.com\">Freedom of Information site</a>."
'text' => "<strong>Would you like to ask a question like this yourself?</strong> Use our <a href=\"https://www.whatdotheyknow.com\">Freedom of Information site</a>."
);

if (get_http_var('ret') != '') {
Expand Down
4 changes: 2 additions & 2 deletions www/includes/easyparliament/glossary.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,8 @@ public function glossarise($body, $tokenize=0, $urlize=0) {

// External links shown within their own definition
// should be the complete and linked url.
// NB. This should only match when $body is a definition beginning with "http:"
if (is_string($body) && preg_match("/^(http:*[^\s])$/i", $body)) {
// NB. This should only match when $body is a definition beginning with "https:"
if (is_string($body) && preg_match("/^(https?:*[^\s])$/i", $body)) {
$body = "<a href=\"" . $body . "\" title=\"External link to " . $body . "\">" . $body . "</a>";
return ($body);
}
Expand Down
13 changes: 4 additions & 9 deletions www/includes/easyparliament/metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@
'data' => array (
'title' => gettext('Raw Data'),
'heading' => gettext('Raw data (XML) - the data behind TheyWorkForYou and Public Whip'),
'url' => 'http://parser.theyworkforyou.com'
'url' => 'https://parser.theyworkforyou.com'
),
'devmailinglist' => array (
'title' => gettext('Developer mailing list'),
Expand All @@ -517,25 +517,20 @@
'heading' => gettext('TheyWorkForYou Source code'),
'url' => 'https://github.com/mysociety/theyworkforyou'
),
'irc' => array (
'title' => 'IRC chat channel',
'heading' => 'IRC chat channel',
'url' => 'http://www.irc.mysociety.org/'
),
'australia' => array (
'title' => 'Australia',
'heading' => 'Open Australia',
'url' => 'http://www.openaustralia.org/'
'url' => 'https://www.openaustralia.org/'
),
'ireland' => array (
'title' => 'Ireland',
'heading' => 'TheyWorkForYou for the Houses of the Oireachtas',
'url' => 'http://www.kildarestreet.com/'
'url' => 'https://www.kildarestreet.com/'
),
'mzalendo' => array (
'title' => 'Mzalendo',
'heading' => 'Keeping an eye on the Kenyan Parliament',
'url' => 'http://info.mzalendo.com/'
'url' => 'https://info.mzalendo.com/'
),
'lordsdebate' => array (
'parent' => 'lordsdebatesfront',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Hi,
This is an automatic response to your email, your email has not been delivered.

If you're trying to send a message to your MP or another of your
representatives, please visit http://www.writetothem.com/
representatives, please visit https://www.writetothem.com/

If you are trying to confirm an email alert or your account, please
click the link in the email that we sent you, or, if you cannot click
Expand Down
2 changes: 1 addition & 1 deletion www/includes/easyparliament/templates/html/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function gtag(){dataLayer.push(arguments);}
<div class="full-page__row">
<div class="banner__content">
<?php if ($country == 'AU') { ?>
You&rsquo;re in Australia, so check out <a href="http://www.openaustralia.org">OpenAustralia</a>, a TheyWorkForYou for down under
You&rsquo;re in Australia, so check out <a href="https://www.openaustralia.org">OpenAustralia</a>, a TheyWorkForYou for down under
<?php } elseif ($country == 'IE') { ?>
Check out <a href="https://www.kildarestreet.com/">KildareStreet</a>, a TheyWorkForYou for the Houses of the Oireachtas
<?php } elseif ($country == 'CA') { ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
<li>Other parliamentary copyright images (eg: photographs of MPs) are reproduced with the permission of Parliament.</li>
</ul>

<p><?= gettext('The copyright of Hansard remains under <a href="http://www.opsi.gov.uk/advice/parliamentary-copyright/">Parliamentary Copyright</a>, used under licence. ') ?></p>
<p><?= gettext('The copyright of Hansard remains under <a href="https://www.parliament.uk/site-information/copyright/">Parliamentary Copyright</a>, used under licence. ') ?></p>

</div>
</div>
Expand Down
10 changes: 5 additions & 5 deletions www/includes/easyparliament/templates/html/static/api_terms.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
intellectual property from one party to the other.</p>
<p>The API contains
Parliamentary information licensed under the <a href="http://www.parliament.uk/site-information/copyright/">Open Parliament Licence</a>;
Parliamentary information licensed under the <a href="https://www.parliament.uk/site-information/copyright/">Open Parliament Licence</a>;
Ordnance Survey data © Crown copyright and database right 2018;
NISRA data © Crown copyright;
Royal Mail data © Royal Mail copyright and database right 2018;
Expand All @@ -142,12 +142,12 @@
licences given by third parties:</p>
<ul>
<li>Parliamentary material may be reused under the terms of the <a href="http://www.parliament.uk/site-information/copyright/">Open Parliament Licence</a>;
<li>Our own data – lists of MPs, Lords, constituencies and so on – is available under the <a href="http://creativecommons.org/licenses/by-sa/2.5/">Creative Commons Attribution-ShareAlike license version 2.5</a>;
<li>Parliamentary material may be reused under the terms of the <a href="https://www.parliament.uk/site-information/copyright/">Open Parliament Licence</a>;
<li>Our own data – lists of MPs, Lords, constituencies and so on – is available under the <a href="https://creativecommons.org/licenses/by-sa/2.5/">Creative Commons Attribution-ShareAlike license version 2.5</a>;
<li>Great Britain postcode and boundary data may be used under the terms of the
<a href="http://www.ordnancesurvey.co.uk/oswebsite/opendata/licence/">OS OpenData licence</a>;
<a href="https://www.ordnancesurvey.co.uk/oswebsite/opendata/licence/">OS OpenData licence</a>;
<li>Northern Ireland boundary data may be used under the
<a href="http://www.nationalarchives.gov.uk/doc/open-government-licence/open-government-licence.htm">Open Government Licence</a>;
<a href="https://www.nationalarchives.gov.uk/doc/open-government-licence/open-government-licence.htm">Open Government Licence</a>;
<li>Northern Ireland postcode data may be used under the terms of the
<a href="https://www.ons.gov.uk/methodology/geography/licences">Northern Ireland End User Licence</a>.
</ul>
Expand Down
2 changes: 1 addition & 1 deletion www/includes/utility.php
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ function($matches) use ($link_length) {
}
},
$text);
$text = str_replace('<a href="www', '<a href="http://www', $text);
$text = str_replace('<a href="www', '<a href="https://www', $text);
$text = preg_replace("/([\w\.]+)(@)([\w\.\-]+)/i", "<a href=\"mailto:$0\">$0</a>", $text);
$text = str_replace("\n", "<br>\n", $text);

Expand Down

0 comments on commit 3d31f78

Please sign in to comment.