Commit 8fc581d4 authored by Dries's avatar Dries

- Patch #309488 by kbahey: correct capitalization of TRUE and FALSE.

parent 88c75b87
......@@ -1193,7 +1193,7 @@ function language_default($property = NULL) {
* IP address of client machine, adjusted for reverse proxy and/or cluster
* environments.
*/
function ip_address($reset = false) {
function ip_address($reset = FALSE) {
static $ip_address = NULL;
if (!isset($ip_address) || $reset) {
......
......@@ -189,7 +189,7 @@ function drupal_session_regenerate() {
* @return int
* The number of users with sessions.
*/
function drupal_session_count($timestamp = 0, $anonymous = true) {
function drupal_session_count($timestamp = 0, $anonymous = TRUE) {
$query = $anonymous ? ' AND uid = 0' : ' AND uid > 0';
return db_result(db_query('SELECT COUNT(sid) AS count FROM {sessions} WHERE timestamp >= %d' . $query, $timestamp));
}
......
......@@ -87,7 +87,7 @@ function theme_task_list($items, $active = NULL) {
foreach ($items as $k => $item) {
if ($active == $k) {
$class = 'active';
$done = false;
$done = FALSE;
}
else {
$class = $done ? 'done' : '';
......
......@@ -132,7 +132,7 @@ function color_get_info($theme) {
/**
* Helper function to retrieve the color palette for a particular theme.
*/
function color_get_palette($theme, $default = false) {
function color_get_palette($theme, $default = FALSE) {
// Fetch and expand default palette.
$fields = array('base', 'link', 'top', 'bottom', 'text');
$info = color_get_info($theme);
......@@ -160,7 +160,7 @@ function color_scheme_form(&$form_state, $theme) {
drupal_add_css($base . '/color.css', 'module', 'all', FALSE);
drupal_add_js($base . '/color.js');
drupal_add_js(array('color' => array(
'reference' => color_get_palette($theme, true)
'reference' => color_get_palette($theme, TRUE)
)), 'setting');
// See if we're using a predefined scheme.
......@@ -186,7 +186,7 @@ function color_scheme_form(&$form_state, $theme) {
'bottom' => t('Header bottom'),
'text' => t('Text color'),
);
$form['palette']['#tree'] = true;
$form['palette']['#tree'] = TRUE;
foreach ($palette as $name => $value) {
$form['palette'][$name] = array(
'#type' => 'textfield',
......@@ -278,7 +278,7 @@ function color_scheme_form_submit($form, &$form_state) {
}
// Don't render the default colorscheme, use the standard theme instead.
if (implode(',', color_get_palette($theme, true)) == implode(',', $palette)
if (implode(',', color_get_palette($theme, TRUE)) == implode(',', $palette)
|| $form_state['values']['op'] == t('Reset to defaults')) {
variable_del('color_' . $theme . '_palette');
variable_del('color_' . $theme . '_stylesheets');
......@@ -370,7 +370,7 @@ function _color_rewrite_stylesheet($theme, &$info, &$paths, $palette, $style) {
foreach ($conversion as $k => $v) {
$conversion[$k] = drupal_strtolower($v);
}
$default = color_get_palette($theme, true);
$default = color_get_palette($theme, TRUE);
// Split off the "Don't touch" section of the stylesheet.
$split = "Color Module: Don't touch";
......@@ -380,7 +380,7 @@ function _color_rewrite_stylesheet($theme, &$info, &$paths, $palette, $style) {
// Find all colors in the stylesheet and the chunks in between.
$style = preg_split('/(#[0-9a-f]{6}|#[0-9a-f]{3})/i', $style, -1, PREG_SPLIT_DELIM_CAPTURE);
$is_color = false;
$is_color = FALSE;
$output = '';
$base = 'base';
......@@ -455,7 +455,7 @@ function _color_render_images($theme, &$info, &$paths, $palette) {
// Prepare target buffer.
$target = imagecreatetruecolor($width, $height);
imagealphablending($target, true);
imagealphablending($target, TRUE);
// Fill regions of solid color.
foreach ($info['fill'] as $color => $fill) {
......@@ -524,9 +524,9 @@ function _color_shift($given, $ref1, $ref2, $target) {
// delta based on the length of the difference vectors.
// delta = 1 - |ref2 - ref1| / |white - ref1|
$target = _color_unpack($target, true);
$ref1 = _color_unpack($ref1, true);
$ref2 = _color_unpack($ref2, true);
$target = _color_unpack($target, TRUE);
$ref1 = _color_unpack($ref1, TRUE);
$ref2 = _color_unpack($ref2, TRUE);
$numerator = 0;
$denominator = 0;
for ($i = 0; $i < 3; ++$i) {
......@@ -549,7 +549,7 @@ function _color_shift($given, $ref1, $ref2, $target) {
}
// Take the given color, and blend it towards the target.
$given = _color_unpack($given, true);
$given = _color_unpack($given, TRUE);
for ($i = 0; $i < 3; ++$i) {
$result[$i] = $target[$i] + ($given[$i] - $target[$i]) * $delta;
}
......@@ -563,7 +563,7 @@ function _color_shift($given, $ref1, $ref2, $target) {
$result = _color_hsl2rgb($result);
// Return hex color.
return _color_pack($result, true);
return _color_pack($result, TRUE);
}
/**
......@@ -591,7 +591,7 @@ function _color_blend($img, $hex1, $hex2, $alpha) {
/**
* Convert a hex color into an RGB triplet.
*/
function _color_unpack($hex, $normalize = false) {
function _color_unpack($hex, $normalize = FALSE) {
if (strlen($hex) == 4) {
$hex = $hex[1] . $hex[1] . $hex[2] . $hex[2] . $hex[3] . $hex[3];
}
......@@ -606,7 +606,7 @@ function _color_unpack($hex, $normalize = false) {
/**
* Convert an RGB triplet to a hex color.
*/
function _color_pack($rgb, $normalize = false) {
function _color_pack($rgb, $normalize = FALSE) {
$out = 0;
foreach ($rgb as $k => $v) {
$out |= (($v * ($normalize ? 255 : 1)) << (16 - $k * 8));
......
......@@ -758,7 +758,7 @@ function _filter_htmlcorrector($text) {
// Note: PHP ensures the array consists of alternating delimiters and literals
// and begins and ends with a literal (inserting $null as required).
$tag = false; // Odd/even counter. Tag or no tag.
$tag = FALSE; // Odd/even counter. Tag or no tag.
$stack = array();
$output = '';
foreach ($split as $value) {
......
......@@ -267,14 +267,14 @@ function _openid_signature($association, $message_array, $keys_to_sign) {
function _openid_hmac($key, $text) {
if (strlen($key) > OPENID_SHA1_BLOCKSIZE) {
$key = _openid_sha1($key, true);
$key = _openid_sha1($key, TRUE);
}
$key = str_pad($key, OPENID_SHA1_BLOCKSIZE, chr(0x00));
$ipad = str_repeat(chr(0x36), OPENID_SHA1_BLOCKSIZE);
$opad = str_repeat(chr(0x5c), OPENID_SHA1_BLOCKSIZE);
$hash1 = _openid_sha1(($key ^ $ipad) . $text, true);
$hmac = _openid_sha1(($key ^ $opad) . $hash1, true);
$hash1 = _openid_sha1(($key ^ $ipad) . $text, TRUE);
$hmac = _openid_sha1(($key ^ $opad) . $hash1, TRUE);
return $hmac;
}
......@@ -421,7 +421,7 @@ function _openid_response($str = NULL) {
$str = file_get_contents('php://input');
$post = array();
if ($str !== false) {
if ($str !== FALSE) {
$post = _openid_get_params($str);
}
......
......@@ -24,7 +24,7 @@ function php_help($path, $arg) {
/**
* Implementation of hook_filter_tips().
*/
function php_filter_tips($delta, $format, $long = false) {
function php_filter_tips($delta, $format, $long = FALSE) {
global $base_url;
if ($delta == 0) {
switch ($long) {
......
......@@ -171,7 +171,7 @@ function system_requirements($phase) {
}
$description .= ' ' . $t('You can <a href="@cron">run cron manually</a>.', array('@cron' => url('admin/reports/status/run-cron')));
$description .= '<br />' . $t('To run cron from outside the site, go to <a href="!cron">!cron</a>', array('!cron' => url('cron.php', array('absolute' => true, 'query' => 'cron_key=' . variable_get('cron_key', 'drupal')))));
$description .= '<br />' . $t('To run cron from outside the site, go to <a href="!cron">!cron</a>', array('!cron' => url('cron.php', array('absolute' => TRUE, 'query' => 'cron_key=' . variable_get('cron_key', 'drupal')))));
$requirements['cron'] = array(
'title' => $t('Cron maintenance tasks'),
......
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