Skip to content
Snippets Groups Projects
Commit 6caedde8 authored by Alexander Hass's avatar Alexander Hass
Browse files

Change all URLs to HTTPS

parent b69f261f
No related branches found
No related tags found
No related merge requests found
......@@ -22,8 +22,8 @@ activity under Reports -> Recent log messages.
Required:
1. For internal URL extraction you need to make sure that Cron always get called
with your real public site URL (for e.g. http://example.com/cron.php). Make
sure it's never executed with http://localhost/cron.php or any other
with your real public site URL (for e.g. https://example.com/cron.php). Make
sure it's never executed with https://localhost/cron.php or any other
hostnames or ports, not available from public. Otherwise all links may be
reported as broken and cannot verified as they should be.
......
......@@ -112,7 +112,7 @@ function linkchecker_admin_settings_form($form_state) {
$form['check'] = array(
'#type' => 'fieldset',
'#title' => t('Check settings'),
'#description' => t('For simultaneous link checks it is recommended to install the <a href="@httprl">HTTP Parallel Request & Threading Library</a>. This may be <strong>necessary</strong> on larger sites with very many links (30.000+), but will also improve overall link check duration on smaller sites. Currently the site has @count links (@count_enabled enabled / @count_disabled disabled).', array('@httprl' => 'http://drupal.org/project/httprl', '@count' => $count_lids_enabled+$count_lids_disabled, '@count_enabled' => $count_lids_enabled, '@count_disabled' => $count_lids_disabled)),
'#description' => t('For simultaneous link checks it is recommended to install the <a href="@httprl">HTTP Parallel Request & Threading Library</a>. This may be <strong>necessary</strong> on larger sites with very many links (30.000+), but will also improve overall link check duration on smaller sites. Currently the site has @count links (@count_enabled enabled / @count_disabled disabled).', array('@httprl' => 'https://drupal.org/project/httprl', '@count' => $count_lids_enabled+$count_lids_disabled, '@count_enabled' => $count_lids_enabled, '@count_disabled' => $count_lids_disabled)),
'#collapsible' => FALSE,
);
$form['check']['linkchecker_check_library'] = array(
......@@ -162,7 +162,7 @@ function linkchecker_admin_settings_form($form_state) {
'#default_value' => variable_get('linkchecker_disable_link_check_for_urls', LINKCHECKER_RESERVED_DOCUMENTATION_DOMAINS),
'#type' => 'textarea',
'#title' => t('Do not check the link status of links containing these URLs'),
'#description' => t('By default this list contains the domain names reserved for use in documentation and not available for registration. See <a href="@rfc-2606">RFC 2606</a>, Section 3 for more information. URLs on this list are still extracted, but the link setting <em>Check link status</em> becomes automatically disabled to prevent false alarms. If you change this list you need to clear all link data and re-analyze your content. Otherwise this setting will only affect new links added after the configuration change.', array('@rfc-2606' => 'http://www.rfc-editor.org/rfc/rfc2606.txt')),
'#description' => t('By default this list contains the domain names reserved for use in documentation and not available for registration. See <a href="@rfc-2606">RFC 2606</a>, Section 3 for more information. URLs on this list are still extracted, but the link setting <em>Check link status</em> becomes automatically disabled to prevent false alarms. If you change this list you need to clear all link data and re-analyze your content. Otherwise this setting will only affect new links added after the configuration change.', array('@rfc-2606' => 'https://www.rfc-editor.org/rfc/rfc2606.txt')),
);
$form['check']['linkchecker_log_level'] = array(
'#default_value' => variable_get('linkchecker_log_level', WATCHDOG_INFO),
......
......@@ -354,12 +354,12 @@ function linkchecker_update_7006() {
function linkchecker_update_7007() {
// Available D7 filters (12/30/2011):
//
// - Line break converter, http://drupal.org/project/drupal
// - Line break converter, https://drupal.org/project/drupal
// name: filter_autop (D6: filter/1)
// - Insert block, http://drupal.org/project/insert_block
// - Insert block, https://drupal.org/project/insert_block
// name: insert_block (D6 insert_block/0)
// tags: [block:name of module=delta of block]
// - Insert view filter, http://drupal.org/project/insert_view
// - Insert view filter, https://drupal.org/project/insert_view
// name: insert_view (D6: insert_view/0)
// See core filter_update_7003();
......
......@@ -4,7 +4,7 @@
* @file
* This module periodically check links in given node types, blocks etc.
*
* Developed by Alexander Hass, http://www.yaml-for-drupal.com/.
* Developed by Alexander Hass, https://www.yaml-for-drupal.com/.
*/
/**
......@@ -24,34 +24,34 @@ define('LINKCHECKER_RESERVED_DOCUMENTATION_DOMAINS', "example.com\nexample.net\n
* extraction process. This filters only eat processing time or holds references
* to other nodes.
*
* - Line break converter, http://drupal.org/project/drupal
* - Line break converter, https://drupal.org/project/drupal
* name: filter_autop
* - Insert block, http://drupal.org/project/insert_block
* - Insert block, https://drupal.org/project/insert_block
* name: insert_block
* tags: [block:name of module=delta of block]
* - Insert view filter, http://drupal.org/project/insert_view
* - Insert view filter, https://drupal.org/project/insert_view
* name: insert_view
* tags: [view:my_view]
* - Smiley filter, http://drupal.org/project/smiley
* - Smiley filter, https://drupal.org/project/smiley
* name: smiley
* tags: Depends on icon set, for e.g: ":) :-) :smile:"
* - Web Links Embed, http://drupal.org/project/weblinks
* - Web Links Embed, https://drupal.org/project/weblinks
* name: weblinks_embed
* tags: [links-embed: id], [links-embed: name]
* - Web Links Filter, http://drupal.org/project/weblinks
* - Web Links Filter, https://drupal.org/project/weblinks
* name: weblinks_filter
* tags: [link: title]
*
* @todo
* - Smileys Filter, http://drupal.org/project/smileys
* - Smileys Filter, https://drupal.org/project/smileys
* name: smileys
* tags: Depends on icon set, for e.g: ":) :-) :smile:"
* - Insert node, http://drupal.org/project/InsertNode
* - Insert node, https://drupal.org/project/InsertNode
* name: insert_node/0
* tags: [node:<name of node> <parameters>]
* - Weblink filter, http://drupal.org/project/links
* - Weblink filter, https://drupal.org/project/links
* name: links_weblink/0
* tags: [weblink:node_id|text], [weblink:node_id/link_id], [weblink:http://weblink.example.com/]
* tags: [weblink:node_id|text], [weblink:node_id/link_id], [weblink:https://weblink.example.com/]
*/
define('LINKCHECKER_DEFAULT_FILTER_BLACKLIST', 'filter_autop|insert_block|insert_view|smiley|smileys|weblinks_embed|weblinks_filter');
......@@ -85,7 +85,7 @@ function linkchecker_permission() {
function linkchecker_help($path, $arg) {
switch ($path) {
case 'admin/help#linkchecker':
return '<p>' . t('This module provides an aid to finding broken links on your site. It periodically checks contents of all public nodes, tries to find any html links and check for their validity. It reports broken links through the admin interface. For more information about status codes see <a href="@rfc">Status Code Definitions</a>.', array('@rfc' => 'http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html')) . '</p>';
return '<p>' . t('This module provides an aid to finding broken links on your site. It periodically checks contents of all public nodes, tries to find any html links and check for their validity. It reports broken links through the admin interface. For more information about status codes see <a href="@rfc">Status Code Definitions</a>.', array('@rfc' => 'https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html')) . '</p>';
}
}
......@@ -167,7 +167,7 @@ function linkchecker_admin_paths() {
* translate.
* @param $severity
* The severity of the message; one of the following values as defined in
* @link http://www.faqs.org/rfcs/rfc3164.html RFC 3164: @endlink
* @link https://www.faqs.org/rfcs/rfc3164.html RFC 3164: @endlink
* - WATCHDOG_EMERGENCY: Emergency, system is unusable.
* - WATCHDOG_ALERT: Alert, action must be taken immediately.
* - WATCHDOG_CRITICAL: Critical conditions.
......@@ -500,7 +500,7 @@ function _linkchecker_check_links() {
$linkchecker_check_useragent = variable_get('linkchecker_check_useragent', 'Drupal (+http://drupal.org/)');
// Connection limit can be overridden via settings.php. Two connections is the
// limit defined in RFC http://www.ietf.org/rfc/rfc2616.txt. Modern browsers
// limit defined in RFC https://www.ietf.org/rfc/rfc2616.txt. Modern browsers
// are typically using 6-8 connections and no more. Never use more and keep
// in mind that you can overload other people servers.
$linkchecker_check_domain_connections = variable_get('linkchecker_check_domain_connections', 2);
......@@ -604,7 +604,7 @@ function _linkchecker_status_handling(&$response, $link) {
// - Prevent E_ALL warnings in DB updates for non-existing $response->error.
// - @todo drupal_http_request() may not provide an UTF8 encoded error message
// what results in a database UPDATE failure. For more information, see
// http://drupal.org/node/371495.
// https://drupal.org/node/371495.
// Workaround: ISO-8859-1 as source encoding may be wrong, but WFM.
if (!isset($response->error)) {
$response->error = '';
......@@ -620,10 +620,10 @@ function _linkchecker_status_handling(&$response, $link) {
// - or by any other element (naming with the id attribute)
// - and must not contain a key/value pair as these type of hash fragments are
// typically used by AJAX applications to prevent additionally HTTP requests
// e.g. http://www.example.com/ajax.html#key1=value1&key2=value2
// e.g. https://www.example.com/ajax.html#key1=value1&key2=value2
// - and must not contain '/' or ',' as this are not normal anchors.
// - and '#top' is a reserved fragment that must not exist in a page.
// See http://www.w3.org/TR/html401/struct/links.html
// See https://www.w3.org/TR/html401/struct/links.html
if ($response->code == 200
&& !empty($response->data)
&& !empty($response->headers['content-type'])
......@@ -671,7 +671,7 @@ function _linkchecker_status_handling(&$response, $link) {
$result = db_query('SELECT nid FROM {linkchecker_node} WHERE lid = :lid', array(':lid' => $link->lid));
foreach ($result as $row) {
// Explicitly don't use node_load_multiple() or the module may run
// into issues like http://drupal.org/node/1210606. With this logic
// into issues like https://drupal.org/node/1210606. With this logic
// nodes can be updated until an out of memory occurs and further
// updates will be made on the remaining nodes only.
$node = node_load($row->nid);
......@@ -708,7 +708,7 @@ function _linkchecker_status_handling(&$response, $link) {
$result = db_query('SELECT cid FROM {linkchecker_comment} WHERE lid = :lid', array(':lid' => $link->lid));
foreach ($result as $row) {
// Explicitly don't use comment_load_multiple() or the module may run
// into issues like http://drupal.org/node/1210606. With this logic
// into issues like https://drupal.org/node/1210606. With this logic
// comment can be updated until an out of memory occurs and further
// updates will be made on the remaining comments only.
$comment = comment_load($row->cid);
......@@ -1761,7 +1761,7 @@ function _linkchecker_parse_fields($entity_type, $bundle_name, $entity, $return_
}
break;
// Link module field, http://drupal.org/project/link.
// Link module field, https://drupal.org/project/link.
case 'link_field':
foreach ($entity_field as $language) {
foreach ($language as $item) {
......@@ -1823,7 +1823,7 @@ function _linkchecker_replace_fields($entity_type, $bundle_name, $entity, $old_u
}
break;
// Link module field, http://drupal.org/project/link.
// Link module field, https://drupal.org/project/link.
case 'link_field':
foreach ($entity_field as $language_name => $language_value) {
foreach ($language_value as $item_name => $item_value) {
......@@ -2082,7 +2082,7 @@ function _linkchecker_extract_links($text = '', $content_path = NULL) {
// This logic intentionally does not implement all the rules definied in
// RFC 3986, section 5.2.4 to show broken links and over-dot-segmented
// URIs; e.g., http://example.com/../../foo/bar.
// For more information, see http://drupal.org/node/832388.
// For more information, see https://drupal.org/node/832388.
$path = substr_replace($absolute_content_path . $url_decoded, '', 0, strlen($base_root));
// Remove './' segments where possible.
......@@ -2322,7 +2322,7 @@ function _linkchecker_link_replace(&$text, $old_link_fqdn = '', $new_link_fqdn =
/**
* Customized clone of core check_markup() with additional filter blacklist.
*
* See http://api.drupal.org/api/function/check_markup/7 for API documentation.
* See https://api.drupal.org/api/function/check_markup/7 for API documentation.
*/
function _linkchecker_check_markup($text, $format_id = NULL, $langcode = '', $cache = FALSE) {
if (!isset($text)) {
......@@ -2554,7 +2554,7 @@ function _linkchecker_unpublish_nodes($lid) {
$result = db_query('SELECT nid FROM {linkchecker_node} WHERE lid = :lid', array(':lid' => $lid));
foreach ($result as $row) {
// Explicitly don't use node_load_multiple() or the module may run
// into issues like http://drupal.org/node/1210606. With this logic
// into issues like https://drupal.org/node/1210606. With this logic
// nodes can be updated until an out of memory occurs and further
// updates will be made on the remaining nodes only.
$node = node_load($row->nid);
......@@ -2577,7 +2577,7 @@ function linkchecker_link_load($lid) {
}
/**
* Impersonates another user, see http://drupal.org/node/287292#comment-3162350.
* Impersonates another user, see https://drupal.org/node/287292#comment-3162350.
*
* Each time this function is called, the active user is saved and $new_user
* becomes the active user. Multiple calls to this function can be nested,
......@@ -2657,9 +2657,9 @@ function _linkchecker_isdefaultrevision($entity) {
//
// This behaviour will change in D8 where $node->isDefaultRevision has been
// introduced. See below links for more details.
// - http://drupal.org/node/1879482
// - http://drupal.org/node/218755
// - http://drupal.org/node/1522154
// - https://drupal.org/node/1879482
// - https://drupal.org/node/218755
// - https://drupal.org/node/1522154
//
// Every moderation module saving a forward revision needs to return FALSE.
// @todo: Refactor this workaround under D8.
......
......@@ -72,7 +72,7 @@ class LinkCheckerLinkExtractionTest extends DrupalWebTestCase {
<a href="./foo4/./foo5/foo6">./foo4/./foo5/foo6</a>
<a href="./test/foo bar/is_valid-hack.test">./test/foo bar/is_valid-hack.test</a>
<!-- URL with uncommon chars that could potentially fail to extract. See http://drupal.org/node/465462. -->
<!-- URL with uncommon chars that could potentially fail to extract. See https://drupal.org/node/465462. -->
<a href="http://www.lagrandeepicerie.fr/#e-boutique/Les_produits_du_moment,2/coffret_vins_doux_naturels,149">URL with uncommon chars</a>
<a href="http://example.com/foo bar/is_valid-hack.test">URL with space</a>
<a href="http://example.com/ajax.html#key1=value1&key2=value2">URL with ajax query params</a>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment