Skip to content
Snippets Groups Projects
Commit bc1de263 authored by Tim van Dijen's avatar Tim van Dijen
Browse files

Remove unnecessary code

parent fc1ffee7
No related branches found
No related tags found
No related merge requests found
......@@ -96,7 +96,7 @@ class MetaDataStorageHandlerPdo extends MetaDataStorageSource
throw new Error\Exception("Cannot decode metadata for entity '${d['entity_id']}'");
}
if (!array_key_exists('entityid', $data)) {
$data['entityid'] = $d['entity_id'];
$data['entityID'] = $d['entity_id'];
}
$metadata[$d['entity_id']] = $data;
}
......@@ -159,18 +159,10 @@ class MetaDataStorageHandlerPdo extends MetaDataStorageSource
}
$tableName = $this->getTableName($set);
if (substr($set, -10) == 'idp-hosted') {
$stmt = $this->db->read(
"SELECT entity_id, entity_data FROM {$tableName} WHERE (entity_id LIKE :entityId)",
['entityId' => $entityId]
);
} else {
// other metadata types should be able to match on entity id
$stmt = $this->db->read(
"SELECT entity_id, entity_data FROM {$tableName} WHERE entity_id = :entityId",
['entityId' => $entityId]
);
}
$stmt = $this->db->read(
"SELECT entity_id, entity_data FROM {$tableName} WHERE entity_id = :entityId",
['entityId' => $entityId]
);
// throw pdo exception upon execution failure
if (!$stmt->execute()) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment