replace unicode nonbreaking space with ascii space (#794)
This commit is contained in:
@@ -91,8 +91,8 @@ sub fixup_device_auth {
|
||||
}
|
||||
|
||||
# legacy config
|
||||
# note: read strings tried before write
|
||||
# note: read-write is no longer used for read operations
|
||||
# note: read strings tried before write
|
||||
# note: read-write is no longer used for read operations
|
||||
|
||||
push @new_stanzas, map {{
|
||||
read => 1, write => 0,
|
||||
|
||||
@@ -79,7 +79,7 @@ sub hostnames_resolve_async {
|
||||
$done->recv;
|
||||
|
||||
# Remove reference to resolver so that we close sockets
|
||||
# and allow return to any instance defaults we have changed
|
||||
# and allow return to any instance defaults we have changed
|
||||
undef $AnyEvent::DNS::RESOLVER if $AnyEvent::DNS::RESOLVER;
|
||||
|
||||
return $ips;
|
||||
|
||||
@@ -65,7 +65,7 @@ for details of what C<$acl> may contain.
|
||||
sub check_acl_only {
|
||||
my ($thing, $setting_name) = @_;
|
||||
return 0 unless $thing and $setting_name;
|
||||
# logic to make an empty config be equivalent to 'any' (i.e. a match)
|
||||
# logic to make an empty config be equivalent to 'any' (i.e. a match)
|
||||
my $config = (exists config->{"$setting_name"} ? setting($setting_name)
|
||||
: $setting_name);
|
||||
return 1 if not $config # undef or empty string
|
||||
@@ -99,7 +99,7 @@ sub check_acl {
|
||||
$thing->can('addr') ? $thing->addr : $thing )));
|
||||
}
|
||||
return 0 if !defined $real_ip
|
||||
or blessed $real_ip; # class we do not understand
|
||||
or blessed $real_ip; # class we do not understand
|
||||
|
||||
$config = [$config] if ref '' eq ref $config;
|
||||
if (ref [] ne ref $config) {
|
||||
@@ -113,12 +113,12 @@ sub check_acl {
|
||||
return 1 if $find and not $all;
|
||||
|
||||
my $addr = NetAddr::IP::Lite->new($real_ip) or return 0;
|
||||
my $name = undef; # only look up once, and only if qr// is used
|
||||
my $name = undef; # only look up once, and only if qr// is used
|
||||
my $ropt = { retry => 1, retrans => 1, udp_timeout => 1, tcp_timeout => 2 };
|
||||
my $qref = ref qr//;
|
||||
|
||||
INLIST: foreach (@$config) {
|
||||
my $item = $_; # must copy so that we can modify safely
|
||||
my $item = $_; # must copy so that we can modify safely
|
||||
next INLIST if !defined $item or $item eq 'op:and';
|
||||
|
||||
if ($qref eq ref $item) {
|
||||
|
||||
@@ -3,7 +3,7 @@ package App::Netdisco::Util::Statistics;
|
||||
use Dancer qw/:syntax :script/;
|
||||
use Dancer::Plugin::DBIC 'schema';
|
||||
|
||||
use Time::Piece; # for OO localtime
|
||||
use Time::Piece; # for OO localtime
|
||||
|
||||
use base 'Exporter';
|
||||
our @EXPORT = ();
|
||||
@@ -36,7 +36,7 @@ sub update_stats {
|
||||
my $snmpinfo_ver = ($@ ? 'n/a' : $SNMP::Info::VERSION);
|
||||
my $postgres_ver = pretty_version($schema->storage->dbh->{pg_server_version}, 2);
|
||||
|
||||
# TODO: (when we have the capabilities table?)
|
||||
# TODO: (when we have the capabilities table?)
|
||||
# $stats{waps} = sql_scalar('device',['COUNT(*)'], {"model"=>"AIR%"});
|
||||
|
||||
$schema->txn_do(sub {
|
||||
|
||||
@@ -17,7 +17,7 @@ sub queue_hook {
|
||||
my $extra = { action_conf => dclone ($conf->{'with'} || {}),
|
||||
event_data => dclone (vars->{'hook_data'} || {}) };
|
||||
|
||||
# remove scalar references which to_json cannot handle
|
||||
# remove scalar references which to_json cannot handle
|
||||
visit( $extra->{'event_data'}, sub {
|
||||
my ($key, $valueref) = @_;
|
||||
$$valueref = '' if ref $$valueref eq 'SCALAR';
|
||||
|
||||
Reference in New Issue
Block a user