Commit 1914acd7 authored by Tibor Katelbach's avatar Tibor Katelbach
Browse files

repaired deleting undefined actions

parent 09c24789
......@@ -341,14 +341,16 @@ class Link {
//0. Check if the $originId and the $targetId exists
$origin = Element::checkIdAndType($originId, $originType, "disconnect");
$target = Element::checkIdAndType($targetId, $targetType, "disconnect");
if(!isset($origin["_id"]))
return false;
$unset=array("links.".$connectType.".".$targetId => "");
if ($linkOption != null && ($linkOption==self::IS_ADMIN_PENDING || $linkOption==self::IS_ADMIN_INVITING)){
if(!@$origin["links"][$connectType][$targetId][self::TO_BE_VALIDATED]){
$unset=array(
"links.".$connectType.".".$targetId.".".self::IS_ADMIN_PENDING => "",
"links.".$connectType.".".$targetId.".".self::IS_ADMIN_INVITING => "",
"links.".$connectType.".".$targetId.".".self::IS_ADMIN => ""
);
"links.".$connectType.".".$targetId.".".self::IS_ADMIN_PENDING => "",
"links.".$connectType.".".$targetId.".".self::IS_ADMIN_INVITING => "",
"links.".$connectType.".".$targetId.".".self::IS_ADMIN => ""
);
}
}
if ($settings != null && $settings["value"]=="default"){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment