From 089e5f5c79965058a5288590a3a34d94f3bcb833 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 20 Jun 2012 12:57:08 +0200 Subject: [ticket/10942] Rename method sql_conditional() to sql_case() PHPBB3-10942 --- phpBB/includes/db/postgres.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'phpBB/includes/db/postgres.php') diff --git a/phpBB/includes/db/postgres.php b/phpBB/includes/db/postgres.php index 9da2fd0b40..1ceb0ed0a2 100644 --- a/phpBB/includes/db/postgres.php +++ b/phpBB/includes/db/postgres.php @@ -157,13 +157,13 @@ class dbal_postgres extends dbal /** * {@inheritDoc} */ - function sql_conditional($condition, $action_true, $action_false = false) + function sql_case($condition, $action_true, $action_false = false) { - $sql_condition = 'CASE WHEN ' . $condition; - $sql_condition .= ' THEN CAST(' . $action_true . ' AS TEXT)'; - $sql_condition .= ($action_false !== false) ? ' ELSE CAST(' . $action_false . ' AS TEXT)' : ''; - $sql_condition .= ' END'; - return $sql_condition; + $sql_case = 'CASE WHEN ' . $condition; + $sql_case .= ' THEN CAST(' . $action_true . ' AS TEXT)'; + $sql_case .= ($action_false !== false) ? ' ELSE CAST(' . $action_false . ' AS TEXT)' : ''; + $sql_case .= ' END'; + return $sql_case; } /** -- cgit v1.2.1