diff --git a/common.php b/common.php index 179138b0..4cc97b2a 100644 --- a/common.php +++ b/common.php @@ -69,7 +69,7 @@ Config::write($CONF); require_once("$incpath/languages/language.php"); require_once("$incpath/functions.inc.php"); -if(extension_loaded('Phar')) { +if (extension_loaded('Phar')) { require_once("$incpath/lib/random_compat.phar"); } diff --git a/functions.inc.php b/functions.inc.php index d9f363fb..a2c0930e 100644 --- a/functions.inc.php +++ b/functions.inc.php @@ -838,7 +838,8 @@ function encode_header($string, $default_charset = "utf-8") { function random_int($min, $max) { return mt_rand($min, $max); } -/**/ } + /**/ +} /** * Generate a random password of $length characters. @@ -1993,7 +1994,6 @@ function db_where_clause($condition, $struct, $additional_raw_where = '', $searc } elseif ($operator == "NOTNULL") { $querypart = $field . ' IS NOT NULL'; } else { - $querypart = $field . $operator . "'" . escape_string($value) . "'"; // might need other types adding here. diff --git a/model/MailboxHandler.php b/model/MailboxHandler.php index 03fd85ff..a0d35d6c 100644 --- a/model/MailboxHandler.php +++ b/model/MailboxHandler.php @@ -216,7 +216,6 @@ class MailboxHandler extends PFAHandler { protected function beforestore() { - if (isset($this->values['quota']) && is_numeric($this->values['quota']) && $this->values['quota'] != -1) { $multiplier = Config::read('quota_multiplier'); if ($multiplier == 0 || !is_numeric($multiplier)) { // or empty string, or null, or false... diff --git a/public/upgrade.php b/public/upgrade.php index fc9c4db2..94b8217e 100644 --- a/public/upgrade.php +++ b/public/upgrade.php @@ -1725,7 +1725,7 @@ function upgrade_1837_sqlite() { /* https://github.com/postfixadmin/postfixadmin/issues/89 */ # upgrade_1838_mysql() renamed to upgrade_1839() to keep all databases in sync function upgrade_1839() { - if(!db_sqlite()) { + if (!db_sqlite()) { return _db_add_field('log', 'id', '{AUTOINCREMENT} {PRIMARY}', 'data'); }