From a9f252baeacd1472181a005666dac46f7066f8af Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Sun, 29 Apr 2012 13:34:59 +0000 Subject: [PATCH] functions.inc.php: - delete unused function db_boolean_to_int() git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1377 a1433add-5e2c-0410-b055-b7f2511e0802 --- functions.inc.php | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/functions.inc.php b/functions.inc.php index 4d0282d4..511083a6 100644 --- a/functions.inc.php +++ b/functions.inc.php @@ -1497,31 +1497,6 @@ function db_get_boolean($bool) { } } -/** - * Converts a boolean value from the database internal format to integer (0 or 1) - * Currently only PostgreSQL and MySQL are supported. - * @param string $bool (REQUIRED) - * @return int - */ -function db_boolean_to_int($bool) { - global $CONF; - - if($CONF['database_type']=='pgsql') { - // return either true or false (unquoted strings) - if($bool == 't') { - return 1; - } - return 0; - } elseif($CONF['database_type'] == 'mysql' || $CONF['database_type'] == 'mysqli') { - if($bool) { - return 1; - } - return 0; - } else { - die('Unknown value in $CONF[database_type]'); - } -} - // // db_query // Action: Sends a query to the database and returns query result and number of rows