summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2008-09-19 07:53:59 +0000
committerDries Buytaert <dries@buytaert.net>2008-09-19 07:53:59 +0000
commit8fc581d4d70ad4554a574d6338c96b744195a25a (patch)
tree76d31cd86d5e52f4f7d7c8ea5e81c4bb03a728cb
parent88c75b8772ce0d5bdf4bf430bcfc6010dd440ac2 (diff)
downloadbrdo-8fc581d4d70ad4554a574d6338c96b744195a25a.tar.gz
brdo-8fc581d4d70ad4554a574d6338c96b744195a25a.tar.bz2
- Patch #309488 by kbahey: correct capitalization of TRUE and FALSE.
-rw-r--r--includes/bootstrap.inc2
-rw-r--r--includes/session.inc2
-rw-r--r--includes/theme.maintenance.inc2
-rw-r--r--modules/color/color.module28
-rw-r--r--modules/filter/filter.module2
-rw-r--r--modules/openid/openid.inc8
-rw-r--r--modules/php/php.module2
-rw-r--r--modules/system/system.install2
8 files changed, 24 insertions, 24 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index 878af3c82..fd27b84a8 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 46b5cadd1..dad583335 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 0bc115942..1ece4e58f 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 be280bb62..a080efd86 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 3fdbba6ce..c35fc9567 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 452a9aded..a6d369067 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 222e1cf40..cf7dea43d 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 84c7f4d8a..0402a7bc6 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -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'),