Commit Graph

95 Commits

Author SHA1 Message Date
FusionPBX
d3ee256286 Remove these as they break PHP 7.0
Doesn't just break PHP 5.6 it also breaks PHP 7.0
2022-11-01 15:52:56 -06:00
FusionPBX
87ccce1867 Fix the sub data insert. 2022-10-18 13:04:16 -06:00
FusionPBX
878e5a10eb Update database method connect to use config.conf 2022-10-10 19:43:07 -06:00
markjcrane
d50bcb476a Replace root.php 2022-10-10 16:35:14 -06:00
FusionPBX
aeec91fae8 Fix insert on for child data
Add a few try catch,
Add ; to the end of a few SQL queries
2022-09-30 12:46:44 -06:00
FusionPBX
a355dda5b7 Fix a copy error.
Fixed the copy issue when the data includes insert_user, insert_update, update_user and update_date.
2022-09-20 13:56:54 -06:00
FusionPBX
e29877e958 Move unset parameters outside of the debug
Unset of the parameters is required or can have parameters that interfere with other queries.
2022-09-19 09:30:20 -06:00
FusionPBX
4400618830 Sub array data use the child table name.
In Destination edit it was using the dialplan table name instead of child dialplan details table.
2022-09-18 04:47:17 -06:00
FusionPBX
50b66f8bea If the domain_uuid is null the data is global.
This error broken dialplan edit when saving a global dialplan.
2022-09-18 03:08:18 -06:00
FusionPBX
d5bd5957a4 Minor edit add a few spaces. 2022-09-18 02:59:58 -06:00
FusionPBX
7c2017bd03 On insert and update add the user and date 2022-09-18 02:57:43 -06:00
FusionPBX
2ff62f638b Add a few minor changes for code consistency. 2022-09-18 02:13:33 -06:00
frytimo
ba3b60b07b Move database methods to static and document database class (#6474)
* Add new static method to created newly connected database object

* Document database class and clean up and document some of the methods.
This removes the methods that should not be in each instance and places
them in the single instance class as to occupy less resources and be
able to create database objects more efficiently.

* More docs & removed the ability to set any value within the object.

Co-authored-by: Tim Fry <tim@voipstratus.com>
2022-09-17 15:44:21 -06:00
frytimo
6bb6ae6b2b Fix PHP warning for PDO::setAttribute() requires 2 parameters (#6464)
Co-authored-by: Tim Fry <tim@voipstratus.com>
2022-08-24 14:09:33 -06:00
FusionPBX
ea9b9ce621 Update additional occurances of PDO::PGSQL_ATTR_DISABLE_PREPARES 2022-08-18 17:53:33 -06:00
FusionPBX
2783cbd251 Update database.php 2022-08-18 17:39:51 -06:00
FusionPBX
98b19d1f22 Only add PDO::PGSQL_ATTR_DISABLE_PREPARES for versions of PHP that support it. 2022-08-18 17:37:43 -06:00
FusionPBX
8431d419ca Reduce round trips to the database server.
Add PDO attribute:  PDO::PGSQL_ATTR_DISABLE_PREPARES
https://prototype.php.net/manual/en/ref.pdo-pgsql.php
2022-08-08 16:58:52 -06:00
FusionPBX
63ac177ebe Fixes an error 'Strict Standards: Only variables should be passed by reference'
Would see this on some systems when saving call forward
2022-01-24 15:33:34 -07:00
FusionPBX
8f6d12fa7d Add table_exists method to the database class. 2021-08-10 07:54:08 -06:00
FusionPBX
2eb83e45b8 Add new transaction save option to the database save method. 2020-12-10 19:52:03 -07:00
FusionPBX
c8e51bd89e Update database.php
Only use the $_SESSION['domain_uuid'] if it is set. It's not set when using from the command line.
2020-10-21 15:17:38 -06:00
FusionPBX
ec65ab905d Fix the database copy method. 2020-07-24 10:15:30 -06:00
Mark J Crane
1b38c9541d Make the relations method public 2020-07-17 21:43:34 -06:00
FusionPBX
4514947223 Disable this until it has been improved and tested more. 2020-07-10 12:55:58 -06:00
FusionPBX
7a720b84a9 Disable the delete for now. 2020-07-10 12:36:11 -06:00
FusionPBX
5b5696456f Update the database class toggle, copy an delete methods. 2020-07-09 02:57:28 -06:00
FusionPBX
d29ea55bcf Update database.php 2020-04-24 17:36:14 -06:00
FusionPBX
368d7a6987 Update database.php 2020-04-24 17:14:41 -06:00
FusionPBX
dc1b1f5717 Update database.php 2020-03-03 19:44:57 -07:00
FusionPBX
f41e989c7f Update database.php 2020-02-08 15:53:32 -07:00
FusionPBX
843e3d3c01 Update database.php 2019-12-16 12:39:54 -07:00
FusionPBX
d7af2c794d Update database.php 2019-11-23 15:30:29 -07:00
FusionPBX
71d0872945 Update database.php 2019-11-22 23:34:03 -07:00
FusionPBX
08079a9fb8 Update database.php 2019-11-20 10:14:01 -07:00
FusionPBX
b9bba7edce Update database.php 2019-08-20 13:05:27 -06:00
FusionPBX
a4f1854452 Update database.php 2019-08-20 12:40:51 -06:00
FusionPBX
d5ebe489bb Update database.php 2019-08-03 16:16:30 -06:00
Nate
b07150a01d Make singular() method public in database class. 2019-07-27 21:03:16 -06:00
Nate
e6c1d232df Adjust singular() method in database class to support 'addresses'. 2019-07-27 09:02:47 -06:00
Nate
77b85a3f9c Database class integration. Modify database class singular() method to support table names ending in 'ses', such as v_databases. 2019-07-09 20:06:17 -06:00
Nate
32b04431f7 Fix typo in select() method switch statement. 2019-07-01 13:26:26 -06:00
Nate
a591c87776 Database Class Support for "...ies" Table Names (#4321)
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.
2019-06-30 15:11:15 -06:00
jpattWPC
4ae27f13b6 Add support for PostgreSQL TLS (#4262)
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";
2019-06-05 21:10:58 -06:00
FusionPBX
c34ff1d4c6 Update database.php 2019-05-27 19:56:32 -06:00
FusionPBX
9796cabe28 Update database.php 2019-05-05 19:30:05 -06:00
FusionPBX
57a62cf6b6 Update database.php 2019-04-23 09:28:49 -06:00
FusionPBX
76f52e2686 Update database.php 2019-04-09 10:49:51 -06:00
FusionPBX
50c6bd254f Update database.php 2019-03-25 09:32:00 -06:00
FusionPBX
b4cf441521 Update database.php 2019-03-23 17:27:58 -06:00