From e274b763d78592c4e20f99dbe411a6b6c09e81b4 Mon Sep 17 00:00:00 2001 From: CaMer0n Date: Wed, 21 Oct 2009 11:43:30 +0000 Subject: [PATCH] Some debug info added. --- e107_handlers/xml_class.php | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/e107_handlers/xml_class.php b/e107_handlers/xml_class.php index 8f66340ae..7b3edf254 100644 --- a/e107_handlers/xml_class.php +++ b/e107_handlers/xml_class.php @@ -9,8 +9,8 @@ * Simple XML Parser * * $Source: /cvs_backup/e107_0.8/e107_handlers/xml_class.php,v $ - * $Revision: 1.29 $ - * $Date: 2009-09-21 22:22:14 $ + * $Revision: 1.30 $ + * $Date: 2009-10-21 11:43:30 $ * $Author: e107coders $ */ @@ -801,18 +801,25 @@ class xmlClass */ public function e107ImportPrefs($XMLData,$prefType='core') { + + if(!vartrue($XMLData['prefs'][$prefType])) { return; } + $mes = eMessage::getInstance(); + $pref = array(); foreach($XMLData['prefs'][$prefType] as $val) { $name = $val['@attributes']['name']; $value = (substr($val['@value'],0,7) == "array (") ? e107::getArrayStorage()->ReadArray($val['@value']) : $val['@value']; - $pref[$name] = $value; + $pref[$name] = $value; + + $mes->add("Setting up ".$prefType." Pref [".$name."] => ".$value, E_MESSAGE_DEBUG); } + return $pref; } @@ -832,10 +839,13 @@ class xmlClass { $xmlArray = $this->loadXMLfile($file,'advanced'); + // $message = "
".htmlentities(print_r($xmlArray,TRUE))."
"; + $mes = eMessage::getInstance(); + $mes->add($message, E_MESSAGE_DEBUG); if($debug) { - print_a($xmlArray); + // $message = print_r($xmlArray); return; }