Skip to content
Snippets Groups Projects
Commit 915073f8 authored by Robin Appelman's avatar Robin Appelman
Browse files

use simplexml instead of dom for OC_APP::getAppInfo()

parent 84101615
No related branches found
No related tags found
No related merge requests found
......@@ -326,17 +326,12 @@ class OC_APP{
return array();
}
$data=array();
$plugin=new DOMDocument();
$plugin->load($file);
$info=$plugin->getElementsByTagName('info');
if($info->length > 0){
$info=$info->item(0);
$data['info']=array();
foreach($info->childNodes as $child){
if($child->nodeType==XML_ELEMENT_NODE){
$data[$child->tagName]=$child->textContent;
}
}
$content=file_get_contents($file);
$xml = new SimpleXMLElement($content);
$info=$xml->info[0];
$data['info']=array();
foreach($info->children() as $child){
$data[$child->getName()]=(string)$child;
}
return $data;
}
......
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