Esempio n. 1
0
function getAllChatConnections($focalnode, $nodetype)
{
    global $CFG;
    $nodetypes = 'Comment,' . $nodetype;
    $linklabels = $CFG->LINK_COMMENT_NODE;
    return getConnectionsByPath($focalnode, $linklabels, "", 'all', '', 7, 'incoming', 'false', $nodetypes, 'long');
}
Esempio n. 2
0
     $connectionids = parseToJSON(required_param('connectionids', PARAM_TEXT));
     // needs this parsing to convert single speech marks back.
     $response = getMultiConnections($connectionids, $start, $max, $o, $s, $style);
     break;
 case "getconnectionsbypath":
     $nodeid = required_param('nodeid', PARAM_ALPHANUMEXT);
     $linklabels = required_param('linklabels', PARAM_TEXT);
     $scope = optional_param('scope', 'all', PARAM_TEXT);
     $userid = "";
     //optional_param('userid','',PARAM_ALPHANUMEXT);
     $linkgroup = optional_param('linkgroup', '', PARAM_TEXT);
     $depth = optional_param('depth', '7', PARAM_INT);
     $direction = optional_param('direction', 'both', PARAM_TEXT);
     $labelmatch = optional_param('labelmatch', 'false', PARAM_TEXT);
     $nodetypes = optional_param('nodetypes', null, PARAM_TEXT);
     $response = getConnectionsByPath($nodeid, $linklabels, $userid, $scope, $linkgroup, $depth, $direction, $labelmatch, $nodetypes, $style, $status);
     break;
 case "getconnectionsbypathbydepth":
     $nodeid = optional_param('nodeid', '', PARAM_ALPHANUMEXT);
     $searchid = optional_param('searchid', '', PARAM_ALPHANUMEXT);
     $scope = optional_param('scope', 'all', PARAM_TEXT);
     $labelmatch = optional_param('labelmatch', 'false', PARAM_TEXT);
     $depth = optional_param('depth', '7', PARAM_INT);
     $linklabels = optional_param('linklabels', null, PARAM_TEXT);
     $linkgroups = optional_param('linkgroups', null, PARAM_TEXT);
     $directions = optional_param('directions', null, PARAM_TEXT);
     $nodetypes = optional_param('nodetypes', null, PARAM_TEXT);
     $nodeids = optional_param('nodeids', null, PARAM_TEXT);
     $logictype = optional_param('logictype', 'or', PARAM_TEXT);
     $uniquepath = optional_param('uniquepath', 'false', PARAM_TEXT);
     $response = getConnectionsByPathByDepth($logictype, $scope, $labelmatch, $nodeid, $depth, $linklabels, $linkgroups, $directions, $nodetypes, $nodeids, $uniquepath, $style, $status);