protected function read_from_db_postprocess($db_result) { foreach ($db_result as $key => $value) { # split comma-separated 'goto' into an array $db_result[$key]['goto'] = explode(',', $db_result[$key]['goto']); # Vacation enabled? list($db_result[$key]['on_vacation'], $db_result[$key]['goto']) = remove_from_array($db_result[$key]['goto'], $this->getVacationAlias()); # if it is a mailbox, does the alias point to the mailbox? if ($db_result[$key]['is_mailbox']) { # this intentionally does not match mailbox targets with recipient delimiter. # if it would, we would have to make goto_mailbox a text instead of a bool (which would annoy 99% of the users) list($db_result[$key]['goto_mailbox'], $db_result[$key]['goto']) = remove_from_array($db_result[$key]['goto'], $key); } else { # not a mailbox $db_result[$key]['goto_mailbox'] = 0; } # editing a default alias (postmaster@ etc.) is only allowed if special_alias_control is allowed or if the user is a superadmin $tmp = preg_split('/\\@/', $db_result[$key]['address']); if (!$this->is_superadmin && !Config::bool('special_alias_control') && array_key_exists($tmp[0], Config::Read('default_aliases'))) { $db_result[$key]['_can_edit'] = 0; $db_result[$key]['_can_delete'] = 0; } if ($this->struct['status']['display_in_list'] && Config::Bool('show_status')) { $db_result[$key]['status'] = gen_show_status($db_result[$key]['address']); } } return $db_result; }
/** * returns true if PostgreSQL is used, false otherwise */ function db_pgsql() { if (Config::Read('database_type') == 'pgsql') { return true; } else { return false; } }