"dont delete infolog, which are linked to other elements, but their project"

This commit is contained in:
Ralf Becker 2007-10-30 16:18:12 +00:00
parent ec9c277770
commit b4bd76fbb5

View File

@ -152,6 +152,11 @@ class datasource_infolog extends datasource
include_once(EGW_INCLUDE_ROOT.'/infolog/inc/class.boinfolog.inc.php'); include_once(EGW_INCLUDE_ROOT.'/infolog/inc/class.boinfolog.inc.php');
$GLOBALS['boinfolog'] =& new boinfolog(); $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); return $this->boinfolog->delete($id);
} }