X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=admin%2Fcompany_preferences.php;h=74b7071bbe76a9b4e926bd1f045fa9809d6c1946;hb=f821f29324e963437132a3f6fa7c57fcef5c5f0e;hp=b889aeb96031bbdedc115bdc56463648ce74a897;hpb=5e63c6ace55729bbb5ee3b060035a25a4426eb0a;p=fa-stable.git diff --git a/admin/company_preferences.php b/admin/company_preferences.php index b889aeb9..74b7071b 100644 --- a/admin/company_preferences.php +++ b/admin/company_preferences.php @@ -38,6 +38,14 @@ if (isset($_POST['update']) && $_POST['update'] != "") } if (isset($_FILES['pic']) && $_FILES['pic']['name'] != '') { + if ($_FILES['pic']['error'] == UPLOAD_ERR_INI_SIZE) { + display_error(_('The file size is over the maximum allowed.')); + $input_error = 1; + } + elseif ($_FILES['pic']['error'] > 0) { + display_error(_('Error uploading logo file.')); + $input_error = 1; + } $result = $_FILES['pic']['error']; $filename = company_path()."/images"; if (!file_exists($filename)) @@ -117,20 +125,6 @@ if (isset($_POST['update']) && $_POST['update'] != "") $Ajax->activate('_page_body'); } /* end of if submit */ -//--------------------------------------------------------------------------------------------- -if (get_company_pref('bcc_email') === null) { // available from 2.3.14, can be not defined on pre-2.4 installations - set_company_pref('bcc_email', 'setup.company', 'varchar', 100, ''); - refresh_sys_prefs(); -} -if (get_company_pref('alternative_tax_include_on_docs') === null) { // available from 2.3.14, can be not defined on pre-2.4 installations - set_company_pref('alternative_tax_include_on_docs', 'setup.company', 'tinyint', 1, '0'); - refresh_sys_prefs(); -} -if (get_company_pref('suppress_tax_rates') === null) { // available from 2.3.14, can be not defined on pre-2.4 installations - set_company_pref('suppress_tax_rates', 'setup.company', 'tinyint', 1, '0'); - refresh_sys_prefs(); -} - start_form(true); $myrow = get_company_prefs();