From 0657afcf30763320664262bfd3f6fbfee0042c14 Mon Sep 17 00:00:00 2001 From: mark_story Date: Wed, 21 Oct 2009 13:03:24 -0400 Subject: [PATCH] Removing use of low() from core classes. Refs #6525 --- cake/basics.php | 2 +- cake/console/libs/api.php | 4 ++-- cake/console/libs/tasks/db_config.php | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cake/basics.php b/cake/basics.php index 5e387c553..8a9c7b527 100644 --- a/cake/basics.php +++ b/cake/basics.php @@ -467,7 +467,7 @@ if (!function_exists('file_put_contents')) { $expires = strtotime($expires, $now); } - switch (low($target)) { + switch (strtolower($target)) { case 'cache': $filename = CACHE . $path; break; diff --git a/cake/console/libs/api.php b/cake/console/libs/api.php index 87aefc10a..c370d7310 100644 --- a/cake/console/libs/api.php +++ b/cake/console/libs/api.php @@ -169,8 +169,8 @@ class ApiShell extends Shell { foreach ($commands as $cmd) { $this->out("{$cmd}\n\n"); } - } elseif (isset($commands[low($this->args[1])])) { - $this->out($commands[low($this->args[1])] . "\n\n"); + } elseif (isset($commands[strtolower($this->args[1])])) { + $this->out($commands[strtolower($this->args[1])] . "\n\n"); } else { $this->out("Command '" . $this->args[1] . "' not found"); } diff --git a/cake/console/libs/tasks/db_config.php b/cake/console/libs/tasks/db_config.php index d2f05393b..3126c00d9 100644 --- a/cake/console/libs/tasks/db_config.php +++ b/cake/console/libs/tasks/db_config.php @@ -109,7 +109,7 @@ class DbConfigTask extends Shell { $persistent = $this->in('Persistent Connection?', array('y', 'n'), 'n'); } - if (low($persistent) == 'n') { + if (strtolower($persistent) == 'n') { $persistent = 'false'; } else { $persistent = 'true'; @@ -125,7 +125,7 @@ class DbConfigTask extends Shell { $port = $this->in('Port?', null, 'n'); } - if (low($port) == 'n') { + if (strtolower($port) == 'n') { $port = null; } $login = ''; @@ -158,7 +158,7 @@ class DbConfigTask extends Shell { $prefix = $this->in('Table Prefix?', null, 'n'); } - if (low($prefix) == 'n') { + if (strtolower($prefix) == 'n') { $prefix = null; } $encoding = ''; @@ -167,7 +167,7 @@ class DbConfigTask extends Shell { $encoding = $this->in('Table encoding?', null, 'n'); } - if (low($encoding) == 'n') { + if (strtolower($encoding) == 'n') { $encoding = null; } $schema = ''; @@ -178,7 +178,7 @@ class DbConfigTask extends Shell { } } - if (low($schema) == 'n') { + if (strtolower($schema) == 'n') { $schema = null; } @@ -190,7 +190,7 @@ class DbConfigTask extends Shell { $dbConfigs[] = $config; $doneYet = $this->in('Do you wish to add another database configuration?', null, 'n'); - if (low($doneYet == 'n')) { + if (strtolower($doneYet == 'n')) { $done = true; } }