FusionPBX
9e4e8558e5
Remove debug
2023-05-08 22:30:39 -06:00
frytimo
fef8165be2
Frytimo pr patches for php8.1 ( #6630 )
...
* Passing null to parameter #2 ($string) of type string is deprecated
* Passing null to parameter #1 ($string) of type string is deprecated
* php 8.1 fixes
* php 8.1 fixes - replace strlen($var) > 0 with !empty($var)
* php 8.1 fixes - replace ${var} with {$var}
* php 8.1 fixes - replace ${var} with {$var}
* php 8.1 fixes - replace ${var} with {$var}
* php 8.1 fixes - replace ${var} with {$var}
* php 8.1 fixes - strlower with null
* php 8.1 fixes - strreplace with null
* php 8.1 fixes - passing null to base64_decode
* php 8.1 fixes - check for false and check for null on $this->dir
* php 8.1 fixes - remove assignment of $db variable to modules object
* php 8.1 fixes - avoid sending null to substr
* php 8.1 fixes - change ${var} to {$var}
* php 8.1 fixes - check for null before preg_replace
* php 8.1 fixes - remove setting db variable on domains object
* php 8.1 fixes - set empty string if $row['domain_setting_subcategory'] is null
* php 8.1 fixes - set empty string if $_REQUEST['show'] is not available
* php 8.1 fixes
* php 8.1 fixes - correct $_POST checking syntax
* php 8.1 fixes - correct $_POST variables
* php 8.1 fixes
* Use brackets consistently
* Update user_setting_edit.php
* Change to not empty
* Update device.php
* Update text.php
---------
Co-authored-by: Tim Fry <tim@voipstratus.com>
Co-authored-by: FusionPBX <markjcrane@gmail.com>
2023-05-05 10:46:37 -06:00
frytimo
69bd42af05
remove unneeded destruct methods as GC has higher performance ( #6631 )
...
Co-authored-by: Tim Fry <tim@voipstratus.com>
2023-04-27 20:18:53 -06:00
frytimo
8e86fe6243
Remove '&' on new ( #6559 )
...
Remove '&' on static function new.
2023-02-21 09:39:15 -07:00
FusionPBX
52308e2f15
Set new_json from the array
...
Fixes the new_json value that is added to the database transactions table.
2022-12-29 23:55:11 -07:00
FusionPBX
f714ef6798
Fix problems with the app_uuid and domain_uuid
...
app_uuid was null, and domain_uuid getting the wrong uuid.
2022-12-22 13:04:24 -07:00
FusionPBX
a83982ea1b
Set where and order_by to public
2022-12-14 09:58:27 -07:00
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