summaryrefslogtreecommitdiff
path: root/rt/etc/upgrade/generate-rtaddressregexp.in
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2015-07-09 22:18:55 -0700
committerIvan Kohler <ivan@freeside.biz>2015-07-09 22:18:55 -0700
commit1c538bfabc2cd31f27067505f0c3d1a46cba6ef0 (patch)
tree96922ad4459eda1e649327fd391d60c58d454c53 /rt/etc/upgrade/generate-rtaddressregexp.in
parent4f5619288413a185e9933088d9dd8c5afbc55dfa (diff)
RT 4.2.11, ticket#13852
Diffstat (limited to 'rt/etc/upgrade/generate-rtaddressregexp.in')
-rw-r--r--rt/etc/upgrade/generate-rtaddressregexp.in11
1 files changed, 4 insertions, 7 deletions
diff --git a/rt/etc/upgrade/generate-rtaddressregexp.in b/rt/etc/upgrade/generate-rtaddressregexp.in
index a6262dffe..3cdd5a60e 100644
--- a/rt/etc/upgrade/generate-rtaddressregexp.in
+++ b/rt/etc/upgrade/generate-rtaddressregexp.in
@@ -46,18 +46,15 @@
# those contributions and any derivatives thereof.
#
# END BPS TAGGED BLOCK }}}
+use 5.10.1;
use strict;
use warnings;
use lib "@LOCAL_LIB_PATH@";
use lib "@RT_LIB_PATH@";
-use RT;
-RT::LoadConfig();
-RT->Config->Set('LogToScreen' => 'debug');
-RT::Init();
-
-$| = 1;
+use RT::Interface::CLI qw(Init);
+Init();
if (my $re = RT->Config->Get('RTAddressRegexp')) {
print "No need to use this script, you already have RTAddressRegexp set to $re\n";
@@ -86,7 +83,7 @@ for my $domain (sort keys %merged) {
}
}
if (@addresses > 1) {
- push @domains, "(?:".join("|", @addresses).")\Q\@".$domain."\E";
+ push @domains, "(?:".join("|", @addresses).")\Q\@$domain\E";
} else {
push @domains, "$addresses[0]\Q\@$domain\E";
}