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
pull/19/head
Christian Boltz 9 years ago
parent a46720c8c8
commit 9335232024

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

Loading…
Cancel
Save