diff options
author | PiBa-NL <pba_2k3@yahoo.com> | 2016-10-30 00:12:01 +0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-12-02 14:48:01 -0200 |
commit | 2a38eaf43198def259ecdf5264451ecdf07eb25d (patch) | |
tree | 8627730c9d5281a214e9f492b6ddfbc1640f56f2 /src | |
parent | d715585771717531cc4ff8a4bb43046c54a5dcd5 (diff) | |
download | pfsense-2a38eaf43198def259ecdf5264451ecdf07eb25d.zip pfsense-2a38eaf43198def259ecdf5264451ecdf07eb25d.tar.gz |
interfaces, show error message if adding duplicate gateway
(cherry picked from commit e8517c7c16b8a845333c7d0e91f552144e6b5560)
Diffstat (limited to 'src')
-rw-r--r-- | src/usr/local/www/interfaces.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/usr/local/www/interfaces.php b/src/usr/local/www/interfaces.php index 710b42e..de8f776 100644 --- a/src/usr/local/www/interfaces.php +++ b/src/usr/local/www/interfaces.php @@ -3396,7 +3396,8 @@ events.push(function() { } function report_failure(request, textStatus, errorThrown) { - if (textStatus === "error" && request.getResponseHeader("Content-Type") === "text/plain") { + contenttype = ";"+request.getResponseHeader("Content-Type")+";"; + if (textStatus === "error" && contenttype.indexOf(";text/plain;") !== -1) { alert(request.responseText); } else { alert("The IPv4 gateway could not be created."); |