$response = addFollowing($itemid); break; case "deletefollowing": $itemid = required_param('itemid', PARAM_ALPHANUMEXT); $response = deleteFollowing($itemid); break; /** AUDITING **/ /** AUDITING **/ case "auditsearch": $query = required_param('q', PARAM_TEXT); $tagsonlyoption = optional_param('tagsonly', 'N', PARAM_TEXT); $type = optional_param('type', 'main', PARAM_ALPHA); $typeitemid = optional_param('typeitemid', '', PARAM_ALPHANUMEXT); $searchid = ""; if (isset($USER->userid)) { $searchid = auditSearch($USER->userid, $query, $tagsonlyoption, $type, $typeitemid); } $response = $searchid; break; case "auditnodeviewmulti": $nodeids = required_param('nodeids', PARAM_TEXT); // comma separated list $viewtype = required_param('viewtype', PARAM_ALPHA); $userid = ""; if (isset($USER->userid)) { $userid = $USER->userid; } auditViewMulti($userid, $nodeids, $viewtype); break; case "auditnodeview": $nodeid = required_param('nodeid', PARAM_ALPHANUMEXT);
$path = $HUB_FLM->getCodeDirPath($me); include_once $path; die; } $searchid = optional_param("sid", "", PARAM_ALPHANUMEXT); $query = stripslashes(parseToJSON(optional_param("q", "", PARAM_TEXT))); // need to do parseToJSON to convert any '+' symbols as they are now used in searches. // default parameters $start = optional_param("start", 0, PARAM_INT); $max = optional_param("max", 20, PARAM_INT); $orderby = optional_param("orderby", "", PARAM_ALPHA); $sort = optional_param("sort", "DESC", PARAM_ALPHA); if ($searchid == "" && isset($USER->userid)) { $fromid = optional_param("fromid", '', PARAM_TEXT); $tagsonlyoption = 'N'; $searchid = auditSearch($USER->userid, $query, $tagsonlyoption, 'main', $fromid); if ($searchid != "") { header("Location: " . $CFG->homeAddress . "search.php?sid=" . $searchid . "&q=" . $query . "&scope=" . $scope . "&tagsonly=" . $tagsonly); exit; } } include_once $HUB_FLM->getCodeDirPath("core/utillib.php"); array_push($HEADER, '<script src="' . $HUB_FLM->getCodeWebPath('ui/searchlib.js.php') . '" type="text/javascript"></script>'); include_once $HUB_FLM->getCodeDirPath("ui/header.php"); $args = array(); $args["filternodetypes"] = ''; $args["q"] = $query; $args["searchid"] = $searchid; $args["start"] = $start; $args["max"] = $max; if ($orderby == "") {