You've already forked postfixadmin
mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2025-08-09 05:02:44 +03:00
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
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user