- Timestamp:
- 05/09/13 18:05:52 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r508 r509 2225 2225 my %args = @_; 2226 2226 2227 # Fail on bad curgroup argument. There's no sane fallback on this one. 2228 if (!$args{curgroup} || $args{curgroup} !~ /^\d+$/) { 2229 $errstr = "Bad or missing curgroup argument"; 2230 return; 2231 } 2232 # Fail on bad childlist argument. This could be sanely ignored if bad, maybe. 2233 if ($args{childlist} && $args{childlist} !~ /^[\d,]+$/) { 2234 $errstr = "Bad childlist argument"; 2235 return; 2236 } 2237 2227 2238 my @filterargs; 2228 2239 $args{startwith} = undef if $args{startwith} && $args{startwith} !~ /^(?:[a-z]|0-9)$/; … … 2263 2274 $args{sortorder} = 'ASC' if !$args{sortorder} || !grep /^$args{sortorder}$/, ('ASC','DESC'); 2264 2275 $args{offset} = 0 if !$args{offset} || $args{offset} !~ /^(?:all|\d+)$/; 2276 2277 # Fail on bad curgroup argument. There's no sane fallback on this one. 2278 if (!$args{curgroup} || $args{curgroup} !~ /^\d+$/) { 2279 $errstr = "Bad or missing curgroup argument"; 2280 return; 2281 } 2282 # Fail on bad childlist argument. This could be sanely ignored if bad, maybe. 2283 if ($args{childlist} && $args{childlist} !~ /^[\d,]+$/) { 2284 $errstr = "Bad childlist argument"; 2285 return; 2286 } 2265 2287 2266 2288 my @filterargs; … … 2558 2580 my %args = @_; 2559 2581 2582 # Fail on bad curgroup argument. There's no sane fallback on this one. 2583 if (!$args{curgroup} || $args{curgroup} !~ /^\d+$/) { 2584 $errstr = "Bad or missing curgroup argument"; 2585 return; 2586 } 2587 # Fail on bad childlist argument. This could be sanely ignored if bad, maybe. 2588 if ($args{childlist} && $args{childlist} !~ /^[\d,]+$/) { 2589 $errstr = "Bad childlist argument"; 2590 return; 2591 } 2592 2560 2593 my @filterargs; 2561 2562 2594 $args{startwith} = undef if $args{startwith} && $args{startwith} !~ /^(?:[a-z]|0-9)$/; 2563 2595 push @filterargs, "^$args{startwith}" if $args{startwith}; … … 2584 2616 my %args = @_; 2585 2617 2618 # Fail on bad curgroup argument. There's no sane fallback on this one. 2619 if (!$args{curgroup} || $args{curgroup} !~ /^\d+$/) { 2620 $errstr = "Bad or missing curgroup argument"; 2621 return; 2622 } 2623 # Fail on bad childlist argument. This could be sanely ignored if bad, maybe. 2624 if ($args{childlist} && $args{childlist} !~ /^[\d,]+$/) { 2625 $errstr = "Bad childlist argument"; 2626 return; 2627 } 2628 2586 2629 my @filterargs; 2587 2588 2630 $args{startwith} = undef if $args{startwith} && $args{startwith} !~ /^(?:[a-z]|0-9)$/; 2589 2631 push @filterargs, "^$args{startwith}" if $args{startwith}; … … 2786 2828 my %args = @_; 2787 2829 2830 # Fail on bad curgroup argument. There's no sane fallback on this one. 2831 if (!$args{curgroup} || $args{curgroup} !~ /^\d+$/) { 2832 $errstr = "Bad or missing curgroup argument"; 2833 return; 2834 } 2835 # Fail on bad childlist argument. This could be sanely ignored if bad, maybe. 2836 if ($args{childlist} && $args{childlist} !~ /^[\d,]+$/) { 2837 $errstr = "Bad childlist argument"; 2838 return; 2839 } 2840 2788 2841 my @filterargs; 2789 2790 2842 $args{startwith} = undef if $args{startwith} && $args{startwith} !~ /^(?:[a-z]|0-9)$/; 2791 2843 push @filterargs, "^$args{startwith}" if $args{startwith}; 2792 2844 push @filterargs, $args{filter} if $args{filter}; 2793 2794 2845 2795 2846 my $sql = "SELECT count(*) FROM users ". … … 2815 2866 my %args = @_; 2816 2867 2868 # Fail on bad curgroup argument. There's no sane fallback on this one. 2869 if (!$args{curgroup} || $args{curgroup} !~ /^\d+$/) { 2870 $errstr = "Bad or missing curgroup argument"; 2871 return; 2872 } 2873 # Fail on bad childlist argument. This could be sanely ignored if bad, maybe. 2874 if ($args{childlist} && $args{childlist} !~ /^[\d,]+$/) { 2875 $errstr = "Bad childlist argument"; 2876 return; 2877 } 2878 2817 2879 my @filterargs; 2818 2819 2880 $args{startwith} = undef if $args{startwith} && $args{startwith} !~ /^(?:[a-z]|0-9)$/; 2820 2881 push @filterargs, "^$args{startwith}" if $args{startwith}; … … 3258 3319 my %args = @_; 3259 3320 3321 # Fail on bad curgroup argument. There's no sane fallback on this one. 3322 if (!$args{curgroup} || $args{curgroup} !~ /^\d+$/) { 3323 $errstr = "Bad or missing curgroup argument"; 3324 return; 3325 } 3326 # Fail on bad childlist argument. This could be sanely ignored if bad, maybe. 3327 if ($args{childlist} && $args{childlist} !~ /^[\d,]+$/) { 3328 $errstr = "Bad childlist argument"; 3329 return; 3330 } 3331 3260 3332 my @filterargs; 3261 3262 3333 $args{startwith} = undef if $args{startwith} && $args{startwith} !~ /^(?:[a-z]|0-9)$/; 3263 3334 push @filterargs, "^$args{startwith}" if $args{startwith}; 3264 3335 push @filterargs, $args{filter} if $args{filter}; 3265 3266 3336 3267 3337 my $sql = "SELECT count(*) FROM locations ". … … 3282 3352 my %args = @_; 3283 3353 3354 # Fail on bad curgroup argument. There's no sane fallback on this one. 3355 if (!$args{curgroup} || $args{curgroup} !~ /^\d+$/) { 3356 $errstr = "Bad or missing curgroup argument"; 3357 return; 3358 } 3359 # Fail on bad childlist argument. This could be sanely ignored if bad, maybe. 3360 if ($args{childlist} && $args{childlist} !~ /^[\d,]+$/) { 3361 $errstr = "Bad childlist argument"; 3362 return; 3363 } 3364 3284 3365 my @filterargs; 3285 3286 3366 $args{startwith} = undef if $args{startwith} && $args{startwith} !~ /^(?:[a-z]|0-9)$/; 3287 3367 push @filterargs, "^$args{startwith}" if $args{startwith};
Note:
See TracChangeset
for help on using the changeset viewer.