From b4bd76fbb55adabb3d604c4991029015c3a51aea Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 30 Oct 2007 16:18:12 +0000 Subject: [PATCH] "dont delete infolog, which are linked to other elements, but their project" --- infolog/inc/class.datasource_infolog.inc.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/infolog/inc/class.datasource_infolog.inc.php b/infolog/inc/class.datasource_infolog.inc.php index 634452e68b..d2d2f34f4b 100644 --- a/infolog/inc/class.datasource_infolog.inc.php +++ b/infolog/inc/class.datasource_infolog.inc.php @@ -152,6 +152,11 @@ class datasource_infolog extends datasource include_once(EGW_INCLUDE_ROOT.'/infolog/inc/class.boinfolog.inc.php'); $GLOBALS['boinfolog'] =& new boinfolog(); } + // dont delete infolog, which are linked to other elements, but their project + if (count($this->boinfolog->link->get_links('infolog',$id)) > 1) + { + return false; + } return $this->boinfolog->delete($id); }