Changeset 309
- Timestamp:
- 04/18/12 17:29:02 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r307 r309 1463 1463 return ('FAIL',"Need domain status") if !defined($state); 1464 1464 1465 my %userinfo = @_; # remaining bits.1466 # user ID, username, user full name1467 1468 1465 $state = 1 if $state =~ /^active$/; 1469 1466 $state = 1 if $state =~ /^on$/; … … 1887 1884 my @zonelist; 1888 1885 1889 $args{sortorder} = 'ASC' if !grep $args{sortorder}, ('ASC','DESC');1886 $args{sortorder} = 'ASC' if !grep /^$args{sortorder}$/, ('ASC','DESC'); 1890 1887 $args{offset} = 0 if !$args{offset} || $args{offset} !~ /^(?:all|\d+)$/; 1891 1888 … … 1899 1896 # Not as compact, and fix-me-twice if the common bits get wrong, but much easier to read 1900 1897 if ($args{revrec} eq 'n') { 1901 $args{sortby} = 'domain' if !grep $args{sortby}, ('revnet','group','status');1898 $args{sortby} = 'domain' if !grep /^$args{sortby}$/, ('domain','group','status'); 1902 1899 $sql = "SELECT domain_id,domain,status,groups.group_name AS group FROM domains". 1903 1900 " INNER JOIN groups ON domains.group_id=groups.group_id". … … 1907 1904 } else { 1908 1905 ##fixme: arguably startwith here is irrelevant. depends on the UI though. 1909 $args{sortby} = 'revnet' if !grep $args{sortby}, ('domain','group','status');1906 $args{sortby} = 'revnet' if !grep /^$args{sortby}$/, ('revnet','group','status'); 1910 1907 $sql = "SELECT rdns_id,revnet,status,groups.group_name AS group FROM revzones". 1911 1908 " INNER JOIN groups ON revzones.group_id=groups.group_id". … … 3347 3344 3348 3345 if ($rev eq 'n') { 3349 3350 3346 ##fixme: serial 3351 3347 $dbh->do("INSERT INTO domains (domain,group_id,status) VALUES (?,?,?)", undef, ($zone,$group,$status) );
Note:
See TracChangeset
for help on using the changeset viewer.