Commit Graph

77 Commits

Author SHA1 Message Date
FusionPBX
4dbd4e10a3 Add missing default settings 2023-10-11 17:27:11 -06:00
FusionPBX
c6d966395e Use settings class for app_defaults.php 2023-09-16 00:22:12 -06:00
FusionPBX
2c5724c6ed Add new class methods and use them 2023-09-11 01:45:19 -06:00
FusionPBX
4eb7fdf007 Update default and domain setting session array
In the "domains" class upgrade method, only set the value when either "default_setting_enabled" is true or "domain_setting_enabled" is equal to true.
2023-08-28 14:45:39 -06:00
markjcrane
32051873be Use __dir__ to find resources/require.php 2023-06-16 22:49:09 -06:00
FusionPBX
473033257a Exclude switch default settings.
This category is causing errors and is not needed for this code.
2023-06-07 11:43:15 -06:00
markjcrane
b75b0f63e6 Initialize the array before using them 2023-06-06 23:37:09 -06:00
fusionate
8e9f28a5e0 Domains [Class]: Updates for PHP 8.1 2023-06-06 21:43:50 +00:00
fusionate
f7951324ea Domains [Class] - Updates for PHP 8.1 2023-05-16 18:42:32 +00:00
FusionPBX
ff2c52eda8 Update domains.php 2023-05-12 20:32:44 -06:00
FusionPBX
44a46d491b Use !empty in the if statement 2023-05-12 20:24:39 -06:00
FusionPBX
b86cd20e8e Use isset instead of is_uuid 2023-05-10 22:01:12 -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
37646c0893 Frytimo pr remove unused variables and fix clobbering (#6656)
* config->exists returns true or false but no action taken and variable
is unused

* remove unused variable db_type

* remove unused variable db_name

* remove unused variable db_username

* remove unused variable db_password

* remove unused variable db_secure

* remove unused variable db_cert_authority

* remove unused variable db_host

* remove unused variable db_path

* remove unused variable db_port

* remove unused variable db. The upgrade method never uses the db variable
and instead uses a new database connection each time.

* remove uninitialized parameters variable

* domain_count never used

* variable context is never used in the method or any app_defaults

* variable $row is clobbered by inner foreach loop

* variable domain_name is never used in method scope

* variable domain_array seems to be uninitialized in this scope so set an
empty string value so function lower_case is not receiving null.
2023-05-03 14:41:39 -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
FusionPBX
051cb01fdc Use the subcategory when refreshing the session
Beset to be specific when using unset to clear values in the session
2023-03-23 21:40:50 -06:00
FusionPBX
b373e3c7fe Needed to get DOCUMENT_ROOT and PROJECT_PATH 2022-10-11 15:53:18 -06:00
markjcrane
d50bcb476a Replace root.php 2022-10-10 16:35:14 -06:00
FusionPBX
a432996055 Add missing part of the array. 2022-01-09 06:41:25 -07:00
FusionPBX
2c096c9e01 Only load default settings that are not in the database. 2022-01-08 16:22:03 -07:00
FusionPBX
408b13238e Use include instead of require_once. 2021-09-13 11:52:12 -06:00
FusionPBX
dc8c2f1df6 Update domains class to use the database class. 2021-09-12 15:29:28 -06:00
fusionate
3d81016695 Domains Class: Update settings() method to support setting array order, when present. 2020-12-28 16:28:01 -07:00
Nate
5c7f97ac8a Domains: Retain session domain_name and domain_uuid on add and delete. 2020-11-02 16:00:02 -07:00
FusionPBX
f567c12672 Update domains.php 2020-08-14 00:37:16 -06:00
agree
51a6b56dae Update domains.php (#5092)
* Update domains.php
2020-03-11 20:04:41 -06:00
Nate
b9a207c51d Domains Class: Use unique variable name for array id in delete() method. 2020-02-17 17:54:36 -07:00
Nate
1b95cbf38c Domains: Supress warnings when deleting missing xml files in delete() method. Fix recordings directory session variable index. 2020-02-17 08:51:21 -07:00
FusionPBX
eb28a261bc Update domains.php 2019-12-16 11:17:25 -07:00
FusionPBX
9f70128428 Update domains.php 2019-12-16 09:37:57 -07:00
Nate
911a43219e Users: Prevent duplicate usernames. 2019-09-10 19:23:14 -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
1f1c813675 Update domains.php 2018-02-25 01:08:54 -07:00
Mafoo
32a6f76ed0 Enhance [master] provide $app_path during upgrade (#2573)
if a application is installed via a symlink PHP will resolve the symlink
for __DIR__ and __FILE__ making it impossible for an application to work
out it's relative path withing the fusion system.
By providing $app_path during upgrade routines an application will
beable to provide the correct link for menu items (e.g.
/opt/languages/index.php) instead of having to hard code it where it
could change depending on how the application was installed
2017-06-08 09:41:56 -06:00
Mafoo
bfe3ff173f Enhance - Display text on app_defaults (#2645)
enable display_type on domains (and therefore app_defaults)
capture the output of app_defaults
format if statements to project preference
use more generic label display for results reducing number of translations required
change upgrade.php to use the more consistent $display_type
2017-06-08 09:39:50 -06:00
FusionPBX
f6fdd9523f Update domains.php 2017-01-17 13:37:26 -07:00
FusionPBX
6fe57bace2 Update domains.php 2017-01-14 18:17:21 -07:00
FusionPBX
c6c5329a56 Update domains.php 2017-01-14 18:15:34 -07:00
FusionPBX
532a0c0590 Minor syntax fix spotted in dry run now activate. 2017-01-14 14:39:05 -07:00
FusionPBX
b9bf07a5e6 Add the settings method to the upgrade method. 2017-01-14 14:33:05 -07:00
FusionPBX
841d56938d Add the settings method to the domains class. 2017-01-14 13:15:03 -07:00
FusionPBX
eb7a05ea45 Update domains.php 2016-09-10 17:33:47 -06:00
Harry G. Coin
8abe003a71 The goal is to increase confidence in fusionpbx, one step is to run by default with error_reporting (E_ALL ^ E_NOTICE);
So, please find in this set numerous small changes which eliminate numerous php warning messages.

Also, a small bug fix in an sql statistics routine, naming a count(*) field as count, so displaying correct detail.

If any of the proposed changes are omitted, the relevant page will experience php warnings.

There are no doubt fusionpbx pages I've yet to visit that still generate warnings, this set is nearly certainly not comprehensive.
2016-04-25 20:19:58 -05:00
markjcrane
9dac571bdb Use intuitive names for the arrays and move one of the queries out of the loop. 2016-04-15 00:47:49 -06:00
markjcrane
4b55af24f7 Add class_exists 2016-04-14 23:23:14 -06:00
markjcrane
c2ecb23413 Add a contructor to the dialplan class. 2016-04-14 22:34:10 -06:00
markjcrane
45c391ab76 Update domains and schema classes. 2016-04-14 22:10:47 -06:00
markjcrane
4fa0649eba Only call the scripts class if its installed. 2016-03-27 00:33:19 -06:00
markjcrane
9249e1db9a On windows force to / instead of the backslash \ as path. This fixes a problem where recording c:\pathtofusionpbx\recordings fails because the \r gets understood as a carriage return in the session:record in FreeSWITCH. 2016-03-24 15:02:04 -06:00
markjcrane
16abb2849f Remove the domain name from the switch recordings SESSION variable. The path for single and multi-tenant are handled the same and all will used their domain name. 2015-12-06 12:36:08 -07:00