getMessage(); } try{ $bitmask=SecurityControler::getActions($_SESSION['user']['UserId'],$_REQUEST['mr_aggregation_id']); if(check_right($bitmask,CREATE_CLASS) || check_right($bitmask,CREATE_OTHER_AGREGATION)) { // The "or" is only because no typed aggregations // Instanciating new aggregation $mr_aggreg=new mr_aggregation(); foreach($_REQUEST as $key=>$value){ if(substr_compare($key,"new_",0,4)==0){ // Property to add $property=substr($key,4,strlen($key)-4); $mr_aggreg->$property=$value; } } $mr_aggreg->parent_mr_classification_scheme_id=$_REQUEST['mr_classification_scheme_id']; if(!empty($_REQUEST['new_parent_mr_aggregation_id'])){ mr_aggregation_controler::save($mr_aggreg); echo _AGGREGATION_CREATED; } else echo _NOT_ALLOWED; } else { echo _NOT_ALLOWED; } } catch(Exception $e){ include("modules/moreq/failure.php"); } ?>