Commit de473408 authored by webchick's avatar webchick

Issue #1742958 by DamienMcKenna, jhodgdon: Fixed All spellings of URI should be uppercase.

parent 5d616120
......@@ -18,7 +18,7 @@ function authorize_filetransfer_form($form, &$form_state) {
global $base_url, $is_https;
$form = array();
// If possible, we want to post this form securely via https.
// If possible, we want to post this form securely via HTTPS.
$form['#https'] = TRUE;
// Get all the available ways to transfer files.
......
......@@ -433,7 +433,7 @@ function conf_path($require_settings = TRUE, $reset = FALSE) {
* The hostname and optional port number, e.g. "www.example.com" or
* "www.example.com:8080".
* @param $script_name
* The part of the url following the hostname, including the leading slash.
* The part of the URL following the hostname, including the leading slash.
* @param $require_settings
* Defaults to TRUE. If TRUE, then only match directories with a
* 'settings.php' file. Otherwise match any directory.
......@@ -768,7 +768,7 @@ function drupal_settings_initialize() {
}
else {
// Otherwise use $base_url as session name, without the protocol
// to use the same session identifiers across http and https.
// to use the same session identifiers across HTTP and HTTPS.
list( , $session_name) = explode('://', $base_url, 2);
// HTTP_HOST can be modified by a visitor, but we already sanitized it
// in drupal_settings_initialize().
......
......@@ -448,7 +448,7 @@ function drupal_get_query_parameters(array $query = NULL, array $exclude = array
* The query string to split.
*
* @return
* An array of url decoded couples $param_name => $value.
* An array of URL decoded couples $param_name => $value.
*/
function drupal_get_query_array($query) {
$result = array();
......@@ -2086,7 +2086,7 @@ function _format_date_callback(array $matches = NULL, $new_langcode = NULL) {
* for the URL. If $options['language'] is omitted, the language will be
* obtained from language(LANGUAGE_TYPE_URL).
* - 'https': Whether this URL should point to a secure location. If not
* defined, the current scheme is used, so the user stays on http or https
* defined, the current scheme is used, so the user stays on HTTP or HTTPS
* respectively. TRUE enforces HTTPS and FALSE enforces HTTP, but HTTPS can
* only be enforced when the variable 'https' is set to TRUE.
* - 'base_url': Only used internally, to modify the base URL when a language
......
......@@ -464,8 +464,8 @@ function file_create_url($uri) {
}
}
elseif ($scheme == 'http' || $scheme == 'https') {
// Check for http so that we don't have to implement getExternalUrl() for
// the http wrapper.
// Check for HTTP so that we don't have to implement getExternalUrl() for
// the HTTP wrapper.
return $uri;
}
else {
......
......@@ -4154,7 +4154,7 @@ function form_type_range_value($element, $input = FALSE) {
}
/**
* Returns HTML for a url form element.
* Returns HTML for a URL form element.
*
* @param $variables
* An associative array containing:
......
......@@ -2087,7 +2087,7 @@ function theme_item_list($variables) {
*
* @param $variables
* An associative array containing:
* - url: The url for the link.
* - url: The URL for the link.
*/
function theme_more_help_link($variables) {
return '<div class="more-help-link">' . l(t('More help'), $variables['url']) . '</div>';
......@@ -2152,7 +2152,7 @@ function theme_html_tag($variables) {
*
* @param $variables
* An associative array containing:
* - url: The url of the main page.
* - url: The URL of the main page.
* - title: A descriptive verb for the link, like 'Read more'.
*/
function theme_more_link($variables) {
......
......@@ -14,7 +14,7 @@
*
* This service is dependent on the 'request' service and can therefore pass the
* Request object to the code that deals with each particular language type.
* This means the Request can be used directly for things like url-based
* This means the Request can be used directly for things like URL-based
* language negotiation.
*/
class LanguageManager {
......
......@@ -342,7 +342,7 @@ public function stream_close() {
* Support for unlink().
*
* @param string $uri
* A string containing the uri to the resource to delete.
* A string containing the URI to the resource to delete.
*
* @return bool
* TRUE if resource was successfully deleted.
......@@ -358,9 +358,9 @@ public function unlink($uri) {
* Support for rename().
*
* @param string $from_uri,
* The uri to the file to rename.
* The URI to the file to rename.
* @param string $to_uri
* The new uri for file.
* The new URI for file.
*
* @return bool
* TRUE if file was successfully renamed.
......
......@@ -15,7 +15,7 @@ function CollapsibleFieldset(node, settings) {
settings
);
// Expand fieldset if there are errors inside, or if it contains an
// element that is targeted by the uri fragment identifier.
// element that is targeted by the URI fragment identifier.
var anchor = location.hash && location.hash !== '#' ? ', ' + location.hash : '';
if (this.$node.find('.error' + anchor).length) {
this.$node.removeClass('collapsed');
......
......@@ -173,7 +173,7 @@ function comment_node_type_load($name) {
}
/**
* Entity uri callback.
* Entity URI callback.
*/
function comment_uri(Comment $comment) {
return array(
......
......@@ -94,7 +94,7 @@ function config_test_entity_info() {
}
/**
* Entity uri callback.
* Entity URI callback.
*
* @param Drupal\config_test\ConfigTest $config_test
* A ConfigTest entity.
......
......@@ -275,7 +275,7 @@ private function doUser() {
// View the database log page-not-found report page.
$this->drupalGet('admin/reports/page-not-found');
$this->assertResponse(200);
// Check that full-length url displayed.
// Check that full-length URL displayed.
$this->assertText($not_found_url, t('DBLog event was recorded: [page not found]'));
}
......
......@@ -44,8 +44,8 @@
* if a higher level persistent cache is available for the entity type.
* Defaults to TRUE.
* - uri callback: A function taking an entity as argument and returning the
* uri elements of the entity, e.g. 'path' and 'options'. The actual entity
* uri can be constructed by passing these elements to url().
* URI elements of the entity, e.g. 'path' and 'options'. The actual entity
* URI can be constructed by passing these elements to url().
* - label callback: (optional) A function taking an entity and optional langcode
* argument, and returning the label of the entity. If langcode is omitted, the
* entity's default language is used.
......
......@@ -1198,7 +1198,7 @@ function theme_image_style($variables) {
$variables['width'] = $dimensions['width'];
$variables['height'] = $dimensions['height'];
// Determine the url for the styled image.
// Determine the URL for the styled image.
$variables['uri'] = image_style_url($variables['style_name'], $variables['uri']);
return theme('image', $variables);
}
......
......@@ -265,7 +265,7 @@ function language_from_url($languages, $request) {
foreach ($languages as $language) {
// Skip the check if the language doesn't have a domain.
if (!empty($domains[$language->langcode])) {
// Ensure that there is exactly one protocol in the url when checking
// Ensure that there is exactly one protocol in the URL when checking
// the hostname.
$host = 'http://' . str_replace(array('http://', 'https://'), '', $domains[$language->langcode]);
$host = parse_url($host, PHP_URL_HOST);
......
......@@ -52,7 +52,7 @@ class LanguageUILanguageNegotiationTest extends WebTestBase {
public static function getInfo() {
return array(
'name' => 'UI language negotiation',
'description' => 'Test UI language switching by url path prefix and domain.',
'description' => 'Test UI language switching by URL path prefix and domain.',
'group' => 'Language',
);
}
......@@ -434,21 +434,21 @@ function testLanguageDomain() {
$italian_url = url('admin', array('language' => $languages['it'], 'script' => ''));
$url_scheme = ($is_https) ? 'https://' : 'http://';
$correct_link = $url_scheme . $link;
$this->assertTrue($italian_url == $correct_link, t('The url() function returns the right url (@url) in accordance with the chosen language', array('@url' => $italian_url)));
$this->assertTrue($italian_url == $correct_link, t('The url() function returns the right URL (@url) in accordance with the chosen language', array('@url' => $italian_url)));
// Test https via options.
// Test HTTPS via options.
variable_set('https', TRUE);
$italian_url = url('admin', array('https' => TRUE, 'language' => $languages['it'], 'script' => ''));
$correct_link = 'https://' . $link;
$this->assertTrue($italian_url == $correct_link, t('The url() function returns the right https url (via options) (@url) in accordance with the chosen language', array('@url' => $italian_url)));
$this->assertTrue($italian_url == $correct_link, t('The url() function returns the right HTTPS URL (via options) (@url) in accordance with the chosen language', array('@url' => $italian_url)));
variable_set('https', FALSE);
// Test https via current url scheme.
// Test HTTPS via current URL scheme.
$temp_https = $is_https;
$is_https = TRUE;
$italian_url = url('admin', array('language' => $languages['it'], 'script' => ''));
$correct_link = 'https://' . $link;
$this->assertTrue($italian_url == $correct_link, t('The url() function returns the right url (via current url scheme) (@url) in accordance with the chosen language', array('@url' => $italian_url)));
$this->assertTrue($italian_url == $correct_link, t('The url() function returns the right URL (via current URL scheme) (@url) in accordance with the chosen language', array('@url' => $italian_url)));
$is_https = $temp_https;
}
}
......@@ -28,7 +28,7 @@ class Gettext {
* @param string $langcode
* Language code string.
* @param array $files
* List of file objects with uri properties pointing to read.
* List of file objects with URI properties pointing to read.
*
* @return array
* Structured array as produced by a PoMemoryWriter.
......@@ -52,7 +52,7 @@ static function filesToArray($langcode, array $files) {
* Reads the given PO files into the database.
*
* @param stdClass $file
* File object with an uri property pointing at the file's path.
* File object with an URI property pointing at the file's path.
*
* @param array $options
* An array with options that can have the following elements:
......
......@@ -24,7 +24,7 @@ class LocalePathTest extends WebTestBase {
public static function getInfo() {
return array(
'name' => 'Path language settings',
'description' => 'Checks you can configure a language for individual url aliases.',
'description' => 'Checks you can configure a language for individual URL aliases.',
'group' => 'Locale',
);
}
......
......@@ -281,7 +281,7 @@ function node_field_display_node_alter(&$display, $context) {
}
/**
* Entity uri callback.
* Entity URI callback.
*
* @param Drupal\node\Node $node
* A node entity.
......
......@@ -14,7 +14,7 @@
* - $date: Formatted creation date. Preprocess functions can reformat it by
* calling format_date() with the desired parameters on the $created variable.
* - $name: Themed username of node author output from theme_username().
* - $node_url: Direct url of the current node.
* - $node_url: Direct URL of the current node.
* - $display_submitted: Whether submission information should be displayed.
* - $submitted: Submission information created from $name and $date during
* template_preprocess_node().
......
......@@ -347,7 +347,7 @@ Drupal.overlay.setFocusBefore = function ($element, document) {
* Check if the given link is in the administrative section of the site.
*
* @param url
* The url to be tested.
* The URL to be tested.
*
* @return boolean
* TRUE if the URL represents an administrative link, FALSE otherwise.
......@@ -382,7 +382,7 @@ Drupal.overlay.isAdminLink = function (url) {
* Determine whether a link is external to the site.
*
* @param url
* The url to be tested.
* The URL to be tested.
*
* @return boolean
* TRUE if the URL is external to the site, FALSE otherwise.
......@@ -571,7 +571,7 @@ Drupal.overlay.eventhandlerOverrideLink = function (event) {
var target = $target[0];
var href = target.href;
// Only handle links that have an href attribute and use the http(s) protocol.
// Only handle links that have an href attribute and use the HTTP(S) protocol.
if (typeof href !== 'undefined' && href !== '' && (/^https?\:/).test(target.protocol)) {
var anchor = href.replace(target.ownerDocument.location.href, '');
// Skip anchor links.
......
......@@ -138,7 +138,7 @@ function testAttributesInMarkupFile() {
$image = current($this->drupalGetTestFiles('image'));
// Create an array for drupalPost with the field names as the keys and
// the uris for the test files as the values.
// the URIs for the test files as the values.
$edit = array("files[" . $field_name . "_" . $langcode . "_0]" => drupal_realpath($file->uri),
"files[" . $image_field . "_" . $langcode . "_0]" => drupal_realpath($image->uri));
......
......@@ -816,8 +816,8 @@ protected function curlInitialize() {
CURLOPT_URL => $base_url,
CURLOPT_FOLLOWLOCATION => FALSE,
CURLOPT_RETURNTRANSFER => TRUE,
CURLOPT_SSL_VERIFYPEER => FALSE, // Required to make the tests run on https.
CURLOPT_SSL_VERIFYHOST => FALSE, // Required to make the tests run on https.
CURLOPT_SSL_VERIFYPEER => FALSE, // Required to make the tests run on HTTPS.
CURLOPT_SSL_VERIFYHOST => FALSE, // Required to make the tests run on HTTPS.
CURLOPT_HEADERFUNCTION => array(&$this, 'curlHeaderCallback'),
CURLOPT_USERAGENT => $this->databasePrefix,
);
......@@ -1828,10 +1828,10 @@ protected function getAbsoluteUrl($path) {
}
/**
* Get the current url from the cURL handler.
* Get the current URL from the cURL handler.
*
* @return
* The current url.
* The current URL.
*/
protected function getUrl() {
return $this->url;
......
......@@ -32,7 +32,7 @@
*/
function hook_simpletest_alter(&$groups) {
// An alternative session handler module would not want to run the original
// Session https handling test because it checks the sessions table in the
// Session HTTPS handling test because it checks the sessions table in the
// database.
unset($groups['Session']['testHttpsSession']);
}
......
......@@ -43,12 +43,12 @@ function testBasicFeedAddNoTitle() {
'output_url' => url($path, array('absolute' => TRUE)),
'title' => '',
),
'external url without title' => array(
'external URL without title' => array(
'input_url' => $external_url,
'output_url' => $external_url,
'title' => '',
),
'local url without title' => array(
'local URL without title' => array(
'input_url' => $fully_qualified_local_url,
'output_url' => $fully_qualified_local_url,
'title' => '',
......@@ -58,12 +58,12 @@ function testBasicFeedAddNoTitle() {
'output_url' => url($path_for_title, array('absolute' => TRUE)),
'title' => $this->randomName(12),
),
'external url with title' => array(
'external URL with title' => array(
'input_url' => $external_for_title,
'output_url' => $external_for_title,
'title' => $this->randomName(12),
),
'local url with title' => array(
'local URL with title' => array(
'input_url' => $fully_qualified_for_title,
'output_url' => $fully_qualified_for_title,
'title' => $this->randomName(12),
......@@ -84,7 +84,7 @@ function testBasicFeedAddNoTitle() {
* Create a pattern representing the RSS feed in the page.
*/
function urlToRSSLinkPattern($url, $title = '') {
// Escape any regular expression characters in the url ('?' is the worst).
// Escape any regular expression characters in the URL ('?' is the worst).
$url = preg_replace('/([+?.*])/', '[$0]', $url);
$generated_pattern = '%<link +rel="alternate" +type="application/rss.xml" +title="' . $title . '" +href="' . $url . '" */>%';
return $generated_pattern;
......
......@@ -22,7 +22,7 @@ public static function getInfo() {
}
/**
* Test valid absolute urls.
* Test valid absolute URLs.
*/
function testValidAbsolute() {
$url_schemes = array('http', 'https', 'ftp');
......@@ -51,13 +51,13 @@ function testValidAbsolute() {
foreach ($valid_absolute_urls as $url) {
$test_url = $scheme . '://' . $url;
$valid_url = valid_url($test_url, TRUE);
$this->assertTrue($valid_url, t('@url is a valid url.', array('@url' => $test_url)));
$this->assertTrue($valid_url, t('@url is a valid URL.', array('@url' => $test_url)));
}
}
}
/**
* Test invalid absolute urls.
* Test invalid absolute URLs.
*/
function testInvalidAbsolute() {
$url_schemes = array('http', 'https', 'ftp');
......@@ -71,13 +71,13 @@ function testInvalidAbsolute() {
foreach ($invalid_ablosule_urls as $url) {
$test_url = $scheme . '://' . $url;
$valid_url = valid_url($test_url, TRUE);
$this->assertFalse($valid_url, t('@url is NOT a valid url.', array('@url' => $test_url)));
$this->assertFalse($valid_url, t('@url is NOT a valid URL.', array('@url' => $test_url)));
}
}
}
/**
* Test valid relative urls.
* Test valid relative URLs.
*/
function testValidRelative() {
$valid_relative_urls = array(
......@@ -92,13 +92,13 @@ function testValidRelative() {
foreach ($valid_relative_urls as $url) {
$test_url = $front . $url;
$valid_url = valid_url($test_url);
$this->assertTrue($valid_url, t('@url is a valid url.', array('@url' => $test_url)));
$this->assertTrue($valid_url, t('@url is a valid URL.', array('@url' => $test_url)));
}
}
}
/**
* Test invalid relative urls.
* Test invalid relative URLs.
*/
function testInvalidRelative() {
$invalid_relative_urls = array(
......@@ -111,7 +111,7 @@ function testInvalidRelative() {
foreach ($invalid_relative_urls as $url) {
$test_url = $front . $url;
$valid_url = valid_url($test_url);
$this->assertFALSE($valid_url, t('@url is NOT a valid url.', array('@url' => $test_url)));
$this->assertFALSE($valid_url, t('@url is NOT a valid URL.', array('@url' => $test_url)));
}
}
}
......
......@@ -10,7 +10,7 @@
use Drupal\simpletest\WebTestBase;
/**
* Tests url element.
* Tests URL element.
*/
class UrlTest extends WebTestBase {
......@@ -25,8 +25,8 @@ class UrlTest extends WebTestBase {
public static function getInfo() {
return array(
'name' => 'Form API url',
'description' => 'Tests the form API url element.',
'name' => 'Form API URL',
'description' => 'Tests the form API URL element.',
'group' => 'Form API',
);
}
......
......@@ -77,7 +77,7 @@ public function testTags() {
$tests = array(
// @todo Trailing linefeeds should be trimmed.
'<a href = "http://drupal.org">Drupal.org</a>' => "Drupal.org [1]\n\n[1] http://drupal.org\n",
// @todo Footer urls should be absolute.
// @todo Footer URLs should be absolute.
"<a href = \"$base_path\">Homepage</a>" => "Homepage [1]\n\n[1] $base_url/\n",
'<address>Drupal</address>' => "Drupal\n",
// @todo The <address> tag is currently not supported.
......@@ -297,7 +297,7 @@ public function testFootnoteReferences() {
. '<br /><a href="http://www.example.com">Host, no path</a>'
. '<br /><a href="' . $base_path . 'node/1">Path, no host</a>'
. '<br /><a href="node/1">Relative path</a>';
// @todo Footnote urls should be absolute.
// @todo Footnote URLs should be absolute.
$tt = "Host and path [1]"
. "\nHost, no path [2]"
// @todo The following two references should be combined.
......
......@@ -508,7 +508,7 @@ function testMenuItemTitlesCases() {
}
/**
* Get a url and assert the title given a case number. If override is true,
* Get a URL and assert the title given a case number. If override is true,
* the title is asserted to begin with "Alternative".
*/
private function menuItemTitlesCasesHelper($case_no, $override = FALSE) {
......
......@@ -10,7 +10,7 @@
use Drupal\simpletest\WebTestBase;
/**
* Ensure that when running under https two session cookies are generated.
* Ensure that when running under HTTPS two session cookies are generated.
*/
class SessionHttpsTest extends WebTestBase {
......@@ -23,8 +23,8 @@ class SessionHttpsTest extends WebTestBase {
public static function getInfo() {
return array(
'name' => 'Session https handling',
'description' => 'Ensure that when running under https two session cookies are generated.',
'name' => 'Session HTTPS handling',
'description' => 'Ensure that when running under HTTPS two session cookies are generated.',
'group' => 'Session'
);
}
......@@ -108,7 +108,7 @@ protected function testHttpsSession() {
$this->cookies = array();
if ($is_https) {
// The functionality does not make sense when running on https.
// The functionality does not make sense when running on HTTPS.
return;
}
......
......@@ -3121,7 +3121,7 @@ function hook_drupal_goto_alter(&$path, &$options, &$http_response_code) {
function hook_html_head_alter(&$head_elements) {
foreach ($head_elements as $key => $element) {
if (isset($element['#attributes']['rel']) && $element['#attributes']['rel'] == 'canonical') {
// I want a custom canonical url.
// I want a custom canonical URL.
$head_elements[$key]['#attributes']['href'] = mymodule_canonical_url();
}
}
......
......@@ -2111,11 +2111,11 @@ function system_authorized_init($callback, $file, $arguments = array(), $page_ti
* @param array $options
* Optional array of options to pass to url().
* @return
* The full URL to authorize.php, using https if available.
* The full URL to authorize.php, using HTTPS if available.
*/
function system_authorized_get_url(array $options = array()) {
global $base_url;
// Force https if available, regardless of what the caller specifies.
// Force HTTPS if available, regardless of what the caller specifies.
$options['https'] = TRUE;
// Prefix with $base_url so url() treats it as an external link.
return url($base_url . '/core/authorize.php', $options);
......
......@@ -2,7 +2,7 @@
/**
* @file
* Fake an https request, for use during testing.
* Fake an HTTPS request, for use during testing.
*/
use Drupal\Core\DrupalKernel;
......@@ -11,7 +11,7 @@
// Set a global variable to indicate a mock HTTPS request.
$is_https_mock = empty($_SERVER['HTTPS']);
// Change to https.
// Change to HTTPS.
$_SERVER['HTTPS'] = 'on';
foreach ($_SERVER as $key => $value) {
$_SERVER[$key] = str_replace('core/modules/system/tests/https.php', 'index.php', $value);
......
......@@ -169,7 +169,7 @@ function taxonomy_entity_info() {
}
/**
* Entity uri callback.
* Entity URI callback.
*/
function taxonomy_term_uri($term) {
return array(
......
......@@ -64,7 +64,7 @@ function testUpdateBuildFetchUrl() {
$url = _update_build_fetch_url($project, $site_key);
$this->assertEqual($url, $expected, "When site_key provided, '$url' should be '$expected'.");
// http://drupal.org/node/1481156 test incorrect logic when url contains
// http://drupal.org/node/1481156 test incorrect logic when URL contains
// a question mark.
$project['info']['project status url'] = 'http://www.example.com/?project=';
$expected = 'http://www.example.com/?project=/' . $project['name'] . '/' . DRUPAL_CORE_COMPATIBILITY;
......
......@@ -181,7 +181,7 @@ function user_entity_info() {
}
/**
* Entity uri callback.
* Entity URI callback.
*/
function user_uri($user) {
return array(
......@@ -1820,7 +1820,7 @@ function user_external_login_register($name, $module) {
* @param array $options
* (optional) A keyed array of settings. Supported options are:
* - langcode: A language code to be used when generating locale-sensitive
* urls. If langcode is NULL the users preferred language is used.
* URLs. If langcode is NULL the users preferred language is used.
*
* @return
* A unique URL that provides a one-time log in for the user, from which
......@@ -1850,7 +1850,7 @@ function user_pass_reset_url($account, $options = array()) {
* @param array $options
* (optional) A keyed array of settings. Supported options are:
* - langcode: A language code to be used when generating locale-sensitive
* urls. If langcode is NULL the users preferred language is used.
* URLs. If langcode is NULL the users preferred language is used.
*
* @return
* A unique URL that may be used to confirm the cancellation of the user
......
......@@ -113,7 +113,7 @@
$_REQUEST = $_GET;
}
// set file to execute or Drupal path (clean urls enabled)
// set file to execute or Drupal path (clean URLs enabled)
if (isset($path['path']) && file_exists(substr($path['path'], 1))) {
$_SERVER['PHP_SELF'] = $_SERVER['REQUEST_URI'] = $path['path'];
$cmd = substr($path['path'], 1);
......
......@@ -266,14 +266,14 @@ function simpletest_script_init($server_software) {
exit();
}
// Get url from arguments.
// Get URL from arguments.
if (!empty($args['url'])) {
$parsed_url = parse_url($args['url']);
$host = $parsed_url['host'] . (isset($parsed_url['port']) ? ':' . $parsed_url['port'] : '');
$path = isset($parsed_url['path']) ? $parsed_url['path'] : '';
// If the passed URL schema is 'https' then setup the $_SERVER variables
// properly so that testing will run under https.
// properly so that testing will run under HTTPS.
if ($parsed_url['scheme'] == 'https') {
$_SERVER['HTTPS'] = 'on';
}
......
......@@ -14,7 +14,7 @@
* - $date: Formatted creation date. Preprocess functions can reformat it by
* calling format_date() with the desired parameters on the $created variable.
* - $name: Themed username of node author output from theme_username().
* - $node_url: Direct url of the current node.
* - $node_url: Direct URL of the current node.
* - $display_submitted: Whether submission information should be displayed.
* - $submitted: Submission information created from $name and $date during
* template_preprocess_node().
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment