0
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2024-09-19 19:22:14 +02:00

functions.inc.php:

- fix db_quota_text() for postgresql (concat() vs. ||)
  https://sourceforge.net/p/postfixadmin/bugs/370/


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1834 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
Christian Boltz 2016-04-25 11:23:35 +00:00
parent a46720c8c8
commit 9335232024

View File

@ -1345,8 +1345,8 @@ function db_get_boolean($bool) {
* @return string
*/
function db_quota_text($count, $quota, $fieldname) {
if (db_sqlite()) {
// SQLite uses || to concatenate strings
if (db_pgsql() || db_sqlite()) {
// SQLite and PostgreSQL use || to concatenate strings
return " CASE $quota
WHEN '-1' THEN (coalesce($count,0) || ' / -')
WHEN '0' THEN (coalesce($count,0) || ' / " . escape_string(html_entity_decode('∞')) . "')