projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b5b3d4a
)
add the svc_forward-arbitrary_dst flag to enable arbitrary svc_forward destinations
author
ivan
<ivan>
Fri, 14 Apr 2006 11:55:58 +0000
(11:55 +0000)
committer
ivan
<ivan>
Fri, 14 Apr 2006 11:55:58 +0000
(11:55 +0000)
FS/FS/Conf.pm
patch
|
blob
|
history
FS/FS/svc_forward.pm
patch
|
blob
|
history
diff --git
a/FS/FS/Conf.pm
b/FS/FS/Conf.pm
index
c33f68b
..
21e7528
100644
(file)
--- a/
FS/FS/Conf.pm
+++ b/
FS/FS/Conf.pm
@@
-1695,6
+1695,13
@@
httemplate/docs/config.html
'type' => 'checkbox',
},
'type' => 'checkbox',
},
+ {
+ 'key' => 'svc_forward-arbitrary_dst',
+ 'section' => '',
+ 'description' => "Allow forwards to point to arbitrary strings that don't necessarily look like email addresses. Only used when using forwards for weird, non-email things.",
+ 'type' => 'checkbox',
+ },
+
);
1;
);
1;
diff --git
a/FS/FS/svc_forward.pm
b/FS/FS/svc_forward.pm
index
12b556f
..
ab24d32
100644
(file)
--- a/
FS/FS/svc_forward.pm
+++ b/
FS/FS/svc_forward.pm
@@
-257,9
+257,15
@@
sub check {
}
if ( $self->dst ) {
}
if ( $self->dst ) {
- $self->dst =~ /^([\w\.\-\&]*)(\@([\w\-]+\.)+\w+)$/
- or return "Illegal dst: ". $self->dst;
- $self->dst("$1$2");
+ my $conf = new FS::Conf;
+ if ( $conf->exists('svc_forward-arbitrary_dst') ) {
+ my $error = $self->ut_textn('dst');
+ return $error if $error;
+ } else {
+ $self->dst =~ /^([\w\.\-\&]*)(\@([\w\-]+\.)+\w+)$/
+ or return "Illegal dst: ". $self->dst;
+ $self->dst("$1$2");
+ }
} else {
$self->dst('');
}
} else {
$self->dst('');
}