Skip to content
Snippets Groups Projects
Commit 72abd159 authored by Tomasz Wolniewicz's avatar Tomasz Wolniewicz
Browse files

after changing of the entity storage no manipulation is needed

parent be4962e8
No related branches found
No related tags found
3 merge requests!3Align master branch with twoln-dev,!2Synchronising towards version 2.5,!1Twoln dev
......@@ -74,18 +74,6 @@ class eduGAIN_entity extends eduGAIN {
$this->globalStats = $out;
}
private function generateNamespaces() {
$out = '';
$q = "SELECT * FROM feed_namespaces";
$result = $this->databaseQuery($q);
while ($obj = $result->fetch_assoc()) {
$nskey = $obj['nskey'];
$nsvalue = $obj['nsvalue'];
$out .= $nskey . '="' . $nsvalue . '" ';
}
return $out;
}
/**
* Show entity metadata XML code
*/
......@@ -99,13 +87,11 @@ class eduGAIN_entity extends eduGAIN {
if (!is_numeric($entity_row_id)) {
exit;
}
$ns = $this->generateNamespaces();
$q = "SELECT entity FROM entities WHERE id=$entity_row_id";
$result = $this->databaseQuery($q);
if ($obj = $result->fetch_assoc()) {
$entityText = base64_decode($obj['entity']);
$entity = preg_replace('/md:EntityDescriptor /','md:EntityDescriptor ' . $ns, $entityText);
return($entity);
return($entityText);
} else {
die("entity search problem");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment