Changeset 475
- Timestamp:
- 03/13/13 12:49:20 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r474 r475 2258 2258 my @zonelist; 2259 2259 2260 $args{sortorder} = 'ASC' if ! grep /^$args{sortorder}$/, ('ASC','DESC');2260 $args{sortorder} = 'ASC' if !$args{sortorder} || !grep /^$args{sortorder}$/, ('ASC','DESC'); 2261 2261 $args{offset} = 0 if !$args{offset} || $args{offset} !~ /^(?:all|\d+)$/; 2262 2262 … … 2270 2270 # Not as compact, and fix-me-twice if the common bits get wrong, but much easier to read 2271 2271 if ($args{revrec} eq 'n') { 2272 $args{sortby} = 'domain' if ! grep /^$args{sortby}$/, ('domain','group','status');2272 $args{sortby} = 'domain' if !$args{sortby} || !grep /^$args{sortby}$/, ('domain','group','status'); 2273 2273 $sql = "SELECT domain_id,domain,status,groups.group_name AS group FROM domains". 2274 2274 " INNER JOIN groups ON domains.group_id=groups.group_id". … … 2278 2278 } else { 2279 2279 ##fixme: arguably startwith here is irrelevant. depends on the UI though. 2280 $args{sortby} = 'revnet' if ! grep /^$args{sortby}$/, ('revnet','group','status');2280 $args{sortby} = 'revnet' if !$args{sortby} || !grep /^$args{sortby}$/, ('revnet','group','status'); 2281 2281 $sql = "SELECT rdns_id,revnet,status,groups.group_name AS group FROM revzones". 2282 2282 " INNER JOIN groups ON revzones.group_id=groups.group_id".
Note:
See TracChangeset
for help on using the changeset viewer.