mbox

BUG10993: fix errormessage when editing static routes

Message ID 1449495391-14881-1-git-send-email-alexander.marx@ipfire.org
State Accepted
Commit 1e656e8adccae48639e3ce66a50b85017cadf75b
Headers

Message

Alexander Marx Dec. 8, 2015, 12:36 a.m. UTC
  When editing existing static routes and clicking on apply button, there
was an errormessage saying that this route is already in use.
Now the errormessage is only displayed if a new route has the same ip
than an existing one.

Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
---
 html/cgi-bin/routing.cgi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Michael Tremer Dec. 11, 2015, 4:19 a.m. UTC | #1
Thank you. Merged. Will probably ship with Core Update 96.

-Michael

On Mon, 2015-12-07 at 14:36 +0100, Alexander Marx wrote:
> When editing existing static routes and clicking on apply button,
> there
> was an errormessage saying that this route is already in use.
> Now the errormessage is only displayed if a new route has the same ip
> than an existing one.
> 
> Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
> ---
>  html/cgi-bin/routing.cgi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/html/cgi-bin/routing.cgi b/html/cgi-bin/routing.cgi
> index 7636d1e..15989bd 100644
> --- a/html/cgi-bin/routing.cgi
> +++ b/html/cgi-bin/routing.cgi
> @@ -149,7 +149,7 @@ if ($settings{'ACTION'} eq $Lang::tr{'add'}) {
>  		$temp[2] ='' unless defined $temp[2]; # not always
> populated
>  		$temp[3] ='' unless defined $temp[2]; # not always
> populated
>  		#Same ip already used?
> -		if($temp[1] eq $settings{'IP'}){
> +		if($temp[1] eq $settings{'IP'} && $settings{'KEY1'}
> eq ''){
>  			$errormessage = $Lang::tr{'ccd err
> irouteexist'};
>  			last;
>  		}