From 1926ef95fee6482369339cf3a618ee6671104b8d Mon Sep 17 00:00:00 2001 From: K-Flagman <105959875+k-flagman@users.noreply.github.com> Date: Fri, 22 Aug 2025 21:25:15 -0700 Subject: [PATCH] Add the upload_file_limit to fax_send (#7466) * [fax_send.php] add the upload_file_limit * Use the settings class get method * Change the setting name to upload_file_limit * Increase the default to 5 --- app/fax/app_config.php | 10 +++++++++- app/fax/fax_send.php | 6 ++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/app/fax/app_config.php b/app/fax/app_config.php index 75f64f9b62..b31fe4a5d8 100644 --- a/app/fax/app_config.php +++ b/app/fax/app_config.php @@ -505,6 +505,14 @@ $apps[$x]['default_settings'][$y]['default_setting_value'] = "300-399"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; $apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the suggested extension range(s) for fax servers"; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "f91cf33c-7f89-11f0-88f8-abceb7c1c991"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "fax"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "upload_file_limit"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "5"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the upload file limit for Fax File(s)"; //schema details $y=0; @@ -979,4 +987,4 @@ $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; -?> \ No newline at end of file +?> diff --git a/app/fax/fax_send.php b/app/fax/fax_send.php index 229adda14e..5edaab7f36 100644 --- a/app/fax/fax_send.php +++ b/app/fax/fax_send.php @@ -1095,9 +1095,11 @@ if (!defined('STDIN')) { echo " ".$text['label-fax_files']."\n"; echo "\n"; echo "\n"; - for ($f = 1; $f <= 3; $f++) { + + $upload_file_limit = (int)$settings->get('fax','upload_file_limit',5); + for ($f = 1; $f <= $upload_file_limit; $f++) { echo " 1) ? "style='display: none;'" : null).">"; - echo " "; + echo " "; echo button::create(['type'=>'button','label'=>$text['button-clear'],'icon'=>$settings->get('theme','button_icon_reset'),'onclick'=>"reset_file_input('fax_files_".$f."'); document.getElementById('file_list_".$f."').innerHTML='';"]); echo "
"; echo " ";