Show
Ignore:
Timestamp:
10/30/10 18:56:06 (3 years ago)
Author:
jow
Message:

libs/core: use imatch() in firewall and network model

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • luci/trunk/libs/core/luasrc/model/network.lua

    r6362 r6367  
    9292        return s1 
    9393    end 
    94 end 
    95  
    96 function _strlist(x) 
    97     if x == nil then 
    98         x = "" 
    99     elseif type(x) == "table" then 
    100         x = table.concat(x, " ") 
    101     end 
    102  
    103     return x:gmatch("%S+") 
    10494end 
    10595 
     
    620610    else 
    621611        local nfs = { } 
    622         for ifn in _strlist(self:get("ifname")) do 
     612        for ifn in utl.imatch(self:get("ifname")) do 
    623613            ifn = ifn:match("[^:]+") 
    624614            nfs[ifn] = interface(ifn) 
     
    662652        return ifname == ifn 
    663653    else 
    664         for ifn in _strlist(self:get("ifname")) do 
     654        for ifn in utl.imatch(self:get("ifname")) do 
    665655            ifn = ifn:match("[^:]+") 
    666656            if ifn == ifname then