Commit 90672068 authored by alexpott's avatar alexpott
Browse files

Issue #2571845 by drupal.ninja03, hussainweb, anil280988, snehi, jhodgdon,...

Issue #2571845 by drupal.ninja03, hussainweb, anil280988, snehi, jhodgdon, GoZ, stefan.r: Links to wikipedia/php.net should be part of the actual t() string so they can be localized
parent 9993a87d
......@@ -79,9 +79,9 @@
* Web services make it possible for applications and web sites to read and
* update information from other web sites. There are several standard
* techniques for providing web services, including:
* - SOAP: http://en.wikipedia.org/wiki/SOAP SOAP
* - XML-RPC: http://en.wikipedia.org/wiki/XML-RPC
* - REST: http://en.wikipedia.org/wiki/Representational_state_transfer
* - SOAP: http://wikipedia.org/wiki/SOAP
* - XML-RPC: http://wikipedia.org/wiki/XML-RPC
* - REST: http://wikipedia.org/wiki/Representational_state_transfer
* Drupal sites can both provide web services and integrate third-party web
* services.
*
......@@ -254,7 +254,7 @@
* - Exporting and importing configuration.
*
* The file storage format for configuration information in Drupal is
* @link http://en.wikipedia.org/wiki/YAML YAML files. @endlink Configuration is
* @link http://wikipedia.org/wiki/YAML YAML files. @endlink Configuration is
* divided into files, each containing one configuration object. The file name
* for a configuration object is equal to the unique name of the configuration,
* with a '.yml' extension. The default configuration files for each module are
......@@ -1120,7 +1120,7 @@
*
* A runtime assertion is a statement that is expected to always be true at
* the point in the code it appears at. They are tested using PHP's internal
* @link http://www.php.net/assert assert() @endlink statement. If an
* @link http://php.net/assert assert() @endlink statement. If an
* assertion is ever FALSE it indicates an error in the code or in module or
* theme configuration files. User-provided configuration files should be
* verified with standard control structures at all times, not just checked in
......
......@@ -630,7 +630,8 @@ function file_munge_filename($filename, $extensions, $alerts = TRUE) {
// Allow potentially insecure uploads for very savvy users and admin
if (!\Drupal::config('system.file')->get('allow_insecure_uploads')) {
// Remove any null bytes. See http://php.net/manual/en/security.filesystem.nullbytes.php
// Remove any null bytes. See
// http://php.net/manual/security.filesystem.nullbytes.php
$filename = str_replace(chr(0), '', $filename);
$whitelist = array_unique(explode(' ', strtolower(trim($extensions))));
......
......@@ -416,7 +416,7 @@ function theme_render_and_autoescape($arg) {
$return = (string) $arg;
}
// You can't throw exceptions in the magic PHP __toString methods, see
// http://php.net/manual/en/language.oop5.magic.php#object.tostring so
// http://php.net/manual/language.oop5.magic.php#object.tostring so
// we also support a toString method.
elseif (method_exists($arg, 'toString')) {
$return = $arg->toString();
......
......@@ -29,26 +29,25 @@ function unicode_requirements() {
'value' => $libraries[$library],
'severity' => $severities[$library],
);
$t_args = array(':url' => 'http://www.php.net/mbstring');
switch ($failed_check) {
case 'mb_strlen':
$requirements['unicode']['description'] = t('Operations on Unicode strings are emulated on a best-effort basis. Install the <a href=":url">PHP mbstring extension</a> for improved Unicode support.', $t_args);
$requirements['unicode']['description'] = t('Operations on Unicode strings are emulated on a best-effort basis. Install the <a href="http://php.net/mbstring">PHP mbstring extension</a> for improved Unicode support.');
break;
case 'mbstring.func_overload':
$requirements['unicode']['description'] = t('Multibyte string function overloading in PHP is active and must be disabled. Check the php.ini <em>mbstring.func_overload</em> setting. Please refer to the <a href=":url">PHP mbstring documentation</a> for more information.', $t_args);
$requirements['unicode']['description'] = t('Multibyte string function overloading in PHP is active and must be disabled. Check the php.ini <em>mbstring.func_overload</em> setting. Please refer to the <a href="http://php.net/mbstring">PHP mbstring documentation</a> for more information.');
break;
case 'mbstring.encoding_translation':
$requirements['unicode']['description'] = t('Multibyte string input conversion in PHP is active and must be disabled. Check the php.ini <em>mbstring.encoding_translation</em> setting. Please refer to the <a href=":url">PHP mbstring documentation</a> for more information.', $t_args);
$requirements['unicode']['description'] = t('Multibyte string input conversion in PHP is active and must be disabled. Check the php.ini <em>mbstring.encoding_translation</em> setting. Please refer to the <a href="http://php.net/mbstring">PHP mbstring documentation</a> for more information.');
break;
case 'mbstring.http_input':
$requirements['unicode']['description'] = t('Multibyte string input conversion in PHP is active and must be disabled. Check the php.ini <em>mbstring.http_input</em> setting. Please refer to the <a href=":url">PHP mbstring documentation</a> for more information.', $t_args);
$requirements['unicode']['description'] = t('Multibyte string input conversion in PHP is active and must be disabled. Check the php.ini <em>mbstring.http_input</em> setting. Please refer to the <a href="http://php.net/mbstring">PHP mbstring documentation</a> for more information.');
break;
case 'mbstring.http_output':
$requirements['unicode']['description'] = t('Multibyte string output conversion in PHP is active and must be disabled. Check the php.ini <em>mbstring.http_output</em> setting. Please refer to the <a href=":url">PHP mbstring documentation</a> for more information.', $t_args);
$requirements['unicode']['description'] = t('Multibyte string output conversion in PHP is active and must be disabled. Check the php.ini <em>mbstring.http_output</em> setting. Please refer to the <a href="http://php.net/mbstring">PHP mbstring documentation</a> for more information.');
break;
}
......
......@@ -177,7 +177,7 @@ public static function createFromTimestamp($timestamp, $timezone = NULL, $settin
* to use things like negative years, which php's parser fails on, or
* any other specialized input with a known format. If provided the
* date will be created using the createFromFormat() method.
* @see http://us3.php.net/manual/en/datetime.createfromformat.php
* @see http://php.net/manual/datetime.createfromformat.php
* @param mixed $time
* @see __construct()
* @param mixed $timezone
......@@ -389,7 +389,7 @@ protected function prepareFormat($format) {
* PHP creates a valid date from invalid data with only a warning,
* 2011-02-30 becomes 2011-03-03, for instance, but we don't want that.
*
* @see http://us3.php.net/manual/en/time.getlasterrors.php
* @see http://php.net/manual/time.getlasterrors.php
*/
public function checkErrors() {
$errors = \DateTime::getLastErrors();
......
......@@ -15,7 +15,7 @@ class Bytes {
/**
* The number of bytes in a kilobyte.
*
* @see http://en.wikipedia.org/wiki/Kilobyte
* @see http://wikipedia.org/wiki/Kilobyte
*/
const KILOBYTE = 1024;
......
......@@ -334,7 +334,7 @@ public static function escapeCdataElement(\DOMNode $node, $comment_start = '//',
// Prevent invalid cdata escaping as this would throw a DOM error.
// This is the same behavior as found in libxml2.
// Related W3C standard: http://www.w3.org/TR/REC-xml/#dt-cdsection
// Fix explanation: http://en.wikipedia.org/wiki/CDATA#Nesting
// Fix explanation: http://wikipedia.org/wiki/CDATA#Nesting
$data = str_replace(']]>', ']]]]><![CDATA[>', $child_node->data);
$fragment = $node->ownerDocument->createDocumentFragment();
......
......@@ -55,7 +55,7 @@ abstract class ConfigBase implements RefinableCacheableDependencyInterface {
* incompatible with this limitation are created, we enforce a maximum name
* length of 250 characters (leaving 5 characters for the file extension).
*
* @see http://en.wikipedia.org/wiki/Comparison_of_file_systems
* @see http://wikipedia.org/wiki/Comparison_of_file_systems
*
* Configuration objects not stored on the filesystem should still be
* restricted in name length so name can be used as a cache key.
......
......@@ -136,7 +136,9 @@ public function log(StatementInterface $statement, $args, $time) {
* climbing logic very simple, and handles the variable stack depth caused by
* the query builders.
*
* @link http://www.php.net/debug_backtrace
* See the @link http://php.net/debug_backtrace debug_backtrace() @endlink
* function.
*
* @return
* This method returns a stack trace entry similar to that generated by
* debug_backtrace(). However, it flattens the trace entry and the trace
......
......@@ -126,7 +126,7 @@ public function settingsForm(array $form, FormStateInterface $form_state) {
$elements['custom_date_format'] = array(
'#type' => 'textfield',
'#title' => $this->t('Custom date format'),
'#description' => $this->t('See <a href=":url" target="_blank">the documentation for PHP date formats</a>.', [':url' => 'http://php.net/manual/function.date.php']),
'#description' => $this->t('See <a href="http://php.net/manual/function.date.php" target="_blank">the documentation for PHP date formats</a>.'),
'#default_value' => $this->getSetting('custom_date_format') ?: '',
);
......
......@@ -152,7 +152,7 @@ public static function generateSampleValue(FieldDefinitionInterface $field_defin
$scale = rand($decimal_digits, $scale);
// @see "Example #1 Calculate a random floating-point number" in
// http://php.net/manual/en/function.mt-getrandmax.php
// http://php.net/manual/function.mt-getrandmax.php
$random_decimal = $min + mt_rand() / mt_getrandmax() * ($max - $min);
$values['value'] = self::truncateDecimal($random_decimal, $scale);
return $values;
......
......@@ -72,7 +72,7 @@ public static function generateSampleValue(FieldDefinitionInterface $field_defin
$max = is_numeric($settings['max']) ?: pow(10, ($precision - $scale)) - 1;
$min = is_numeric($settings['min']) ?: -pow(10, ($precision - $scale)) + 1;
// @see "Example #1 Calculate a random floating-point number" in
// http://php.net/manual/en/function.mt-getrandmax.php
// http://php.net/manual/function.mt-getrandmax.php
$random_decimal = $min + mt_rand() / mt_getrandmax() * ($max - $min);
$values['value'] = self::truncateDecimal($random_decimal, $scale);
return $values;
......
......@@ -53,7 +53,7 @@ public function format(array $message) {
* @return bool
* TRUE if the mail was successfully accepted, otherwise FALSE.
*
* @see http://php.net/manual/en/function.mail.php
* @see http://php.net/manual/function.mail.php
* @see \Drupal\Core\Mail\MailManagerInterface::mail()
*/
public function mail(array $message) {
......
......@@ -165,7 +165,7 @@ public static function preRenderConditionalComments($element) {
// conditional comment markup. The conditional comment expression is
// evaluated by Internet Explorer only. To control the rendering by other
// browsers, use either the "downlevel-hidden" or "downlevel-revealed"
// technique. See http://en.wikipedia.org/wiki/Conditional_comment
// technique. See http://wikipedia.org/wiki/Conditional_comment
// for details.
// Ensure what we are dealing with is safe.
......
......@@ -104,7 +104,7 @@ public function stream_lock($operation) {
* @return bool
* FALSE as data will not be written.
*
* @see http://php.net/manual/en/streamwrapper.stream-write.php
* @see http://php.net/manual/streamwrapper.stream-write.php
*/
public function stream_write($data) {
trigger_error('stream_write() not supported for read-only stream wrappers', E_USER_WARNING);
......@@ -158,7 +158,7 @@ public function stream_truncate($new_size) {
* TRUE so that file_delete() will remove db reference to file. File is not
* actually deleted.
*
* @see http://php.net/manual/en/streamwrapper.unlink.php
* @see http://php.net/manual/streamwrapper.unlink.php
*/
public function unlink($uri) {
trigger_error('unlink() not supported for read-only stream wrappers', E_USER_WARNING);
......@@ -178,7 +178,7 @@ public function unlink($uri) {
* @return bool
* FALSE as file will never be renamed.
*
* @see http://php.net/manual/en/streamwrapper.rename.php
* @see http://php.net/manual/streamwrapper.rename.php
*/
public function rename($from_uri, $to_uri) {
trigger_error('rename() not supported for read-only stream wrappers', E_USER_WARNING);
......@@ -200,7 +200,7 @@ public function rename($from_uri, $to_uri) {
* @return bool
* FALSE as directory will never be created.
*
* @see http://php.net/manual/en/streamwrapper.mkdir.php
* @see http://php.net/manual/streamwrapper.mkdir.php
*/
public function mkdir($uri, $mode, $options) {
trigger_error('mkdir() not supported for read-only stream wrappers', E_USER_WARNING);
......@@ -220,7 +220,7 @@ public function mkdir($uri, $mode, $options) {
* @return bool
* FALSE as directory will never be deleted.
*
* @see http://php.net/manual/en/streamwrapper.rmdir.php
* @see http://php.net/manual/streamwrapper.rmdir.php
*/
public function rmdir($uri, $options) {
trigger_error('rmdir() not supported for read-only stream wrappers', E_USER_WARNING);
......
......@@ -10,7 +10,7 @@
/**
* Defines a generic PHP stream wrapper interface.
*
* @see http://www.php.net/manual/class.streamwrapper.php
* @see http://php.net/manual/class.streamwrapper.php
*/
interface PhpStreamWrapperInterface {
......@@ -116,7 +116,7 @@ public function stream_lock($operation);
* Returns TRUE on success or FALSE on failure. If $option is not
* implemented, FALSE should be returned.
*
* @see http://www.php.net/manual/streamwrapper.stream-metadata.php
* @see http://php.net/manual/streamwrapper.stream-metadata.php
*/
public function stream_metadata($path, $option, $value);
......
......@@ -138,7 +138,7 @@ public function stream_lock($operation) {
* @return bool
* FALSE as data will not be written.
*
* @see http://php.net/manual/en/streamwrapper.stream-write.php
* @see http://php.net/manual/streamwrapper.stream-write.php
*/
public function stream_write($data) {
trigger_error('stream_write() not supported for read-only stream wrappers', E_USER_WARNING);
......@@ -192,7 +192,7 @@ public function stream_truncate($new_size) {
* TRUE so that file_delete() will remove db reference to file. File is not
* actually deleted.
*
* @see http://php.net/manual/en/streamwrapper.unlink.php
* @see http://php.net/manual/streamwrapper.unlink.php
*/
public function unlink($uri) {
trigger_error('unlink() not supported for read-only stream wrappers', E_USER_WARNING);
......@@ -212,7 +212,7 @@ public function unlink($uri) {
* @return bool
* FALSE as file will never be renamed.
*
* @see http://php.net/manual/en/streamwrapper.rename.php
* @see http://php.net/manual/streamwrapper.rename.php
*/
public function rename($from_uri, $to_uri) {
trigger_error('rename() not supported for read-only stream wrappers', E_USER_WARNING);
......@@ -234,7 +234,7 @@ public function rename($from_uri, $to_uri) {
* @return bool
* FALSE as directory will never be created.
*
* @see http://php.net/manual/en/streamwrapper.mkdir.php
* @see http://php.net/manual/streamwrapper.mkdir.php
*/
public function mkdir($uri, $mode, $options) {
trigger_error('mkdir() not supported for read-only stream wrappers', E_USER_WARNING);
......@@ -254,7 +254,7 @@ public function mkdir($uri, $mode, $options) {
* @return bool
* FALSE as directory will never be deleted.
*
* @see http://php.net/manual/en/streamwrapper.rmdir.php
* @see http://php.net/manual/streamwrapper.rmdir.php
*/
public function rmdir($uri, $options) {
trigger_error('rmdir() not supported for read-only stream wrappers', E_USER_WARNING);
......
......@@ -432,7 +432,7 @@ public function escapeFilter(\Twig_Environment $env, $arg, $strategy = 'html', $
$return = (string) $arg;
}
// You can't throw exceptions in the magic PHP __toString methods, see
// http://php.net/manual/en/language.oop5.magic.php#object.tostring so
// http://php.net/manual/language.oop5.magic.php#object.tostring so
// we also support a toString method.
elseif (method_exists($arg, 'toString')) {
$return = $arg->toString();
......@@ -510,7 +510,7 @@ public function renderVar($arg) {
return (string) $arg;
}
// You can't throw exceptions in the magic PHP __toString methods, see
// http://php.net/manual/en/language.oop5.magic.php#object.tostring so
// http://php.net/manual/language.oop5.magic.php#object.tostring so
// we also support a toString method.
elseif (method_exists($arg, 'toString')) {
return $arg->toString();
......
......@@ -14,7 +14,7 @@
* The binary data type.
*
* The plain value of binary data is a PHP file resource, see
* http://php.net/manual/en/language.types.resource.php. For setting the value
* http://php.net/manual/language.types.resource.php. For setting the value
* a PHP file resource or a (absolute) stream resource URI may be passed.
*
* @DataType(
......
......@@ -17,7 +17,7 @@ function aggregator_requirements($phase) {
);
if (!$has_curl) {
$requirements['curl']['severity'] = REQUIREMENT_ERROR;
$requirements['curl']['description'] = t('The Aggregator module could not be installed because the PHP <a href=":curl_url">cURL</a> library is not available.', array(':curl_url' => 'http://php.net/manual/curl.setup.php'));
$requirements['curl']['description'] = t('The Aggregator module could not be installed because the PHP <a href="http://php.net/manual/curl.setup.php">cURL</a> library is not available.');
}
return $requirements;
}
......
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