X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fsbin%2Frt-validator.in;h=fafc85e1027e4413f0bbc3fe8c45bfd31a289022;hb=653545aa57687de24286d0955a047cb20f6e0c54;hp=128e60af02c0b292958877a4eda465810d421417;hpb=b8988e1d3ac75af63c85e8563e57701030315a9e;p=freeside.git diff --git a/rt/sbin/rt-validator.in b/rt/sbin/rt-validator.in index 128e60af0..fafc85e10 100644 --- a/rt/sbin/rt-validator.in +++ b/rt/sbin/rt-validator.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -222,7 +222,7 @@ foreach my $table ( qw(Users Groups) ) { bind_values => [ $type ], action => sub { my $id = shift; - return unless my $a = prompt_action( ['Delete', 'create'], $msg ); + return unless my $a = prompt_action( ['Create', 'delete'], $msg ); if ( $a eq 'd' ) { delete_record( $table, $id ); @@ -267,7 +267,7 @@ push @CHECKS, 'User <-> ACL equivalence group' => sub { action => sub { my $id = shift; return unless prompt( - 'Create', "Found an user that has no ACL equivalence group." + 'Create', "Found a user that has no ACL equivalence group." ); my $gid = create_record( 'Groups', @@ -283,7 +283,7 @@ push @CHECKS, 'User <-> ACL equivalence group' => sub { action => sub { my $id = shift; return unless prompt( - 'Delete', "Found an user ACL equivalence group, but there is no user." + 'Delete', "Found a user ACL equivalence group, but there is no user." ); delete_record( 'Groups', $id ); @@ -1104,7 +1104,7 @@ sub prompt_action { my $token = shift || join ':', caller; return '' unless $opt{'resolve'}; - return '' if $opt{'force'}; + return lc substr $actions->[0], 0, 1 if $opt{'force'}; return $cached_answer{ $token } if exists $cached_answer{ $token }; print $msg, "\n";