summaryrefslogtreecommitdiff
path: root/FS/FS/svc_Common.pm
diff options
context:
space:
mode:
authorivan <ivan>2009-10-28 19:06:24 +0000
committerivan <ivan>2009-10-28 19:06:24 +0000
commit218abc74cd86061e00012eb8c01893f36b90eaf3 (patch)
tree201b16e3424a3d7620aaee346147d332e3c5abff /FS/FS/svc_Common.pm
parent4d6545dc438e185f01616ad8c01e117122039cf4 (diff)
fix problems using inventory for UID (and other fields controlled by check in svc_acct and also svc_www, svc_domain and svc_forward), RT#6366
Diffstat (limited to 'FS/FS/svc_Common.pm')
-rw-r--r--FS/FS/svc_Common.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/FS/FS/svc_Common.pm b/FS/FS/svc_Common.pm
index 1d200b077..8fea730d2 100644
--- a/FS/FS/svc_Common.pm
+++ b/FS/FS/svc_Common.pm
@@ -251,8 +251,11 @@ sub insert {
$self->svcpart($cust_svc->svcpart);
}
- my $error = $self->set_auto_inventory
+ my $error = $self->preinsert_hook_first
+ || $self->set_auto_inventory
|| $self->check
+ || $self->_check_duplicate
+ || $self->preinsert_hook
|| $self->SUPER::insert;
if ( $error ) {
$dbh->rollback if $oldAutoCommit;
@@ -316,6 +319,11 @@ sub insert {
'';
}
+#fallbacks
+sub preinsert_hook_first { ''; }
+sub _check_duplcate { ''; }
+sub preinsert_hook { ''; }
+
=item delete
Deletes this account from the database. If there is an error, returns the