/** * @param string $remote_id * @param string $cluster_identifier * @param string $description * @internal param string $nodeId * @return bool */ protected function updateSelectionDescription( $remote_id = null, $cluster_identifier = null, $description = null ) { if( is_null( $remote_id ) ) $remote_id = isset( $_POST['remote_id'] ) ? $_POST['remote_id'] : null; if( is_null( $cluster_identifier ) ) $cluster_identifier = isset( $_POST['cluster_identifier'] ) ? $_POST['cluster_identifier'] : null; if( is_null( $description ) ) $description = isset( $_POST['description'] ) ? strip_tags(html_entity_decode($_POST['description'])) : null; if ( $remote_id == null || $description == null || $cluster_identifier == null ) return false; return MMSelections::updateSelectionDescription( $remote_id, $cluster_identifier, $description ); }
/** * @return bool * @throws Exception */ public static function selectionUpdate() { if ( !isset($_POST['node_id']) || !isset($_POST['description']) ) { throw new Exception('node_id or description parameter is missing', 61); } $done = MMSelections::updateSelectionDescription($_POST['node_id'], ClusterTool::clusterIdentifier(), $_POST['description']); if ( !$done ) { throw new Exception('Not in selection', 62); } return true; }