summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorivan <ivan>2010-10-10 20:52:38 +0000
committerivan <ivan>2010-10-10 20:52:38 +0000
commitf4b93f8790be61c976cb3a9236753a65d97f661e (patch)
tree2857edfff575ad828424a94e6cd120225e219435 /FS
parente0e63e55a8870b1ba76bd9aaedd5858c1ff0a07a (diff)
simple protection against selecting and using package add-ons that point to the same package. (still need to detect and break more complex self-referential loops)
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/part_pkg.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/FS/FS/part_pkg.pm b/FS/FS/part_pkg.pm
index ec88e1b2d..130bd8647 100644
--- a/FS/FS/part_pkg.pm
+++ b/FS/FS/part_pkg.pm
@@ -907,6 +907,8 @@ sub _part_pkg_link {
qsearch({ table => 'part_pkg_link',
hashref => { 'src_pkgpart' => $self->pkgpart,
'link_type' => $type,
+ #protection against infinite recursive links
+ 'dst_pkgpart' => { op=>'!=', $self->pkgpart },
},
order_by => "ORDER BY hidden",
});