Currently, the permission checks within the class try to singularize the table name, then check for permissions based on the result. This PR modifies the private singular() function to support table names that end in "...ies", where an _add or _edit permission likely uses a 'y' instead. An example would be where inserting records into v_event_categories, the class should probably look for an "event_category_add" permission, instead of "event_categorie_add". Likewise for update queries.
This proposed change isn't foolproof, obviously. In the case of inserting or updating records in a table named v_pies, it would fail to suffice. You're welcome to integrate a better solution, if one exists.
This commit adds support for PostgreSQL TLS communication. This requires /etc/fusionpbx/config.php to have two parameters added:
$db_secure = true;
$db_cert_authority = "/path/to/ca.crt";
if $database->app_uuid is not set it would use '' in some conditions
which isset would test true.
This fix uses strlen instead, but also fixes number_transations app that
highlighted the flaw
Fix for if you send an array containing both updates and new data, it would end up placing all the new data on top of the last item containing the uuid of the last update (if updates are earlier in the array than new items)