You've already forked postfixadmin
mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2025-08-07 17:42:53 +03:00
reformat
This commit is contained in:
@@ -1439,7 +1439,7 @@ function db_connect() {
|
|||||||
list($link, $_) = db_connect_with_errors();
|
list($link, $_) = db_connect_with_errors();
|
||||||
unset($_);
|
unset($_);
|
||||||
|
|
||||||
if(!$link instanceof PDO) {
|
if (!$link instanceof PDO) {
|
||||||
throw new Exception("Database connection failed");
|
throw new Exception("Database connection failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1650,7 +1650,7 @@ function db_query_one($sql, array $values = array()) {
|
|||||||
/**
|
/**
|
||||||
* @param string $sql e.g. UPDATE foo SET bar = :baz
|
* @param string $sql e.g. UPDATE foo SET bar = :baz
|
||||||
* @param array $values - parameters for the prepared statement e.g. ['baz' => 1234]
|
* @param array $values - parameters for the prepared statement e.g. ['baz' => 1234]
|
||||||
* @param bool $throw_errors
|
* @param bool $throw_errors
|
||||||
* @return int number of rows affected by the query
|
* @return int number of rows affected by the query
|
||||||
*/
|
*/
|
||||||
function db_execute($sql, array $values = array(), $throw_errors = false) {
|
function db_execute($sql, array $values = array(), $throw_errors = false) {
|
||||||
|
@@ -28,7 +28,7 @@ touch($db_file);
|
|||||||
|
|
||||||
list($db, $error_text) = db_connect_with_errors();
|
list($db, $error_text) = db_connect_with_errors();
|
||||||
|
|
||||||
if($db === false) {
|
if ($db === false) {
|
||||||
echo "failed to connect to database\n";
|
echo "failed to connect to database\n";
|
||||||
echo $error_text;
|
echo $error_text;
|
||||||
exit(1);
|
exit(1);
|
||||||
|
Reference in New Issue
Block a user