From 8fc581d4d70ad4554a574d6338c96b744195a25a Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 19 Sep 2008 07:53:59 +0000 Subject: [PATCH] - Patch #309488 by kbahey: correct capitalization of TRUE and FALSE. --- includes/bootstrap.inc | 2 +- includes/session.inc | 2 +- includes/theme.maintenance.inc | 2 +- modules/color/color.module | 28 ++++++++++++++-------------- modules/filter/filter.module | 2 +- modules/openid/openid.inc | 8 ++++---- modules/php/php.module | 2 +- modules/system/system.install | 2 +- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 878af3c822d..fd27b84a8e5 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -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) { diff --git a/includes/session.inc b/includes/session.inc index 46b5cadd138..dad58333515 100644 --- a/includes/session.inc +++ b/includes/session.inc @@ -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)); } diff --git a/includes/theme.maintenance.inc b/includes/theme.maintenance.inc index 0bc1159425f..1ece4e58fd7 100644 --- a/includes/theme.maintenance.inc +++ b/includes/theme.maintenance.inc @@ -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' : ''; diff --git a/modules/color/color.module b/modules/color/color.module index be280bb6254..a080efd86a3 100644 --- a/modules/color/color.module +++ b/modules/color/color.module @@ -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)); diff --git a/modules/filter/filter.module b/modules/filter/filter.module index 3fdbba6cee6..c35fc956728 100644 --- a/modules/filter/filter.module +++ b/modules/filter/filter.module @@ -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) { diff --git a/modules/openid/openid.inc b/modules/openid/openid.inc index 452a9aded4f..a6d36906756 100644 --- a/modules/openid/openid.inc +++ b/modules/openid/openid.inc @@ -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); } diff --git a/modules/php/php.module b/modules/php/php.module index 222e1cf405a..cf7dea43d3e 100644 --- a/modules/php/php.module +++ b/modules/php/php.module @@ -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) { diff --git a/modules/system/system.install b/modules/system/system.install index 84c7f4d8a3d..0402a7bc6d5 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -171,7 +171,7 @@ function system_requirements($phase) { } $description .= ' ' . $t('You can run cron manually.', array('@cron' => url('admin/reports/status/run-cron'))); - $description .= '
' . $t('To run cron from outside the site, go to !cron', array('!cron' => url('cron.php', array('absolute' => true, 'query' => 'cron_key=' . variable_get('cron_key', 'drupal'))))); + $description .= '
' . $t('To run cron from outside the site, go to !cron', array('!cron' => url('cron.php', array('absolute' => TRUE, 'query' => 'cron_key=' . variable_get('cron_key', 'drupal'))))); $requirements['cron'] = array( 'title' => $t('Cron maintenance tasks'),