/** * Print the XML for actions * * @param boolean $filterByRight * @param User $user */ function sendActionsToClient($filterByRight, $user, $repository) { //AJXP_XMLWriter::header(); foreach ($this->actions as $name => $action) { if ($name == "get_driver_actions" || $name == "get_ajxp_actions") { continue; } if ($filterByRight && $this->actionNeedsRight($name, "r")) { if ($user == null || !$user->canRead($repository->getId())) { continue; } } if ($filterByRight && $this->actionNeedsRight($name, "w")) { if ($user == null || !$user->canWrite($repository->getId())) { continue; } } if (isset($action["XML"])) { $xml = $action["XML"]; $xml = $this->replaceAjxpXmlKeywords($xml); $xml = preg_replace("/[\n\r]?/", "", $xml); $xml = preg_replace("/\t/", " ", $xml); AJXP_XMLWriter::write($xml, true); } } //AJXP_XMLWriter::close(); }