From 30505ba6c95c7e366135ef2cc38bf0c60c3056c7 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Wed, 20 Jul 2016 19:45:28 +0930 Subject: Backport Remove input_errors2Ajax calls Original commit to master was https://github.com/pfsense/pfsense/commit/86d431a89d920f64dda5e7e1821f720daf6e067b --- src/usr/local/www/system_advanced_sysctl.php | 12 ------------ src/usr/local/www/system_authservers.php | 6 ------ src/usr/local/www/system_camanager.php | 6 ------ src/usr/local/www/system_certmanager.php | 12 ------------ src/usr/local/www/system_crlmanager.php | 6 ------ src/usr/local/www/system_groupmanager_addprivs.php | 6 ------ src/usr/local/www/system_usermanager.php | 6 ------ src/usr/local/www/system_usermanager_addprivs.php | 6 ------ src/usr/local/www/vpn_l2tp.php | 12 ------------ src/usr/local/www/vpn_l2tp_users_edit.php | 6 ------ 10 files changed, 78 deletions(-) (limited to 'src/usr/local') diff --git a/src/usr/local/www/system_advanced_sysctl.php b/src/usr/local/www/system_advanced_sysctl.php index 9c9f53f..b8927c6 100644 --- a/src/usr/local/www/system_advanced_sysctl.php +++ b/src/usr/local/www/system_advanced_sysctl.php @@ -102,12 +102,6 @@ if ($act == "edit") { if ($act == "del") { if ($a_tunable[$id]) { - /* if this is an AJAX caller then handle via JSON */ - if (isAjax() && is_array($input_errors)) { - input_errors2Ajax($input_errors); - exit; - } - if (!$input_errors) { unset($a_tunable[$id]); write_config(); @@ -122,12 +116,6 @@ if ($_POST) { unset($input_errors); $pconfig = $_POST; - /* if this is an AJAX caller then handle via JSON */ - if (isAjax() && is_array($input_errors)) { - input_errors2Ajax($input_errors); - exit; - } - if ($_POST['apply']) { $retval = 0; system_setup_sysctl(); diff --git a/src/usr/local/www/system_authservers.php b/src/usr/local/www/system_authservers.php index abca849..6a30785 100644 --- a/src/usr/local/www/system_authservers.php +++ b/src/usr/local/www/system_authservers.php @@ -321,12 +321,6 @@ if ($_POST) { } } - /* if this is an AJAX caller then handle via JSON */ - if (isAjax() && is_array($input_errors)) { - input_errors2Ajax($input_errors); - exit; - } - if (!$input_errors) { $server = array(); $server['refid'] = uniqid(); diff --git a/src/usr/local/www/system_camanager.php b/src/usr/local/www/system_camanager.php index ed6f6f8..4c86ac6 100644 --- a/src/usr/local/www/system_camanager.php +++ b/src/usr/local/www/system_camanager.php @@ -266,12 +266,6 @@ if ($_POST) { } } - /* if this is an AJAX caller then handle via JSON */ - if (isAjax() && is_array($input_errors)) { - input_errors2Ajax($input_errors); - exit; - } - /* save modifications */ if (!$input_errors) { $ca = array(); diff --git a/src/usr/local/www/system_certmanager.php b/src/usr/local/www/system_certmanager.php index 311bf37..56de88a 100644 --- a/src/usr/local/www/system_certmanager.php +++ b/src/usr/local/www/system_certmanager.php @@ -392,12 +392,6 @@ if ($_POST) { } } - /* if this is an AJAX caller then handle via JSON */ - if (isAjax() && is_array($input_errors)) { - input_errors2Ajax($input_errors); - exit; - } - /* save modifications */ if (!$input_errors) { @@ -530,12 +524,6 @@ if ($_POST) { $subject_mismatch = true; } - /* if this is an AJAX caller then handle via JSON */ - if (isAjax() && is_array($input_errors)) { - input_errors2Ajax($input_errors); - exit; - } - /* save modifications */ if (!$input_errors) { diff --git a/src/usr/local/www/system_crlmanager.php b/src/usr/local/www/system_crlmanager.php index cf0d313..8510d15 100644 --- a/src/usr/local/www/system_crlmanager.php +++ b/src/usr/local/www/system_crlmanager.php @@ -243,12 +243,6 @@ if ($_POST) { array_push($input_errors, "The field 'Descriptive Name' contains invalid characters."); } - /* if this is an AJAX caller then handle via JSON */ - if (isAjax() && is_array($input_errors)) { - input_errors2Ajax($input_errors); - exit; - } - /* save modifications */ if (!$input_errors) { $result = false; diff --git a/src/usr/local/www/system_groupmanager_addprivs.php b/src/usr/local/www/system_groupmanager_addprivs.php index 4f7a2dc..d7da0e6 100644 --- a/src/usr/local/www/system_groupmanager_addprivs.php +++ b/src/usr/local/www/system_groupmanager_addprivs.php @@ -99,12 +99,6 @@ if ($_POST) { do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); - /* if this is an AJAX caller then handle via JSON */ - if (isAjax() && is_array($input_errors)) { - input_errors2Ajax($input_errors); - exit; - } - if (!$input_errors) { if (!is_array($pconfig['sysprivs'])) { diff --git a/src/usr/local/www/system_usermanager.php b/src/usr/local/www/system_usermanager.php index f33a1f9..2033a87 100644 --- a/src/usr/local/www/system_usermanager.php +++ b/src/usr/local/www/system_usermanager.php @@ -306,12 +306,6 @@ if ($_POST['save']) { } } - /* if this is an AJAX caller then handle via JSON */ - if (isAjax() && is_array($input_errors)) { - input_errors2Ajax($input_errors); - exit; - } - if (!$input_errors) { conf_mount_rw(); diff --git a/src/usr/local/www/system_usermanager_addprivs.php b/src/usr/local/www/system_usermanager_addprivs.php index 306a389..3dfc341 100644 --- a/src/usr/local/www/system_usermanager_addprivs.php +++ b/src/usr/local/www/system_usermanager_addprivs.php @@ -103,12 +103,6 @@ if ($_POST) { do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); - /* if this is an AJAX caller then handle via JSON */ - if (isAjax() && is_array($input_errors)) { - input_errors2Ajax($input_errors); - exit; - } - if (!$input_errors) { if (!is_array($pconfig['sysprivs'])) { diff --git a/src/usr/local/www/vpn_l2tp.php b/src/usr/local/www/vpn_l2tp.php index 4d37242..80ad5ad 100644 --- a/src/usr/local/www/vpn_l2tp.php +++ b/src/usr/local/www/vpn_l2tp.php @@ -125,12 +125,6 @@ if ($_POST) { $input_errors[] = gettext("Number of L2TP users must be between 1 and 255"); } - /* if this is an AJAX caller then handle via JSON */ - if (isAjax() && is_array($input_errors)) { - input_errors2Ajax($input_errors); - exit; - } - if (!$input_errors) { $_POST['remoteip'] = $pconfig['remoteip'] = gen_subnet($_POST['remoteip'], $_POST['l2tp_subnet']); if (is_inrange_v4($_POST['localip'], $_POST['remoteip'], ip_after($_POST['remoteip'], $_POST['n_l2tp_units'] - 1))) { @@ -142,12 +136,6 @@ if ($_POST) { } } - /* if this is an AJAX caller then handle via JSON */ - if (isAjax() && is_array($input_errors)) { - input_errors2Ajax($input_errors); - exit; - } - if (!$input_errors) { $l2tpcfg['remoteip'] = $_POST['remoteip']; $l2tpcfg['localip'] = $_POST['localip']; diff --git a/src/usr/local/www/vpn_l2tp_users_edit.php b/src/usr/local/www/vpn_l2tp_users_edit.php index 5f2d43b..eed7671 100644 --- a/src/usr/local/www/vpn_l2tp_users_edit.php +++ b/src/usr/local/www/vpn_l2tp_users_edit.php @@ -136,12 +136,6 @@ if ($_POST) { } } - /* if this is an AJAX caller then handle via JSON */ - if (isAjax() && is_array($input_errors)) { - input_errors2Ajax($input_errors); - exit; - } - if (!$input_errors) { if (isset($id) && $a_secret[$id]) { -- cgit v1.1