Search by VLAN name now works
This commit is contained in:
		| @@ -21,6 +21,7 @@ | ||||
|   * Fix form reset icon on ports tab when using custom path (Daniel Tuecks) | ||||
|   * Don't store failed SNMP community in the database | ||||
|   * [#51] Support DBD::Pg default for "host" field as local socket | ||||
|   * [#58] Search by VLAN name now works | ||||
|  | ||||
| 2.020002 - 2013-12-11 | ||||
|  | ||||
|   | ||||
| @@ -352,8 +352,9 @@ sub carrying_vlan { | ||||
|     die "vlan number required for carrying_vlan\n" | ||||
|       if ref {} ne ref $cond or !exists $cond->{vlan}; | ||||
|  | ||||
|     $cond->{'vlans.vlan'} = $cond->{vlan}; | ||||
|     $cond->{'port_vlans.vlan'} = delete $cond->{vlan}; | ||||
|     $cond->{'-and'} ||= []; | ||||
|     push @{$cond->{'-and'}}, 'vlans.vlan' => $cond->{vlan}; | ||||
|     push @{$cond->{'-and'}}, 'port_vlans.vlan' => delete $cond->{vlan}; | ||||
|  | ||||
|     return $rs | ||||
|       ->search_rs($cond, | ||||
| @@ -402,7 +403,7 @@ sub carrying_vlan_name { | ||||
|     die "vlan name required for carrying_vlan_name\n" | ||||
|       if ref {} ne ref $cond or !exists $cond->{name}; | ||||
|  | ||||
|     $cond->{'vlans.description'} = { '-ilike' => $cond->{name} }; | ||||
|     $cond->{'vlans.description'} = { '-ilike' => delete $cond->{name} }; | ||||
|  | ||||
|     return $rs | ||||
|       ->search_rs({}, { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user