From 915073f8eaeffeb40237a531b3e161ac2f3f0caf Mon Sep 17 00:00:00 2001
From: Robin Appelman <icewind1991@gmail.com>
Date: Mon, 16 May 2011 16:20:56 +0200
Subject: [PATCH] use simplexml instead of dom for OC_APP::getAppInfo()

---
 lib/app.php | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/lib/app.php b/lib/app.php
index e2744f5179..83c80f6356 100644
--- a/lib/app.php
+++ b/lib/app.php
@@ -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;
 	}
-- 
GitLab